| 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 4443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4454 inline int frame_size() const; | 4454 inline int frame_size() const; |
| 4455 inline void set_frame_size(int frame_size); | 4455 inline void set_frame_size(int frame_size); |
| 4456 | 4456 |
| 4457 // Accessor for register count (derived from frame_size). | 4457 // Accessor for register count (derived from frame_size). |
| 4458 inline int register_count() const; | 4458 inline int register_count() const; |
| 4459 | 4459 |
| 4460 // Accessors for parameter count (including implicit 'this' receiver). | 4460 // Accessors for parameter count (including implicit 'this' receiver). |
| 4461 inline int parameter_count() const; | 4461 inline int parameter_count() const; |
| 4462 inline void set_parameter_count(int number_of_parameters); | 4462 inline void set_parameter_count(int number_of_parameters); |
| 4463 | 4463 |
| 4464 // Accessors for profiling count. |
| 4465 inline int profiling_count() const; |
| 4466 inline void set_profiling_count(int profiling_count_budget); |
| 4467 |
| 4464 // Accessors for the constant pool. | 4468 // Accessors for the constant pool. |
| 4465 DECL_ACCESSORS(constant_pool, FixedArray) | 4469 DECL_ACCESSORS(constant_pool, FixedArray) |
| 4466 | 4470 |
| 4467 // Accessors for handler table containing offsets of exception handlers. | 4471 // Accessors for handler table containing offsets of exception handlers. |
| 4468 DECL_ACCESSORS(handler_table, FixedArray) | 4472 DECL_ACCESSORS(handler_table, FixedArray) |
| 4469 | 4473 |
| 4470 // Accessors for source position table containing mappings between byte code | 4474 // Accessors for source position table containing mappings between byte code |
| 4471 // offset and source position. | 4475 // offset and source position. |
| 4472 DECL_ACCESSORS(source_position_table, FixedArray) | 4476 DECL_ACCESSORS(source_position_table, FixedArray) |
| 4473 | 4477 |
| 4474 DECLARE_CAST(BytecodeArray) | 4478 DECLARE_CAST(BytecodeArray) |
| 4475 | 4479 |
| 4476 // Dispatched behavior. | 4480 // Dispatched behavior. |
| 4477 inline int BytecodeArraySize(); | 4481 inline int BytecodeArraySize(); |
| 4478 | 4482 |
| 4479 inline int instruction_size(); | 4483 inline int instruction_size(); |
| 4480 | 4484 |
| 4481 int SourcePosition(int offset); | 4485 int SourcePosition(int offset); |
| 4482 int SourceStatementPosition(int offset); | 4486 int SourceStatementPosition(int offset); |
| 4483 | 4487 |
| 4484 DECLARE_PRINTER(BytecodeArray) | 4488 DECLARE_PRINTER(BytecodeArray) |
| 4485 DECLARE_VERIFIER(BytecodeArray) | 4489 DECLARE_VERIFIER(BytecodeArray) |
| 4486 | 4490 |
| 4487 void Disassemble(std::ostream& os); | 4491 void Disassemble(std::ostream& os); |
| 4488 | 4492 |
| 4489 // Layout description. | 4493 // Layout description. |
| 4490 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; | 4494 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; |
| 4491 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4495 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
| 4492 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; | 4496 static const int kProfilingCountOffset = kParameterSizeOffset + kIntSize; |
| 4497 static const int kConstantPoolOffset = kProfilingCountOffset + kIntSize; |
| 4493 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; | 4498 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; |
| 4494 static const int kSourcePositionTableOffset = | 4499 static const int kSourcePositionTableOffset = |
| 4495 kHandlerTableOffset + kPointerSize; | 4500 kHandlerTableOffset + kPointerSize; |
| 4496 static const int kHeaderSize = kSourcePositionTableOffset + kPointerSize; | 4501 static const int kHeaderSize = kSourcePositionTableOffset + kPointerSize; |
| 4497 | 4502 |
| 4498 // Maximal memory consumption for a single BytecodeArray. | 4503 // Maximal memory consumption for a single BytecodeArray. |
| 4499 static const int kMaxSize = 512 * MB; | 4504 static const int kMaxSize = 512 * MB; |
| 4500 // Maximal length of a single BytecodeArray. | 4505 // Maximal length of a single BytecodeArray. |
| 4501 static const int kMaxLength = kMaxSize - kHeaderSize; | 4506 static const int kMaxLength = kMaxSize - kHeaderSize; |
| 4502 | 4507 |
| (...skipping 6334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10837 } | 10842 } |
| 10838 return value; | 10843 return value; |
| 10839 } | 10844 } |
| 10840 }; | 10845 }; |
| 10841 | 10846 |
| 10842 | 10847 |
| 10843 } // NOLINT, false-positive due to second-order macros. | 10848 } // NOLINT, false-positive due to second-order macros. |
| 10844 } // NOLINT, false-positive due to second-order macros. | 10849 } // NOLINT, false-positive due to second-order macros. |
| 10845 | 10850 |
| 10846 #endif // V8_OBJECTS_H_ | 10851 #endif // V8_OBJECTS_H_ |
| OLD | NEW |