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/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 4497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4508 inline int register_count() const; | 4508 inline int register_count() const; |
4509 | 4509 |
4510 // Accessors for parameter count (including implicit 'this' receiver). | 4510 // Accessors for parameter count (including implicit 'this' receiver). |
4511 inline int parameter_count() const; | 4511 inline int parameter_count() const; |
4512 inline void set_parameter_count(int number_of_parameters); | 4512 inline void set_parameter_count(int number_of_parameters); |
4513 | 4513 |
4514 // Accessors for profiling count. | 4514 // Accessors for profiling count. |
4515 inline int interrupt_budget() const; | 4515 inline int interrupt_budget() const; |
4516 inline void set_interrupt_budget(int interrupt_budget); | 4516 inline void set_interrupt_budget(int interrupt_budget); |
4517 | 4517 |
4518 // Accessors for OSR loop nesting level. | |
4519 inline int osr_loop_nesting_level() const; | |
4520 inline void set_osr_loop_nesting_level(int depth); | |
4521 | |
4518 // Accessors for the constant pool. | 4522 // Accessors for the constant pool. |
4519 DECL_ACCESSORS(constant_pool, FixedArray) | 4523 DECL_ACCESSORS(constant_pool, FixedArray) |
4520 | 4524 |
4521 // Accessors for handler table containing offsets of exception handlers. | 4525 // Accessors for handler table containing offsets of exception handlers. |
4522 DECL_ACCESSORS(handler_table, FixedArray) | 4526 DECL_ACCESSORS(handler_table, FixedArray) |
4523 | 4527 |
4524 // Accessors for source position table containing mappings between byte code | 4528 // Accessors for source position table containing mappings between byte code |
4525 // offset and source position. | 4529 // offset and source position. |
4526 DECL_ACCESSORS(source_position_table, ByteArray) | 4530 DECL_ACCESSORS(source_position_table, ByteArray) |
4527 | 4531 |
(...skipping 19 matching lines...) Expand all Loading... | |
4547 void CopyBytecodesTo(BytecodeArray* to); | 4551 void CopyBytecodesTo(BytecodeArray* to); |
4548 | 4552 |
4549 // Layout description. | 4553 // Layout description. |
4550 static const int kConstantPoolOffset = FixedArrayBase::kHeaderSize; | 4554 static const int kConstantPoolOffset = FixedArrayBase::kHeaderSize; |
4551 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; | 4555 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; |
4552 static const int kSourcePositionTableOffset = | 4556 static const int kSourcePositionTableOffset = |
4553 kHandlerTableOffset + kPointerSize; | 4557 kHandlerTableOffset + kPointerSize; |
4554 static const int kFrameSizeOffset = kSourcePositionTableOffset + kPointerSize; | 4558 static const int kFrameSizeOffset = kSourcePositionTableOffset + kPointerSize; |
4555 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4559 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
4556 static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize; | 4560 static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize; |
4557 static const int kHeaderSize = kInterruptBudgetOffset + kIntSize; | 4561 static const int kOSRNestingLevelOffset = kInterruptBudgetOffset + kIntSize; |
4562 static const int kHeaderSize = kOSRNestingLevelOffset + kIntSize; | |
rmcilroy
2016/07/22 09:46:01
The OSR nesting level is always less than a byte (
Michael Starzinger
2016/07/25 10:24:42
As discussed offline: Yes, the OSR nesting level i
rmcilroy
2016/07/25 11:14:47
Yeah this is an issue I hadn't thought of. We cou
Michael Starzinger
2016/07/25 11:21:28
Done.
| |
4558 | 4563 |
4559 // Maximal memory consumption for a single BytecodeArray. | 4564 // Maximal memory consumption for a single BytecodeArray. |
4560 static const int kMaxSize = 512 * MB; | 4565 static const int kMaxSize = 512 * MB; |
4561 // Maximal length of a single BytecodeArray. | 4566 // Maximal length of a single BytecodeArray. |
4562 static const int kMaxLength = kMaxSize - kHeaderSize; | 4567 static const int kMaxLength = kMaxSize - kHeaderSize; |
4563 | 4568 |
4564 class BodyDescriptor; | 4569 class BodyDescriptor; |
4565 | 4570 |
4566 private: | 4571 private: |
4567 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); | 4572 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); |
(...skipping 6427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10995 } | 11000 } |
10996 return value; | 11001 return value; |
10997 } | 11002 } |
10998 }; | 11003 }; |
10999 | 11004 |
11000 | 11005 |
11001 } // NOLINT, false-positive due to second-order macros. | 11006 } // NOLINT, false-positive due to second-order macros. |
11002 } // NOLINT, false-positive due to second-order macros. | 11007 } // NOLINT, false-positive due to second-order macros. |
11003 | 11008 |
11004 #endif // V8_OBJECTS_H_ | 11009 #endif // V8_OBJECTS_H_ |
OLD | NEW |