OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |