| 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 4093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4104 inline Address GetFirstBytecodeAddress(); | 4104 inline Address GetFirstBytecodeAddress(); |
| 4105 | 4105 |
| 4106 // Accessors for frame size. | 4106 // Accessors for frame size. |
| 4107 inline int frame_size() const; | 4107 inline int frame_size() const; |
| 4108 inline void set_frame_size(int frame_size); | 4108 inline void set_frame_size(int frame_size); |
| 4109 | 4109 |
| 4110 // Accessors for parameter count (including implicit 'this' receiver). | 4110 // Accessors for parameter count (including implicit 'this' receiver). |
| 4111 inline int parameter_count() const; | 4111 inline int parameter_count() const; |
| 4112 inline void set_parameter_count(int number_of_parameters); | 4112 inline void set_parameter_count(int number_of_parameters); |
| 4113 | 4113 |
| 4114 // Accessors for the constant pool. |
| 4115 DECL_ACCESSORS(constant_pool, FixedArray) |
| 4116 |
| 4114 DECLARE_CAST(BytecodeArray) | 4117 DECLARE_CAST(BytecodeArray) |
| 4115 | 4118 |
| 4116 // Dispatched behavior. | 4119 // Dispatched behavior. |
| 4117 inline int BytecodeArraySize(); | 4120 inline int BytecodeArraySize(); |
| 4121 inline void BytecodeArrayIterateBody(ObjectVisitor* v); |
| 4118 | 4122 |
| 4119 DECLARE_PRINTER(BytecodeArray) | 4123 DECLARE_PRINTER(BytecodeArray) |
| 4120 DECLARE_VERIFIER(BytecodeArray) | 4124 DECLARE_VERIFIER(BytecodeArray) |
| 4121 | 4125 |
| 4122 void Disassemble(std::ostream& os); | 4126 void Disassemble(std::ostream& os); |
| 4123 | 4127 |
| 4124 // Layout description. | 4128 // Layout description. |
| 4125 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; | 4129 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; |
| 4126 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4130 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
| 4127 static const int kHeaderSize = kParameterSizeOffset + kIntSize; | 4131 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; |
| 4132 static const int kHeaderSize = kConstantPoolOffset + kPointerSize; |
| 4128 | 4133 |
| 4129 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4134 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
| 4130 | 4135 |
| 4131 // Maximal memory consumption for a single BytecodeArray. | 4136 // Maximal memory consumption for a single BytecodeArray. |
| 4132 static const int kMaxSize = 512 * MB; | 4137 static const int kMaxSize = 512 * MB; |
| 4133 // Maximal length of a single BytecodeArray. | 4138 // Maximal length of a single BytecodeArray. |
| 4134 static const int kMaxLength = kMaxSize - kHeaderSize; | 4139 static const int kMaxLength = kMaxSize - kHeaderSize; |
| 4135 | 4140 |
| 4136 private: | 4141 private: |
| 4137 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); | 4142 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); |
| (...skipping 6162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10300 } else { | 10305 } else { |
| 10301 value &= ~(1 << bit_position); | 10306 value &= ~(1 << bit_position); |
| 10302 } | 10307 } |
| 10303 return value; | 10308 return value; |
| 10304 } | 10309 } |
| 10305 }; | 10310 }; |
| 10306 | 10311 |
| 10307 } } // namespace v8::internal | 10312 } } // namespace v8::internal |
| 10308 | 10313 |
| 10309 #endif // V8_OBJECTS_H_ | 10314 #endif // V8_OBJECTS_H_ |
| OLD | NEW |