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 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3873 | 3873 |
3874 | 3874 |
3875 void BytecodeArray::set_parameter_count(int number_of_parameters) { | 3875 void BytecodeArray::set_parameter_count(int number_of_parameters) { |
3876 DCHECK_GE(number_of_parameters, 0); | 3876 DCHECK_GE(number_of_parameters, 0); |
3877 // Parameter count is stored as the size on stack of the parameters to allow | 3877 // Parameter count is stored as the size on stack of the parameters to allow |
3878 // it to be used directly by generated code. | 3878 // it to be used directly by generated code. |
3879 WRITE_INT_FIELD(this, kParameterSizeOffset, | 3879 WRITE_INT_FIELD(this, kParameterSizeOffset, |
3880 (number_of_parameters << kPointerSizeLog2)); | 3880 (number_of_parameters << kPointerSizeLog2)); |
3881 } | 3881 } |
3882 | 3882 |
| 3883 int BytecodeArray::interrupt_budget() const { |
| 3884 return READ_INT_FIELD(this, kInterruptBudgetOffset); |
| 3885 } |
| 3886 |
| 3887 void BytecodeArray::set_interrupt_budget(int interrupt_budget) { |
| 3888 DCHECK_GE(interrupt_budget, 0); |
| 3889 WRITE_INT_FIELD(this, kInterruptBudgetOffset, interrupt_budget); |
| 3890 } |
3883 | 3891 |
3884 int BytecodeArray::parameter_count() const { | 3892 int BytecodeArray::parameter_count() const { |
3885 // Parameter count is stored as the size on stack of the parameters to allow | 3893 // Parameter count is stored as the size on stack of the parameters to allow |
3886 // it to be used directly by generated code. | 3894 // it to be used directly by generated code. |
3887 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; | 3895 return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2; |
3888 } | 3896 } |
3889 | 3897 |
3890 | 3898 |
3891 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) | 3899 ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) |
3892 ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset) | 3900 ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset) |
(...skipping 3780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7673 #undef WRITE_INT64_FIELD | 7681 #undef WRITE_INT64_FIELD |
7674 #undef READ_BYTE_FIELD | 7682 #undef READ_BYTE_FIELD |
7675 #undef WRITE_BYTE_FIELD | 7683 #undef WRITE_BYTE_FIELD |
7676 #undef NOBARRIER_READ_BYTE_FIELD | 7684 #undef NOBARRIER_READ_BYTE_FIELD |
7677 #undef NOBARRIER_WRITE_BYTE_FIELD | 7685 #undef NOBARRIER_WRITE_BYTE_FIELD |
7678 | 7686 |
7679 } // namespace internal | 7687 } // namespace internal |
7680 } // namespace v8 | 7688 } // namespace v8 |
7681 | 7689 |
7682 #endif // V8_OBJECTS_INL_H_ | 7690 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |