| 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 4085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4096 return OBJECT_POINTER_ALIGN(kHeaderSize + length); | 4096 return OBJECT_POINTER_ALIGN(kHeaderSize + length); |
| 4097 } | 4097 } |
| 4098 | 4098 |
| 4099 // Setter and getter | 4099 // Setter and getter |
| 4100 inline byte get(int index); | 4100 inline byte get(int index); |
| 4101 inline void set(int index, byte value); | 4101 inline void set(int index, byte value); |
| 4102 | 4102 |
| 4103 // Returns data start address. | 4103 // Returns data start address. |
| 4104 inline Address GetFirstBytecodeAddress(); | 4104 inline Address GetFirstBytecodeAddress(); |
| 4105 | 4105 |
| 4106 // Accessors for frame size and the number of locals | 4106 // Accessors for frame size. |
| 4107 inline int frame_size() const; | 4107 inline int frame_size() const; |
| 4108 inline void set_frame_size(int value); | 4108 inline void set_frame_size(int frame_size); |
| 4109 |
| 4110 // Accessors for parameter count (including implicit 'this' receiver). |
| 4111 inline int parameter_count() const; |
| 4112 inline void set_parameter_count(int number_of_parameters); |
| 4109 | 4113 |
| 4110 DECLARE_CAST(BytecodeArray) | 4114 DECLARE_CAST(BytecodeArray) |
| 4111 | 4115 |
| 4112 // Dispatched behavior. | 4116 // Dispatched behavior. |
| 4113 inline int BytecodeArraySize(); | 4117 inline int BytecodeArraySize(); |
| 4114 | 4118 |
| 4115 DECLARE_PRINTER(BytecodeArray) | 4119 DECLARE_PRINTER(BytecodeArray) |
| 4116 DECLARE_VERIFIER(BytecodeArray) | 4120 DECLARE_VERIFIER(BytecodeArray) |
| 4117 | 4121 |
| 4118 void Disassemble(std::ostream& os); | 4122 void Disassemble(std::ostream& os); |
| 4119 | 4123 |
| 4120 // Layout description. | 4124 // Layout description. |
| 4121 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; | 4125 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; |
| 4122 static const int kHeaderSize = kFrameSizeOffset + kIntSize; | 4126 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
| 4127 static const int kHeaderSize = kParameterSizeOffset + kIntSize; |
| 4123 | 4128 |
| 4124 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4129 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
| 4125 | 4130 |
| 4126 // Maximal memory consumption for a single BytecodeArray. | 4131 // Maximal memory consumption for a single BytecodeArray. |
| 4127 static const int kMaxSize = 512 * MB; | 4132 static const int kMaxSize = 512 * MB; |
| 4128 // Maximal length of a single BytecodeArray. | 4133 // Maximal length of a single BytecodeArray. |
| 4129 static const int kMaxLength = kMaxSize - kHeaderSize; | 4134 static const int kMaxLength = kMaxSize - kHeaderSize; |
| 4130 | 4135 |
| 4131 private: | 4136 private: |
| 4132 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); | 4137 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); |
| (...skipping 6162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10295 } else { | 10300 } else { |
| 10296 value &= ~(1 << bit_position); | 10301 value &= ~(1 << bit_position); |
| 10297 } | 10302 } |
| 10298 return value; | 10303 return value; |
| 10299 } | 10304 } |
| 10300 }; | 10305 }; |
| 10301 | 10306 |
| 10302 } } // namespace v8::internal | 10307 } } // namespace v8::internal |
| 10303 | 10308 |
| 10304 #endif // V8_OBJECTS_H_ | 10309 #endif // V8_OBJECTS_H_ |
| OLD | NEW |