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