| 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 4081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4092 int BytecodeArray::interrupt_budget() const { | 4092 int BytecodeArray::interrupt_budget() const { |
| 4093 return READ_INT_FIELD(this, kInterruptBudgetOffset); | 4093 return READ_INT_FIELD(this, kInterruptBudgetOffset); |
| 4094 } | 4094 } |
| 4095 | 4095 |
| 4096 void BytecodeArray::set_interrupt_budget(int interrupt_budget) { | 4096 void BytecodeArray::set_interrupt_budget(int interrupt_budget) { |
| 4097 DCHECK_GE(interrupt_budget, 0); | 4097 DCHECK_GE(interrupt_budget, 0); |
| 4098 WRITE_INT_FIELD(this, kInterruptBudgetOffset, interrupt_budget); | 4098 WRITE_INT_FIELD(this, kInterruptBudgetOffset, interrupt_budget); |
| 4099 } | 4099 } |
| 4100 | 4100 |
| 4101 int BytecodeArray::osr_loop_nesting_level() const { | 4101 int BytecodeArray::osr_loop_nesting_level() const { |
| 4102 return READ_INT_FIELD(this, kOSRNestingLevelOffset); | 4102 return READ_INT8_FIELD(this, kOSRNestingLevelOffset); |
| 4103 } | 4103 } |
| 4104 | 4104 |
| 4105 void BytecodeArray::set_osr_loop_nesting_level(int depth) { | 4105 void BytecodeArray::set_osr_loop_nesting_level(int depth) { |
| 4106 DCHECK(0 <= depth && depth <= AbstractCode::kMaxLoopNestingMarker); | 4106 DCHECK(0 <= depth && depth <= AbstractCode::kMaxLoopNestingMarker); |
| 4107 WRITE_INT_FIELD(this, kOSRNestingLevelOffset, depth); | 4107 STATIC_ASSERT(AbstractCode::kMaxLoopNestingMarker < kMaxInt8); |
| 4108 WRITE_INT8_FIELD(this, kOSRNestingLevelOffset, depth); |
| 4108 } | 4109 } |
| 4109 | 4110 |
| 4110 int BytecodeArray::parameter_count() const { | 4111 int BytecodeArray::parameter_count() const { |
| 4111 // Parameter count is stored as the size on stack of the parameters to allow | 4112 // Parameter count is stored as the size on stack of the parameters to allow |
| 4112 // it to be used directly by generated code. | 4113 // it to be used directly by generated code. |
| 4113 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; | 4114 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; |
| 4114 } | 4115 } |
| 4115 | 4116 |
| 4116 | 4117 |
| 4117 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) | 4118 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) |
| (...skipping 4008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8126 #undef WRITE_INT64_FIELD | 8127 #undef WRITE_INT64_FIELD |
| 8127 #undef READ_BYTE_FIELD | 8128 #undef READ_BYTE_FIELD |
| 8128 #undef WRITE_BYTE_FIELD | 8129 #undef WRITE_BYTE_FIELD |
| 8129 #undef NOBARRIER_READ_BYTE_FIELD | 8130 #undef NOBARRIER_READ_BYTE_FIELD |
| 8130 #undef NOBARRIER_WRITE_BYTE_FIELD | 8131 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8131 | 8132 |
| 8132 } // namespace internal | 8133 } // namespace internal |
| 8133 } // namespace v8 | 8134 } // namespace v8 |
| 8134 | 8135 |
| 8135 #endif // V8_OBJECTS_INL_H_ | 8136 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |