| 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 4523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4534 | 4534 |
| 4535 | 4535 |
| 4536 void Code::set_has_debug_break_slots(bool value) { | 4536 void Code::set_has_debug_break_slots(bool value) { |
| 4537 DCHECK_EQ(FUNCTION, kind()); | 4537 DCHECK_EQ(FUNCTION, kind()); |
| 4538 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 4538 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
| 4539 flags = FullCodeFlagsHasDebugBreakSlotsField::update(flags, value); | 4539 flags = FullCodeFlagsHasDebugBreakSlotsField::update(flags, value); |
| 4540 WRITE_UINT32_FIELD(this, kFullCodeFlags, flags); | 4540 WRITE_UINT32_FIELD(this, kFullCodeFlags, flags); |
| 4541 } | 4541 } |
| 4542 | 4542 |
| 4543 | 4543 |
| 4544 bool Code::is_compiled_optimizable() { | |
| 4545 DCHECK_EQ(FUNCTION, kind()); | |
| 4546 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | |
| 4547 return FullCodeFlagsIsCompiledOptimizable::decode(flags); | |
| 4548 } | |
| 4549 | |
| 4550 | |
| 4551 void Code::set_compiled_optimizable(bool value) { | |
| 4552 DCHECK_EQ(FUNCTION, kind()); | |
| 4553 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | |
| 4554 flags = FullCodeFlagsIsCompiledOptimizable::update(flags, value); | |
| 4555 WRITE_UINT32_FIELD(this, kFullCodeFlags, flags); | |
| 4556 } | |
| 4557 | |
| 4558 | |
| 4559 bool Code::has_reloc_info_for_serialization() { | 4544 bool Code::has_reloc_info_for_serialization() { |
| 4560 DCHECK_EQ(FUNCTION, kind()); | 4545 DCHECK_EQ(FUNCTION, kind()); |
| 4561 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 4546 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
| 4562 return FullCodeFlagsHasRelocInfoForSerialization::decode(flags); | 4547 return FullCodeFlagsHasRelocInfoForSerialization::decode(flags); |
| 4563 } | 4548 } |
| 4564 | 4549 |
| 4565 | 4550 |
| 4566 void Code::set_has_reloc_info_for_serialization(bool value) { | 4551 void Code::set_has_reloc_info_for_serialization(bool value) { |
| 4567 DCHECK_EQ(FUNCTION, kind()); | 4552 DCHECK_EQ(FUNCTION, kind()); |
| 4568 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 4553 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
| (...skipping 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7313 #undef READ_SHORT_FIELD | 7298 #undef READ_SHORT_FIELD |
| 7314 #undef WRITE_SHORT_FIELD | 7299 #undef WRITE_SHORT_FIELD |
| 7315 #undef READ_BYTE_FIELD | 7300 #undef READ_BYTE_FIELD |
| 7316 #undef WRITE_BYTE_FIELD | 7301 #undef WRITE_BYTE_FIELD |
| 7317 #undef NOBARRIER_READ_BYTE_FIELD | 7302 #undef NOBARRIER_READ_BYTE_FIELD |
| 7318 #undef NOBARRIER_WRITE_BYTE_FIELD | 7303 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7319 | 7304 |
| 7320 } } // namespace v8::internal | 7305 } } // namespace v8::internal |
| 7321 | 7306 |
| 7322 #endif // V8_OBJECTS_INL_H_ | 7307 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |