| 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 5127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5138 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | 5138 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 5139 } | 5139 } |
| 5140 | 5140 |
| 5141 inline void Code::set_is_promise_rejection(bool value) { | 5141 inline void Code::set_is_promise_rejection(bool value) { |
| 5142 DCHECK(kind() == BUILTIN); | 5142 DCHECK(kind() == BUILTIN); |
| 5143 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | 5143 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| 5144 int updated = IsPromiseRejectionField::update(previous, value); | 5144 int updated = IsPromiseRejectionField::update(previous, value); |
| 5145 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); | 5145 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
| 5146 } | 5146 } |
| 5147 | 5147 |
| 5148 inline bool Code::is_exception_caught() { |
| 5149 DCHECK(kind() == BUILTIN); |
| 5150 return IsExceptionCaughtField::decode( |
| 5151 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 5152 } |
| 5153 |
| 5154 inline void Code::set_is_exception_caught(bool value) { |
| 5155 DCHECK(kind() == BUILTIN); |
| 5156 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| 5157 int updated = IsExceptionCaughtField::update(previous, value); |
| 5158 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
| 5159 } |
| 5160 |
| 5148 bool Code::has_deoptimization_support() { | 5161 bool Code::has_deoptimization_support() { |
| 5149 DCHECK_EQ(FUNCTION, kind()); | 5162 DCHECK_EQ(FUNCTION, kind()); |
| 5150 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 5163 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
| 5151 return FullCodeFlagsHasDeoptimizationSupportField::decode(flags); | 5164 return FullCodeFlagsHasDeoptimizationSupportField::decode(flags); |
| 5152 } | 5165 } |
| 5153 | 5166 |
| 5154 | 5167 |
| 5155 void Code::set_has_deoptimization_support(bool value) { | 5168 void Code::set_has_deoptimization_support(bool value) { |
| 5156 DCHECK_EQ(FUNCTION, kind()); | 5169 DCHECK_EQ(FUNCTION, kind()); |
| 5157 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 5170 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
| (...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8466 #undef WRITE_INT64_FIELD | 8479 #undef WRITE_INT64_FIELD |
| 8467 #undef READ_BYTE_FIELD | 8480 #undef READ_BYTE_FIELD |
| 8468 #undef WRITE_BYTE_FIELD | 8481 #undef WRITE_BYTE_FIELD |
| 8469 #undef NOBARRIER_READ_BYTE_FIELD | 8482 #undef NOBARRIER_READ_BYTE_FIELD |
| 8470 #undef NOBARRIER_WRITE_BYTE_FIELD | 8483 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8471 | 8484 |
| 8472 } // namespace internal | 8485 } // namespace internal |
| 8473 } // namespace v8 | 8486 } // namespace v8 |
| 8474 | 8487 |
| 8475 #endif // V8_OBJECTS_INL_H_ | 8488 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |