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 4840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4851 | 4851 |
4852 | 4852 |
4853 void Code::set_compiled_optimizable(bool value) { | 4853 void Code::set_compiled_optimizable(bool value) { |
4854 DCHECK_EQ(FUNCTION, kind()); | 4854 DCHECK_EQ(FUNCTION, kind()); |
4855 byte flags = READ_BYTE_FIELD(this, kFullCodeFlags); | 4855 byte flags = READ_BYTE_FIELD(this, kFullCodeFlags); |
4856 flags = FullCodeFlagsIsCompiledOptimizable::update(flags, value); | 4856 flags = FullCodeFlagsIsCompiledOptimizable::update(flags, value); |
4857 WRITE_BYTE_FIELD(this, kFullCodeFlags, flags); | 4857 WRITE_BYTE_FIELD(this, kFullCodeFlags, flags); |
4858 } | 4858 } |
4859 | 4859 |
4860 | 4860 |
| 4861 bool Code::has_reloc_info_for_serialization() { |
| 4862 DCHECK_EQ(FUNCTION, kind()); |
| 4863 byte flags = READ_BYTE_FIELD(this, kFullCodeFlags); |
| 4864 return FullCodeFlagsHasRelocInfoForSerialization::decode(flags); |
| 4865 } |
| 4866 |
| 4867 |
| 4868 void Code::set_has_reloc_info_for_serialization(bool value) { |
| 4869 DCHECK_EQ(FUNCTION, kind()); |
| 4870 byte flags = READ_BYTE_FIELD(this, kFullCodeFlags); |
| 4871 flags = FullCodeFlagsHasRelocInfoForSerialization::update(flags, value); |
| 4872 WRITE_BYTE_FIELD(this, kFullCodeFlags, flags); |
| 4873 } |
| 4874 |
| 4875 |
4861 int Code::allow_osr_at_loop_nesting_level() { | 4876 int Code::allow_osr_at_loop_nesting_level() { |
4862 DCHECK_EQ(FUNCTION, kind()); | 4877 DCHECK_EQ(FUNCTION, kind()); |
4863 int fields = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 4878 int fields = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
4864 return AllowOSRAtLoopNestingLevelField::decode(fields); | 4879 return AllowOSRAtLoopNestingLevelField::decode(fields); |
4865 } | 4880 } |
4866 | 4881 |
4867 | 4882 |
4868 void Code::set_allow_osr_at_loop_nesting_level(int level) { | 4883 void Code::set_allow_osr_at_loop_nesting_level(int level) { |
4869 DCHECK_EQ(FUNCTION, kind()); | 4884 DCHECK_EQ(FUNCTION, kind()); |
4870 DCHECK(level >= 0 && level <= kMaxLoopNestingMarker); | 4885 DCHECK(level >= 0 && level <= kMaxLoopNestingMarker); |
(...skipping 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7425 #undef READ_SHORT_FIELD | 7440 #undef READ_SHORT_FIELD |
7426 #undef WRITE_SHORT_FIELD | 7441 #undef WRITE_SHORT_FIELD |
7427 #undef READ_BYTE_FIELD | 7442 #undef READ_BYTE_FIELD |
7428 #undef WRITE_BYTE_FIELD | 7443 #undef WRITE_BYTE_FIELD |
7429 #undef NOBARRIER_READ_BYTE_FIELD | 7444 #undef NOBARRIER_READ_BYTE_FIELD |
7430 #undef NOBARRIER_WRITE_BYTE_FIELD | 7445 #undef NOBARRIER_WRITE_BYTE_FIELD |
7431 | 7446 |
7432 } } // namespace v8::internal | 7447 } } // namespace v8::internal |
7433 | 7448 |
7434 #endif // V8_OBJECTS_INL_H_ | 7449 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |