| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 1ef9703be013bb7790d1c1f494bb60ad0ea52e53..55b47394e572d94f070742be8e120f102cdf3725 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -4517,6 +4517,10 @@ class BytecodeArray : public FixedArrayBase {
|
| inline int interrupt_budget() const;
|
| inline void set_interrupt_budget(int interrupt_budget);
|
|
|
| + // Accessors for OSR loop nesting level.
|
| + inline int osr_loop_nesting_level() const;
|
| + inline void set_osr_loop_nesting_level(int depth);
|
| +
|
| // Accessors for the constant pool.
|
| DECL_ACCESSORS(constant_pool, FixedArray)
|
|
|
| @@ -4556,7 +4560,10 @@ class BytecodeArray : public FixedArrayBase {
|
| static const int kFrameSizeOffset = kSourcePositionTableOffset + kPointerSize;
|
| static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize;
|
| static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize;
|
| - static const int kHeaderSize = kInterruptBudgetOffset + kIntSize;
|
| + // TODO(4764): The OSR nesting level is guaranteed to be in [0;6] bounds and
|
| + // could potentially be merged with another field (e.g. parameter_size).
|
| + static const int kOSRNestingLevelOffset = kInterruptBudgetOffset + kIntSize;
|
| + static const int kHeaderSize = kOSRNestingLevelOffset + kIntSize;
|
|
|
| // Maximal memory consumption for a single BytecodeArray.
|
| static const int kMaxSize = 512 * MB;
|
| @@ -5358,10 +5365,6 @@ class Code: public HeapObject {
|
| static Handle<WeakCell> WeakCellFor(Handle<Code> code);
|
| WeakCell* CachedWeakCell();
|
|
|
| - // Max loop nesting marker used to postpose OSR. We don't take loop
|
| - // nesting that is deeper than 5 levels into account.
|
| - static const int kMaxLoopNestingMarker = 6;
|
| -
|
| static const int kConstantPoolSize =
|
| FLAG_enable_embedded_constant_pool ? kIntSize : 0;
|
|
|
| @@ -5465,7 +5468,6 @@ class Code: public HeapObject {
|
| kIsCrankshaftedBit + 1, 27> {}; // NOLINT
|
| class AllowOSRAtLoopNestingLevelField: public BitField<int,
|
| kIsCrankshaftedBit + 1 + 27, 4> {}; // NOLINT
|
| - STATIC_ASSERT(AllowOSRAtLoopNestingLevelField::kMax >= kMaxLoopNestingMarker);
|
|
|
| static const int kArgumentsBits = 16;
|
| static const int kMaxArguments = (1 << kArgumentsBits) - 1;
|
| @@ -5537,6 +5539,12 @@ class AbstractCode : public HeapObject {
|
| DECLARE_CAST(AbstractCode)
|
| inline Code* GetCode();
|
| inline BytecodeArray* GetBytecodeArray();
|
| +
|
| + // Max loop nesting marker used to postpose OSR. We don't take loop
|
| + // nesting that is deeper than 5 levels into account.
|
| + static const int kMaxLoopNestingMarker = 6;
|
| + STATIC_ASSERT(Code::AllowOSRAtLoopNestingLevelField::kMax >=
|
| + kMaxLoopNestingMarker);
|
| };
|
|
|
| // Dependent code is a singly linked list of fixed arrays. Each array contains
|
|
|