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 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4373 // Accessor for register count (derived from frame_size). | 4373 // Accessor for register count (derived from frame_size). |
4374 inline int register_count() const; | 4374 inline int register_count() const; |
4375 | 4375 |
4376 // Accessors for parameter count (including implicit 'this' receiver). | 4376 // Accessors for parameter count (including implicit 'this' receiver). |
4377 inline int parameter_count() const; | 4377 inline int parameter_count() const; |
4378 inline void set_parameter_count(int number_of_parameters); | 4378 inline void set_parameter_count(int number_of_parameters); |
4379 | 4379 |
4380 // Accessors for the constant pool. | 4380 // Accessors for the constant pool. |
4381 DECL_ACCESSORS(constant_pool, FixedArray) | 4381 DECL_ACCESSORS(constant_pool, FixedArray) |
4382 | 4382 |
| 4383 // Accessors for handler table containing offsets of exception handlers. |
| 4384 DECL_ACCESSORS(handler_table, FixedArray) |
| 4385 |
4383 DECLARE_CAST(BytecodeArray) | 4386 DECLARE_CAST(BytecodeArray) |
4384 | 4387 |
4385 // Dispatched behavior. | 4388 // Dispatched behavior. |
4386 inline int BytecodeArraySize(); | 4389 inline int BytecodeArraySize(); |
4387 | 4390 |
4388 DECLARE_PRINTER(BytecodeArray) | 4391 DECLARE_PRINTER(BytecodeArray) |
4389 DECLARE_VERIFIER(BytecodeArray) | 4392 DECLARE_VERIFIER(BytecodeArray) |
4390 | 4393 |
4391 void Disassemble(std::ostream& os); | 4394 void Disassemble(std::ostream& os); |
4392 | 4395 |
4393 // Layout description. | 4396 // Layout description. |
4394 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; | 4397 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; |
4395 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4398 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
4396 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; | 4399 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; |
4397 static const int kHeaderSize = kConstantPoolOffset + kPointerSize; | 4400 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; |
| 4401 static const int kHeaderSize = kHandlerTableOffset + kPointerSize; |
4398 | 4402 |
4399 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4403 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
4400 | 4404 |
4401 // Maximal memory consumption for a single BytecodeArray. | 4405 // Maximal memory consumption for a single BytecodeArray. |
4402 static const int kMaxSize = 512 * MB; | 4406 static const int kMaxSize = 512 * MB; |
4403 // Maximal length of a single BytecodeArray. | 4407 // Maximal length of a single BytecodeArray. |
4404 static const int kMaxLength = kMaxSize - kHeaderSize; | 4408 static const int kMaxLength = kMaxSize - kHeaderSize; |
4405 | 4409 |
4406 class BodyDescriptor; | 4410 class BodyDescriptor; |
4407 | 4411 |
(...skipping 6334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10742 } | 10746 } |
10743 return value; | 10747 return value; |
10744 } | 10748 } |
10745 }; | 10749 }; |
10746 | 10750 |
10747 | 10751 |
10748 } // NOLINT, false-positive due to second-order macros. | 10752 } // NOLINT, false-positive due to second-order macros. |
10749 } // NOLINT, false-positive due to second-order macros. | 10753 } // NOLINT, false-positive due to second-order macros. |
10750 | 10754 |
10751 #endif // V8_OBJECTS_H_ | 10755 #endif // V8_OBJECTS_H_ |
OLD | NEW |