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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 4102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4113 inline Address GetFirstBytecodeAddress(); | 4113 inline Address GetFirstBytecodeAddress(); |
4114 | 4114 |
4115 // Accessors for frame size. | 4115 // Accessors for frame size. |
4116 inline int frame_size() const; | 4116 inline int frame_size() const; |
4117 inline void set_frame_size(int frame_size); | 4117 inline void set_frame_size(int frame_size); |
4118 | 4118 |
4119 // Accessors for parameter count (including implicit 'this' receiver). | 4119 // Accessors for parameter count (including implicit 'this' receiver). |
4120 inline int parameter_count() const; | 4120 inline int parameter_count() const; |
4121 inline void set_parameter_count(int number_of_parameters); | 4121 inline void set_parameter_count(int number_of_parameters); |
4122 | 4122 |
| 4123 // Accessors for the constant pool. |
| 4124 DECL_ACCESSORS(constant_pool, FixedArray) |
| 4125 |
4123 DECLARE_CAST(BytecodeArray) | 4126 DECLARE_CAST(BytecodeArray) |
4124 | 4127 |
4125 // Dispatched behavior. | 4128 // Dispatched behavior. |
4126 inline int BytecodeArraySize(); | 4129 inline int BytecodeArraySize(); |
| 4130 inline void BytecodeArrayIterateBody(ObjectVisitor* v); |
4127 | 4131 |
4128 DECLARE_PRINTER(BytecodeArray) | 4132 DECLARE_PRINTER(BytecodeArray) |
4129 DECLARE_VERIFIER(BytecodeArray) | 4133 DECLARE_VERIFIER(BytecodeArray) |
4130 | 4134 |
4131 void Disassemble(std::ostream& os); | 4135 void Disassemble(std::ostream& os); |
4132 | 4136 |
4133 // Layout description. | 4137 // Layout description. |
4134 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; | 4138 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; |
4135 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4139 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
4136 static const int kHeaderSize = kParameterSizeOffset + kIntSize; | 4140 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; |
| 4141 static const int kHeaderSize = kConstantPoolOffset + kPointerSize; |
4137 | 4142 |
4138 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4143 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
4139 | 4144 |
4140 // Maximal memory consumption for a single BytecodeArray. | 4145 // Maximal memory consumption for a single BytecodeArray. |
4141 static const int kMaxSize = 512 * MB; | 4146 static const int kMaxSize = 512 * MB; |
4142 // Maximal length of a single BytecodeArray. | 4147 // Maximal length of a single BytecodeArray. |
4143 static const int kMaxLength = kMaxSize - kHeaderSize; | 4148 static const int kMaxLength = kMaxSize - kHeaderSize; |
4144 | 4149 |
4145 private: | 4150 private: |
4146 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); | 4151 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); |
(...skipping 6193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10340 } else { | 10345 } else { |
10341 value &= ~(1 << bit_position); | 10346 value &= ~(1 << bit_position); |
10342 } | 10347 } |
10343 return value; | 10348 return value; |
10344 } | 10349 } |
10345 }; | 10350 }; |
10346 | 10351 |
10347 } } // namespace v8::internal | 10352 } } // namespace v8::internal |
10348 | 10353 |
10349 #endif // V8_OBJECTS_H_ | 10354 #endif // V8_OBJECTS_H_ |
OLD | NEW |