Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: src/objects-inl.h

Issue 921443004: Get code flags from compilation info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/code-generator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 4851 matching lines...) Expand 10 before | Expand all | Expand 10 after
4862 4862
4863 4863
4864 inline void Code::set_is_crankshafted(bool value) { 4864 inline void Code::set_is_crankshafted(bool value) {
4865 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 4865 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
4866 int updated = IsCrankshaftedField::update(previous, value); 4866 int updated = IsCrankshaftedField::update(previous, value);
4867 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 4867 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
4868 } 4868 }
4869 4869
4870 4870
4871 inline bool Code::is_turbofanned() { 4871 inline bool Code::is_turbofanned() {
4872 DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
4873 return IsTurbofannedField::decode( 4872 return IsTurbofannedField::decode(
4874 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); 4873 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
4875 } 4874 }
4876 4875
4877 4876
4878 inline void Code::set_is_turbofanned(bool value) { 4877 inline void Code::set_is_turbofanned(bool value) {
4879 DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
4880 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); 4878 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
4881 int updated = IsTurbofannedField::update(previous, value); 4879 int updated = IsTurbofannedField::update(previous, value);
4882 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); 4880 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
4883 } 4881 }
4884 4882
4885 4883
4886 inline bool Code::can_have_weak_objects() { 4884 inline bool Code::can_have_weak_objects() {
4887 DCHECK(kind() == OPTIMIZED_FUNCTION); 4885 DCHECK(kind() == OPTIMIZED_FUNCTION);
4888 return CanHaveWeakObjectsField::decode( 4886 return CanHaveWeakObjectsField::decode(
4889 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); 4887 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
(...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after
7635 #undef READ_SHORT_FIELD 7633 #undef READ_SHORT_FIELD
7636 #undef WRITE_SHORT_FIELD 7634 #undef WRITE_SHORT_FIELD
7637 #undef READ_BYTE_FIELD 7635 #undef READ_BYTE_FIELD
7638 #undef WRITE_BYTE_FIELD 7636 #undef WRITE_BYTE_FIELD
7639 #undef NOBARRIER_READ_BYTE_FIELD 7637 #undef NOBARRIER_READ_BYTE_FIELD
7640 #undef NOBARRIER_WRITE_BYTE_FIELD 7638 #undef NOBARRIER_WRITE_BYTE_FIELD
7641 7639
7642 } } // namespace v8::internal 7640 } } // namespace v8::internal
7643 7641
7644 #endif // V8_OBJECTS_INL_H_ 7642 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698