| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 4358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4369 // Accessors for parameter count (including implicit 'this' receiver). | 4369 // Accessors for parameter count (including implicit 'this' receiver). |
| 4370 inline int parameter_count() const; | 4370 inline int parameter_count() const; |
| 4371 inline void set_parameter_count(int number_of_parameters); | 4371 inline void set_parameter_count(int number_of_parameters); |
| 4372 | 4372 |
| 4373 // Accessors for the constant pool. | 4373 // Accessors for the constant pool. |
| 4374 DECL_ACCESSORS(constant_pool, FixedArray) | 4374 DECL_ACCESSORS(constant_pool, FixedArray) |
| 4375 | 4375 |
| 4376 // Accessors for handler table containing offsets of exception handlers. | 4376 // Accessors for handler table containing offsets of exception handlers. |
| 4377 DECL_ACCESSORS(handler_table, FixedArray) | 4377 DECL_ACCESSORS(handler_table, FixedArray) |
| 4378 | 4378 |
| 4379 // Accessors for source position table containing mappings between byte code |
| 4380 // offset and source position. |
| 4381 DECL_ACCESSORS(source_position_table, FixedArray) |
| 4382 |
| 4379 DECLARE_CAST(BytecodeArray) | 4383 DECLARE_CAST(BytecodeArray) |
| 4380 | 4384 |
| 4381 // Dispatched behavior. | 4385 // Dispatched behavior. |
| 4382 inline int BytecodeArraySize(); | 4386 inline int BytecodeArraySize(); |
| 4383 | 4387 |
| 4384 DECLARE_PRINTER(BytecodeArray) | 4388 DECLARE_PRINTER(BytecodeArray) |
| 4385 DECLARE_VERIFIER(BytecodeArray) | 4389 DECLARE_VERIFIER(BytecodeArray) |
| 4386 | 4390 |
| 4387 void Disassemble(std::ostream& os); | 4391 void Disassemble(std::ostream& os); |
| 4388 | 4392 |
| 4389 // Layout description. | 4393 // Layout description. |
| 4390 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; | 4394 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; |
| 4391 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4395 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
| 4392 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; | 4396 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; |
| 4393 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; | 4397 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; |
| 4394 static const int kHeaderSize = kHandlerTableOffset + kPointerSize; | 4398 static const int kSourcePositionTableOffset = |
| 4399 kHandlerTableOffset + kPointerSize; |
| 4400 static const int kHeaderSize = kSourcePositionTableOffset + kPointerSize; |
| 4395 | 4401 |
| 4396 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4402 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
| 4397 | 4403 |
| 4398 // Maximal memory consumption for a single BytecodeArray. | 4404 // Maximal memory consumption for a single BytecodeArray. |
| 4399 static const int kMaxSize = 512 * MB; | 4405 static const int kMaxSize = 512 * MB; |
| 4400 // Maximal length of a single BytecodeArray. | 4406 // Maximal length of a single BytecodeArray. |
| 4401 static const int kMaxLength = kMaxSize - kHeaderSize; | 4407 static const int kMaxLength = kMaxSize - kHeaderSize; |
| 4402 | 4408 |
| 4403 class BodyDescriptor; | 4409 class BodyDescriptor; |
| 4404 | 4410 |
| (...skipping 6325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10730 } | 10736 } |
| 10731 return value; | 10737 return value; |
| 10732 } | 10738 } |
| 10733 }; | 10739 }; |
| 10734 | 10740 |
| 10735 | 10741 |
| 10736 } // NOLINT, false-positive due to second-order macros. | 10742 } // NOLINT, false-positive due to second-order macros. |
| 10737 } // NOLINT, false-positive due to second-order macros. | 10743 } // NOLINT, false-positive due to second-order macros. |
| 10738 | 10744 |
| 10739 #endif // V8_OBJECTS_H_ | 10745 #endif // V8_OBJECTS_H_ |
| OLD | NEW |