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 5114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5125 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); | 5125 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
5126 } | 5126 } |
5127 | 5127 |
5128 inline void Code::set_is_construct_stub(bool value) { | 5128 inline void Code::set_is_construct_stub(bool value) { |
5129 DCHECK(kind() == BUILTIN); | 5129 DCHECK(kind() == BUILTIN); |
5130 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); | 5130 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
5131 int updated = IsConstructStubField::update(previous, value); | 5131 int updated = IsConstructStubField::update(previous, value); |
5132 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); | 5132 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
5133 } | 5133 } |
5134 | 5134 |
| 5135 inline bool Code::is_promise_rejection() { |
| 5136 DCHECK(kind() == BUILTIN); |
| 5137 return IsPromiseRejectionField::decode( |
| 5138 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
| 5139 } |
| 5140 |
| 5141 inline void Code::set_is_promise_rejection(bool value) { |
| 5142 DCHECK(kind() == BUILTIN); |
| 5143 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
| 5144 int updated = IsPromiseRejectionField::update(previous, value); |
| 5145 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
| 5146 } |
| 5147 |
5135 bool Code::has_deoptimization_support() { | 5148 bool Code::has_deoptimization_support() { |
5136 DCHECK_EQ(FUNCTION, kind()); | 5149 DCHECK_EQ(FUNCTION, kind()); |
5137 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 5150 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
5138 return FullCodeFlagsHasDeoptimizationSupportField::decode(flags); | 5151 return FullCodeFlagsHasDeoptimizationSupportField::decode(flags); |
5139 } | 5152 } |
5140 | 5153 |
5141 | 5154 |
5142 void Code::set_has_deoptimization_support(bool value) { | 5155 void Code::set_has_deoptimization_support(bool value) { |
5143 DCHECK_EQ(FUNCTION, kind()); | 5156 DCHECK_EQ(FUNCTION, kind()); |
5144 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); | 5157 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); |
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8450 #undef WRITE_INT64_FIELD | 8463 #undef WRITE_INT64_FIELD |
8451 #undef READ_BYTE_FIELD | 8464 #undef READ_BYTE_FIELD |
8452 #undef WRITE_BYTE_FIELD | 8465 #undef WRITE_BYTE_FIELD |
8453 #undef NOBARRIER_READ_BYTE_FIELD | 8466 #undef NOBARRIER_READ_BYTE_FIELD |
8454 #undef NOBARRIER_WRITE_BYTE_FIELD | 8467 #undef NOBARRIER_WRITE_BYTE_FIELD |
8455 | 8468 |
8456 } // namespace internal | 8469 } // namespace internal |
8457 } // namespace v8 | 8470 } // namespace v8 |
8458 | 8471 |
8459 #endif // V8_OBJECTS_INL_H_ | 8472 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |