| 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 4069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4080 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize))); | 4080 DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize))); |
| 4081 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size); | 4081 WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size); |
| 4082 } | 4082 } |
| 4083 | 4083 |
| 4084 | 4084 |
| 4085 int BytecodeArray::frame_size() const { | 4085 int BytecodeArray::frame_size() const { |
| 4086 return READ_INT_FIELD(this, kFrameSizeOffset); | 4086 return READ_INT_FIELD(this, kFrameSizeOffset); |
| 4087 } | 4087 } |
| 4088 | 4088 |
| 4089 | 4089 |
| 4090 int BytecodeArray::local_count() const { return frame_size() / kPointerSize; } |
| 4091 |
| 4092 |
| 4090 void BytecodeArray::set_parameter_count(int number_of_parameters) { | 4093 void BytecodeArray::set_parameter_count(int number_of_parameters) { |
| 4091 DCHECK_GE(number_of_parameters, 0); | 4094 DCHECK_GE(number_of_parameters, 0); |
| 4092 // Parameter count is stored as the size on stack of the parameters to allow | 4095 // Parameter count is stored as the size on stack of the parameters to allow |
| 4093 // it to be used directly by generated code. | 4096 // it to be used directly by generated code. |
| 4094 WRITE_INT_FIELD(this, kParameterSizeOffset, | 4097 WRITE_INT_FIELD(this, kParameterSizeOffset, |
| 4095 (number_of_parameters << kPointerSizeLog2)); | 4098 (number_of_parameters << kPointerSizeLog2)); |
| 4096 } | 4099 } |
| 4097 | 4100 |
| 4098 | 4101 |
| 4099 int BytecodeArray::parameter_count() const { | 4102 int BytecodeArray::parameter_count() const { |
| (...skipping 3791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7891 #undef READ_INT64_FIELD | 7894 #undef READ_INT64_FIELD |
| 7892 #undef WRITE_INT64_FIELD | 7895 #undef WRITE_INT64_FIELD |
| 7893 #undef READ_BYTE_FIELD | 7896 #undef READ_BYTE_FIELD |
| 7894 #undef WRITE_BYTE_FIELD | 7897 #undef WRITE_BYTE_FIELD |
| 7895 #undef NOBARRIER_READ_BYTE_FIELD | 7898 #undef NOBARRIER_READ_BYTE_FIELD |
| 7896 #undef NOBARRIER_WRITE_BYTE_FIELD | 7899 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7897 | 7900 |
| 7898 } } // namespace v8::internal | 7901 } } // namespace v8::internal |
| 7899 | 7902 |
| 7900 #endif // V8_OBJECTS_INL_H_ | 7903 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |