[interpreter] Move function-entry stack check to start of bytecode array

The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.

  0 : af fb 00 01       SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
  4 : 27 fe fa          Mov <closure>, r1
  7 : 27 02 f9          Mov <this>, r2
 10 : 64 0a fa 02       InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
 14 : 26 fb             Star r0
 16 : a7                StackCheck
 17 : b0 fb fb 01 00    SuspendGenerator r0, r0-r0, [0]
 22 : b1 fb fb 01       ResumeGenerator r0, r0-r0
                        [... no stack check here ...]

This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.

Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
This commit is contained in:
Jakob Gruber 2019-11-11 14:34:07 +01:00 committed by Commit Bot
parent 421eaeefb9
commit cebfde6769
34 changed files with 194 additions and 166 deletions

View File

@ -1188,6 +1188,9 @@ void BytecodeGenerator::GenerateBytecode(uintptr_t stack_limit) {
AllocateTopLevelRegisters();
// Perform a stack-check before the body.
builder()->StackCheck(info()->literal()->start_position());
if (info()->literal()->CanSuspend()) {
BuildGeneratorPrologue();
}
@ -1252,9 +1255,6 @@ void BytecodeGenerator::GenerateBytecodeBody() {
// Emit initializing assignments for module namespace imports (if any).
VisitModuleNamespaceImports();
// Perform a stack-check before the body.
builder()->StackCheck(literal->start_position());
// The derived constructor case is handled in VisitCallSuper.
if (IsBaseConstructor(function_kind())) {
if (literal->requires_brand_initialization()) {

View File

@ -16,12 +16,12 @@ frame size: 8
parameter count: 1
bytecode array length: 148
bytecodes: [
/* 17 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star), R(0),
/* 17 E> */ B(StackCheck),
B(Mov), R(context), R(3),
B(Mov), R(context), R(4),
B(Ldar), R(0),
@ -84,7 +84,7 @@ bytecodes: [
/* 22 S> */ B(Return),
]
constant pool: [
Smi [30],
Smi [29],
Smi [16],
Smi [7],
SCOPE_INFO_TYPE,
@ -106,12 +106,12 @@ frame size: 8
parameter count: 1
bytecode array length: 193
bytecodes: [
/* 17 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star), R(0),
/* 17 E> */ B(StackCheck),
B(Mov), R(context), R(3),
B(Mov), R(context), R(4),
B(Ldar), R(0),
@ -191,8 +191,8 @@ bytecodes: [
/* 31 S> */ B(Return),
]
constant pool: [
Smi [30],
Smi [75],
Smi [29],
Smi [74],
Smi [16],
Smi [7],
Smi [16],
@ -216,12 +216,12 @@ frame size: 19
parameter count: 1
bytecode array length: 357
bytecodes: [
/* 17 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star), R(0),
/* 17 E> */ B(StackCheck),
B(Mov), R(context), R(6),
B(Mov), R(context), R(7),
B(Ldar), R(0),
@ -371,8 +371,8 @@ bytecodes: [
/* 50 S> */ B(Return),
]
constant pool: [
Smi [30],
Smi [136],
Smi [29],
Smi [135],
Smi [16],
Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
@ -408,12 +408,12 @@ frame size: 17
parameter count: 1
bytecode array length: 467
bytecodes: [
/* 44 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star), R(0),
/* 44 E> */ B(StackCheck),
B(Mov), R(context), R(3),
B(Mov), R(context), R(4),
B(Ldar), R(0),
@ -592,11 +592,11 @@ bytecodes: [
/* 60 S> */ B(Return),
]
constant pool: [
Smi [30],
Smi [158],
Smi [230],
Smi [280],
Smi [339],
Smi [29],
Smi [157],
Smi [229],
Smi [279],
Smi [338],
Smi [16],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],

View File

@ -16,6 +16,7 @@ frame size: 8
parameter count: 2
bytecode array length: 142
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(LdaConstant), U8(2),
B(Star), R(3),
@ -26,7 +27,6 @@ bytecodes: [
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(3), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -76,8 +76,8 @@ bytecodes: [
/* 10 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [80],
Smi [35],
Smi [79],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -95,6 +95,7 @@ frame size: 8
parameter count: 2
bytecode array length: 152
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(LdaConstant), U8(2),
B(Star), R(3),
@ -105,7 +106,6 @@ bytecodes: [
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(3), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -158,8 +158,8 @@ bytecodes: [
/* 21 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [90],
Smi [35],
Smi [89],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -182,6 +182,7 @@ frame size: 9
parameter count: 2
bytecode array length: 153
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(LdaConstant), U8(2),
B(Star), R(4),
@ -194,7 +195,6 @@ bytecodes: [
B(Star), R(0),
B(CreateClosure), U8(3), U8(0), U8(0),
B(Star), R(1),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
@ -246,8 +246,8 @@ bytecodes: [
/* 54 S> */ B(Return),
]
constant pool: [
Smi [44],
Smi [88],
Smi [43],
Smi [87],
SCOPE_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
Smi [10],
@ -267,6 +267,7 @@ frame size: 9
parameter count: 2
bytecode array length: 164
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(LdaConstant), U8(2),
B(Star), R(4),
@ -281,7 +282,6 @@ bytecodes: [
B(Star), R(4),
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(4), U8(1),
B(Star), R(1),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
@ -335,8 +335,8 @@ bytecodes: [
/* 49 S> */ B(Return),
]
constant pool: [
Smi [48],
Smi [102],
Smi [47],
Smi [101],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],

View File

@ -143,11 +143,11 @@ frame size: 4
parameter count: 1
bytecode array length: 53
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
B(CreateBlockContext), U8(1),

View File

@ -13,6 +13,7 @@ frame size: 10
parameter count: 1
bytecode array length: 75
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -21,7 +22,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
/* 36 E> */ B(StaLookupSlot), U8(2), U8(0),
/* 52 S> */ B(LdaLookupGlobalSlot), U8(3), U8(0), U8(1),

View File

@ -24,8 +24,8 @@ frame size: 6
parameter count: 1
bytecode array length: 34
bytecodes: [
B(Mov), R(closure), R(0),
/* 99 E> */ B(StackCheck),
B(Mov), R(closure), R(0),
/* 104 S> */ B(LdaConstant), U8(0),
/* 111 E> */ B(LdaKeyedProperty), R(closure), U8(1),
B(Star), R(4),
@ -64,8 +64,8 @@ frame size: 5
parameter count: 1
bytecode array length: 47
bytecodes: [
B(Mov), R(closure), R(0),
/* 125 E> */ B(StackCheck),
B(Mov), R(closure), R(0),
/* 130 S> */ B(LdaConstant), U8(0),
/* 130 E> */ B(LdaKeyedProperty), R(closure), U8(0),
B(Star), R(2),
@ -108,8 +108,8 @@ frame size: 6
parameter count: 1
bytecode array length: 40
bytecodes: [
B(Mov), R(closure), R(1),
/* 113 E> */ B(StackCheck),
B(Mov), R(closure), R(1),
/* 118 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(3),
B(LdaSmi), I8(1),
@ -151,8 +151,8 @@ frame size: 5
parameter count: 1
bytecode array length: 36
bytecodes: [
B(Mov), R(closure), R(1),
/* 112 E> */ B(StackCheck),
B(Mov), R(closure), R(1),
/* 117 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(3),
B(Ldar), R(0),

View File

@ -96,9 +96,9 @@ frame size: 11
parameter count: 1
bytecode array length: 84
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(2),
B(PushContext), R(1),
/* 30 E> */ B(StackCheck),
/* 43 S> */ B(LdaConstant), U8(1),
/* 43 E> */ B(StaCurrentContextSlot), U8(2),
/* 57 S> */ B(LdaConstant), U8(2),
@ -155,9 +155,9 @@ frame size: 7
parameter count: 1
bytecode array length: 49
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
/* 30 E> */ B(StackCheck),
/* 46 S> */ B(LdaZero),
/* 46 E> */ B(StaCurrentContextSlot), U8(2),
B(CreateBlockContext), U8(1),

View File

@ -104,9 +104,9 @@ frame size: 1
parameter count: 1
bytecode array length: 23
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 45 S> */ B(CreateClosure), U8(1), U8(0), U8(2),

View File

@ -50,9 +50,9 @@ frame size: 2
parameter count: 1
bytecode array length: 21
bytecodes: [
/* 30 E> */ B(StackCheck),
B(LdaTheHole),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Ldar), R(0),

View File

@ -13,11 +13,11 @@ frame size: 1
parameter count: 1
bytecode array length: 15
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
/* 44 E> */ B(StaCurrentContextSlot), U8(2),
B(LdaUndefined),
@ -37,11 +37,11 @@ frame size: 1
parameter count: 1
bytecode array length: 16
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
/* 44 E> */ B(StaCurrentContextSlot), U8(2),
/* 74 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
@ -61,11 +61,11 @@ frame size: 2
parameter count: 1
bytecode array length: 26
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(LdaCurrentContextSlot), U8(2),
@ -90,11 +90,11 @@ frame size: 1
parameter count: 1
bytecode array length: 22
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
/* 44 E> */ B(StaCurrentContextSlot), U8(2),
/* 48 S> */ B(LdaSmi), I8(20),

View File

@ -15,11 +15,11 @@ frame size: 1
parameter count: 2
bytecode array length: 15
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
/* 10 E> */ B(StackCheck),
/* 19 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
/* 51 S> */ B(Return),
]
@ -39,11 +39,11 @@ frame size: 2
parameter count: 2
bytecode array length: 19
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
/* 10 E> */ B(StackCheck),
/* 27 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(0),
/* 53 S> */ B(LdaCurrentContextSlot), U8(2),
@ -65,13 +65,13 @@ frame size: 1
parameter count: 5
bytecode array length: 19
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(2),
B(PushContext), R(0),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(3),
B(Ldar), R(arg2),
B(StaCurrentContextSlot), U8(2),
/* 10 E> */ B(StackCheck),
/* 29 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
/* 60 S> */ B(Return),
]
@ -91,9 +91,9 @@ frame size: 1
parameter count: 1
bytecode array length: 15
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 10 E> */ B(StackCheck),
/* 26 S> */ B(Ldar), R(this),
/* 26 E> */ B(StaCurrentContextSlot), U8(2),
/* 32 S> */ B(CreateClosure), U8(1), U8(0), U8(2),

View File

@ -13,9 +13,9 @@ frame size: 1
parameter count: 1
bytecode array length: 11
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
/* 41 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
/* 70 S> */ B(Return),
]
@ -34,9 +34,9 @@ frame size: 1
parameter count: 1
bytecode array length: 15
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 45 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
@ -57,9 +57,9 @@ frame size: 1
parameter count: 1
bytecode array length: 19
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(2),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 53 S> */ B(LdaSmi), I8(2),
@ -82,9 +82,9 @@ frame size: 2
parameter count: 1
bytecode array length: 18
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
/* 41 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
B(Star), R(1),
/* 64 E> */ B(CallUndefinedReceiver0), R(1), U8(0),
@ -108,11 +108,11 @@ frame size: 2
parameter count: 1
bytecode array length: 29
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 56 S> */ B(LdaSmi), I8(1),
/* 56 E> */ B(StaCurrentContextSlot), U8(2),
B(CreateBlockContext), U8(1),
@ -395,6 +395,7 @@ frame size: 3
parameter count: 1
bytecode array length: 797
bytecodes: [
/* 30 E> */ B(StackCheck),
B(Wide), B(CreateFunctionContext), U16(0), U16(256),
B(PushContext), R(1),
B(Ldar), R(this),
@ -403,7 +404,6 @@ bytecodes: [
B(Wide), B(StaCurrentContextSlot), U16(257),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(3),
/* 30 E> */ B(StackCheck),
/* 59 S> */ B(LdaZero),
/* 59 E> */ B(StaCurrentContextSlot), U8(4),
/* 73 S> */ B(LdaZero),

View File

@ -209,9 +209,9 @@ frame size: 2
parameter count: 1
bytecode array length: 23
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 53 S> */ B(CreateClosure), U8(1), U8(0), U8(2),
@ -236,9 +236,9 @@ frame size: 3
parameter count: 1
bytecode array length: 29
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 53 S> */ B(CreateClosure), U8(1), U8(0), U8(2),

View File

@ -15,9 +15,9 @@ frame size: 1
parameter count: 1
bytecode array length: 5
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 32 S> */ B(Return),
]
constant pool: [
@ -34,9 +34,9 @@ frame size: 1
parameter count: 1
bytecode array length: 9
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 15 S> */ B(LdaZero),
/* 31 E> */ B(LdaKeyedProperty), R(0), U8(0),
/* 35 S> */ B(Return),
@ -55,9 +55,9 @@ frame size: 1
parameter count: 1
bytecode array length: 5
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateUnmappedArguments),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 46 S> */ B(Return),
]
constant pool: [
@ -74,13 +74,13 @@ frame size: 2
parameter count: 2
bytecode array length: 18
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
B(CreateMappedArguments),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(LdaZero),
/* 32 E> */ B(LdaKeyedProperty), R(0), U8(0),
/* 36 S> */ B(Return),
@ -100,6 +100,7 @@ frame size: 2
parameter count: 4
bytecode array length: 22
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(3),
B(PushContext), R(1),
B(Ldar), R(arg0),
@ -110,7 +111,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(2),
B(CreateMappedArguments),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 39 S> */ B(Return),
]
constant pool: [
@ -128,9 +128,9 @@ frame size: 1
parameter count: 4
bytecode array length: 5
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateUnmappedArguments),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 53 S> */ B(Return),
]
constant pool: [

View File

@ -15,9 +15,9 @@ frame size: 2
parameter count: 1
bytecode array length: 7
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateRestParameter),
B(Star), R(1),
/* 10 E> */ B(StackCheck),
B(Star), R(0),
/* 42 S> */ B(Return),
]
@ -35,9 +35,9 @@ frame size: 3
parameter count: 2
bytecode array length: 13
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateRestParameter),
B(Star), R(2),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(0),
B(Mov), R(2), R(1),
/* 29 S> */ B(Ldar), R(1),
@ -57,9 +57,9 @@ frame size: 3
parameter count: 2
bytecode array length: 15
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateRestParameter),
B(Star), R(2),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(0),
B(Mov), R(2), R(1),
/* 29 S> */ B(LdaZero),
@ -80,11 +80,11 @@ frame size: 5
parameter count: 2
bytecode array length: 27
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateUnmappedArguments),
B(Star), R(3),
B(CreateRestParameter),
B(Star), R(2),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(0),
B(Mov), R(2), R(1),
/* 29 S> */ B(LdaZero),

View File

@ -14,13 +14,13 @@ frame size: 4
parameter count: 1
bytecode array length: 23
bytecodes: [
/* 0 E> */ B(StackCheck),
B(LdaConstant), U8(0),
B(Star), R(1),
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 8 S> */ B(LdaSmi), I8(1),
/* 8 E> */ B(StaGlobal), U8(1), U8(2),
B(LdaUndefined),
@ -41,13 +41,13 @@ frame size: 3
parameter count: 1
bytecode array length: 18
bytecodes: [
/* 0 E> */ B(StackCheck),
B(LdaConstant), U8(0),
B(Star), R(0),
B(LdaZero),
B(Star), R(1),
B(Mov), R(closure), R(2),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(0), U8(3),
/* 0 E> */ B(StackCheck),
B(LdaUndefined),
/* 16 S> */ B(Return),
]
@ -66,13 +66,13 @@ frame size: 4
parameter count: 1
bytecode array length: 29
bytecodes: [
/* 0 E> */ B(StackCheck),
B(LdaConstant), U8(0),
B(Star), R(1),
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 8 S> */ B(LdaSmi), I8(1),
/* 8 E> */ B(StaGlobal), U8(1), U8(2),
/* 11 S> */ B(LdaSmi), I8(2),
@ -96,13 +96,13 @@ frame size: 4
parameter count: 1
bytecode array length: 27
bytecodes: [
/* 0 E> */ B(StackCheck),
B(LdaConstant), U8(0),
B(Star), R(1),
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 16 S> */ B(LdaGlobal), U8(1), U8(0),
B(Star), R(1),
/* 16 E> */ B(CallUndefinedReceiver0), R(1), U8(2),

View File

@ -100,9 +100,9 @@ frame size: 2
parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
/* 56 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(41),
/* 56 E> */ B(StaCurrentContextSlot), U8(2),
/* 64 S> */ B(CreateClosure), U8(2), U8(0), U8(2),

View File

@ -13,6 +13,7 @@ frame size: 10
parameter count: 1
bytecode array length: 59
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -21,7 +22,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
B(Star), R(2),
B(LdaConstant), U8(2),

View File

@ -18,12 +18,12 @@ frame size: 19
parameter count: 1
bytecode array length: 321
bytecodes: [
/* 16 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(4),
/* 43 S> */ B(CreateArrayLiteral), U8(2), U8(0), U8(37),
B(Star), R(7),
@ -154,8 +154,8 @@ bytecodes: [
/* 57 S> */ B(Return),
]
constant pool: [
Smi [96],
Smi [225],
Smi [95],
Smi [224],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
@ -183,12 +183,12 @@ frame size: 19
parameter count: 1
bytecode array length: 342
bytecodes: [
/* 16 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(4),
/* 43 S> */ B(CreateArrayLiteral), U8(2), U8(0), U8(37),
B(Star), R(7),
@ -327,8 +327,8 @@ bytecodes: [
/* 68 S> */ B(Return),
]
constant pool: [
Smi [96],
Smi [229],
Smi [95],
Smi [228],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
@ -361,12 +361,12 @@ frame size: 19
parameter count: 1
bytecode array length: 337
bytecodes: [
/* 16 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(4),
/* 43 S> */ B(CreateArrayLiteral), U8(2), U8(0), U8(37),
B(Star), R(7),
@ -504,8 +504,8 @@ bytecodes: [
/* 114 S> */ B(Return),
]
constant pool: [
Smi [96],
Smi [241],
Smi [95],
Smi [240],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
@ -534,11 +534,11 @@ frame size: 15
parameter count: 1
bytecode array length: 246
bytecodes: [
/* 16 E> */ B(StackCheck),
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(2), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(2),
/* 31 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
B(Star), R(1),

View File

@ -111,6 +111,7 @@ frame size: 20
parameter count: 2
bytecode array length: 239
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(5),
B(PushContext), R(2),
B(Ldar), R(this),
@ -121,7 +122,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(6),
B(Ldar), R(1),
B(StaCurrentContextSlot), U8(5),
/* 10 E> */ B(StackCheck),
B(CreateBlockContext), U8(1),
B(PushContext), R(3),
B(LdaTheHole),
@ -452,12 +452,12 @@ frame size: 16
parameter count: 2
bytecode array length: 196
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(5),
B(Mov), R(this), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
@ -538,7 +538,7 @@ bytecodes: [
/* 55 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [21],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
@ -563,12 +563,12 @@ frame size: 15
parameter count: 2
bytecode array length: 240
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
B(Star), R(4),
@ -665,8 +665,8 @@ bytecodes: [
/* 49 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [113],
Smi [21],
Smi [112],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
@ -695,11 +695,11 @@ frame size: 17
parameter count: 2
bytecode array length: 210
bytecodes: [
/* 16 E> */ B(StackCheck),
B(Mov), R(closure), R(5),
B(Mov), R(this), R(6),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(5), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(5),
/* 40 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
B(Star), R(7),
@ -815,12 +815,12 @@ frame size: 16
parameter count: 2
bytecode array length: 246
bytecodes: [
/* 16 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(4),
/* 40 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
B(Star), R(6),
@ -924,7 +924,7 @@ bytecodes: [
/* 54 S> */ B(Return),
]
constant pool: [
Smi [91],
Smi [90],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],

View File

@ -15,12 +15,12 @@ frame size: 3
parameter count: 1
bytecode array length: 44
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star), R(1),
@ -34,7 +34,7 @@ bytecodes: [
/* 16 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [21],
Smi [10],
Smi [7],
]
@ -50,12 +50,12 @@ frame size: 3
parameter count: 1
bytecode array length: 80
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star), R(1),
@ -83,8 +83,8 @@ bytecodes: [
/* 25 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [58],
Smi [21],
Smi [57],
Smi [10],
Smi [7],
Smi [10],
@ -102,12 +102,12 @@ frame size: 15
parameter count: 1
bytecode array length: 246
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
B(Star), R(4),
@ -206,8 +206,8 @@ bytecodes: [
/* 44 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [119],
Smi [21],
Smi [118],
Smi [10],
Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
@ -236,12 +236,12 @@ frame size: 7
parameter count: 1
bytecode array length: 198
bytecodes: [
/* 38 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star), R(0),
/* 38 E> */ B(StackCheck),
/* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star), R(1),
@ -311,8 +311,8 @@ bytecodes: [
/* 54 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [166],
Smi [21],
Smi [165],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],

View File

@ -23,9 +23,9 @@ frame size: 3
parameter count: 1
bytecode array length: 40
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(CreateEmptyObjectLiteral),
/* 31 E> */ B(StaGlobal), U8(0), U8(0),
/* 45 S> */ B(LdaGlobal), U8(0), U8(2),
@ -67,9 +67,9 @@ frame size: 3
parameter count: 1
bytecode array length: 69
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(CreateEmptyObjectLiteral),
/* 31 E> */ B(StaGlobal), U8(0), U8(0),
/* 50 S> */ B(LdaZero),
@ -126,9 +126,9 @@ frame size: 3
parameter count: 1
bytecode array length: 70
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(CreateEmptyObjectLiteral),
/* 31 E> */ B(StaGlobal), U8(0), U8(0),
/* 45 S> */ B(LdaSmi), I8(4),
@ -185,9 +185,9 @@ frame size: 3
parameter count: 1
bytecode array length: 70
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(CreateEmptyObjectLiteral),
/* 31 E> */ B(StaGlobal), U8(0), U8(0),
/* 45 S> */ B(LdaSmi), I8(4),
@ -246,9 +246,9 @@ frame size: 4
parameter count: 1
bytecode array length: 71
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(LdaConstant), U8(0),
B(Star), R(2),
B(LdaSmi), I8(41),
@ -299,9 +299,9 @@ frame size: 5
parameter count: 1
bytecode array length: 24
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(LdaConstant), U8(0),
B(Star), R(3),
B(LdaSmi), I8(4),
@ -332,9 +332,9 @@ frame size: 5
parameter count: 1
bytecode array length: 24
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(LdaConstant), U8(0),
B(Star), R(3),
B(LdaSmi), I8(37),
@ -376,9 +376,9 @@ frame size: 8
parameter count: 1
bytecode array length: 137
bytecodes: [
/* 237 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 237 E> */ B(StackCheck),
/* 255 S> */ B(LdaNamedPropertyNoFeedback), R(this), U8(0),
B(Star), R(1),
/* 255 E> */ B(CallNoFeedback), R(1), R(this), U8(1),
@ -471,9 +471,9 @@ frame size: 8
parameter count: 1
bytecode array length: 140
bytecodes: [
/* 189 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 189 E> */ B(StackCheck),
/* 202 S> */ B(LdaUndefined),
B(Star), R(2),
B(LdaGlobal), U8(0), U8(0),
@ -569,9 +569,9 @@ frame size: 2
parameter count: 1
bytecode array length: 43
bytecodes: [
/* 79 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 79 E> */ B(StackCheck),
/* 93 S> */ B(CreateEmptyObjectLiteral),
/* 95 E> */ B(StaGlobal), U8(0), U8(0),
/* 111 S> */ B(LdaGlobal), U8(0), U8(2),
@ -618,9 +618,9 @@ frame size: 2
parameter count: 1
bytecode array length: 43
bytecodes: [
/* 76 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 76 E> */ B(StackCheck),
/* 92 S> */ B(CreateEmptyObjectLiteral),
/* 94 E> */ B(StaGlobal), U8(0), U8(0),
/* 112 S> */ B(LdaGlobal), U8(0), U8(2),
@ -753,13 +753,13 @@ frame size: 3
parameter count: 2
bytecode array length: 27
bytecodes: [
/* 46 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
B(CreateMappedArguments),
B(Star), R(0),
/* 46 E> */ B(StackCheck),
/* 53 S> */ B(LdaCurrentContextSlot), U8(2),
B(Star), R(2),
B(LdaSmi), I8(3),
@ -786,13 +786,13 @@ frame size: 3
parameter count: 2
bytecode array length: 27
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(1),
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(2),
B(CreateMappedArguments),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 37 S> */ B(LdaCurrentContextSlot), U8(2),
B(Star), R(2),
B(LdaSmi), I8(3),

View File

@ -22,9 +22,9 @@ frame size: 3
parameter count: 1
bytecode array length: 42
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(CreateEmptyObjectLiteral),
/* 31 E> */ B(StaGlobal), U8(0), U8(0),
/* 45 S> */ B(LdaGlobal), U8(0), U8(2),
@ -70,9 +70,9 @@ frame size: 3
parameter count: 1
bytecode array length: 65
bytecodes: [
/* 16 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
/* 29 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
/* 31 E> */ B(StaGlobal), U8(1), U8(1),
/* 93 S> */ B(LdaGlobal), U8(1), U8(3),
@ -130,9 +130,9 @@ frame size: 8
parameter count: 1
bytecode array length: 144
bytecodes: [
/* 237 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 237 E> */ B(StackCheck),
/* 255 S> */ B(LdaNamedProperty), R(this), U8(0), U8(0),
B(Star), R(1),
/* 255 E> */ B(CallProperty0), R(1), R(this), U8(2),
@ -223,9 +223,9 @@ frame size: 7
parameter count: 1
bytecode array length: 126
bytecodes: [
/* 189 E> */ B(StackCheck),
B(CreateMappedArguments),
B(Star), R(0),
/* 189 E> */ B(StackCheck),
/* 202 S> */ B(LdaGlobal), U8(0), U8(0),
B(Star), R(1),
/* 202 E> */ B(CallUndefinedReceiver0), R(1), U8(2),

View File

@ -50,9 +50,9 @@ frame size: 2
parameter count: 1
bytecode array length: 17
bytecodes: [
/* 30 E> */ B(StackCheck),
B(LdaTheHole),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(Ldar), R(0),

View File

@ -13,11 +13,11 @@ frame size: 1
parameter count: 1
bytecode array length: 15
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
B(LdaUndefined),
@ -37,11 +37,11 @@ frame size: 1
parameter count: 1
bytecode array length: 16
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 72 S> */ B(LdaImmutableCurrentContextSlot), U8(2),
@ -61,11 +61,11 @@ frame size: 2
parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(20),
B(Star), R(1),
B(LdaCurrentContextSlot), U8(2),
@ -91,11 +91,11 @@ frame size: 1
parameter count: 1
bytecode array length: 19
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(1),
B(PushContext), R(0),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
/* 42 E> */ B(StaCurrentContextSlot), U8(2),
/* 46 S> */ B(LdaSmi), I8(20),

View File

@ -14,6 +14,7 @@ frame size: 10
parameter count: 1
bytecode array length: 63
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -22,7 +23,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
/* 14 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
B(Star), R(2),
B(LdaConstant), U8(2),
@ -59,6 +59,7 @@ frame size: 10
parameter count: 1
bytecode array length: 64
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -67,7 +68,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
/* 14 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
B(Star), R(2),
B(LdaConstant), U8(2),
@ -105,6 +105,7 @@ frame size: 10
parameter count: 1
bytecode array length: 64
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -113,7 +114,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
/* 14 S> */ B(LdaSmi), I8(20),
/* 16 E> */ B(StaLookupSlot), U8(1), U8(0),
/* 22 S> */ B(LdaLookupGlobalSlot), U8(2), U8(0), U8(1),
@ -156,6 +156,7 @@ frame size: 10
parameter count: 1
bytecode array length: 63
bytecodes: [
/* 38 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -164,7 +165,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 38 E> */ B(StackCheck),
/* 44 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
B(Star), R(2),
B(LdaConstant), U8(2),
@ -206,6 +206,7 @@ frame size: 10
parameter count: 1
bytecode array length: 63
bytecodes: [
/* 34 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(1),
B(Ldar), R(this),
@ -214,7 +215,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
/* 34 E> */ B(StackCheck),
/* 40 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
B(Star), R(2),
B(LdaConstant), U8(2),

View File

@ -15,6 +15,7 @@ frame size: 5
parameter count: 2
bytecode array length: 62
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(3),
@ -25,7 +26,6 @@ bytecodes: [
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -40,7 +40,7 @@ bytecodes: [
/* 14 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [35],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -56,6 +56,7 @@ frame size: 5
parameter count: 2
bytecode array length: 62
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(3),
@ -66,7 +67,6 @@ bytecodes: [
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -81,7 +81,7 @@ bytecodes: [
/* 25 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [35],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -99,6 +99,7 @@ frame size: 6
parameter count: 2
bytecode array length: 92
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
@ -109,7 +110,6 @@ bytecodes: [
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
B(Star), R(4),
@ -137,7 +137,7 @@ bytecodes: [
/* 65 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [35],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -156,6 +156,7 @@ frame size: 6
parameter count: 2
bytecode array length: 90
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
@ -166,7 +167,6 @@ bytecodes: [
B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
B(Star), R(4),
@ -193,7 +193,7 @@ bytecodes: [
/* 50 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [35],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -211,6 +211,7 @@ frame size: 6
parameter count: 2
bytecode array length: 96
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
@ -223,7 +224,6 @@ bytecodes: [
B(Star), R(0),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
@ -251,7 +251,7 @@ bytecodes: [
/* 50 S> */ B(Return),
]
constant pool: [
Smi [42],
Smi [41],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -269,6 +269,7 @@ frame size: 6
parameter count: 2
bytecode array length: 100
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
@ -281,7 +282,6 @@ bytecodes: [
B(Star), R(0),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
@ -309,7 +309,7 @@ bytecodes: [
/* 52 S> */ B(Return),
]
constant pool: [
Smi [42],
Smi [41],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -325,6 +325,7 @@ frame size: 5
parameter count: 2
bytecode array length: 75
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(3),
@ -337,7 +338,6 @@ bytecodes: [
B(Star), R(0),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
@ -355,7 +355,7 @@ bytecodes: [
/* 33 S> */ B(Return),
]
constant pool: [
Smi [42],
Smi [41],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -372,6 +372,7 @@ frame size: 7
parameter count: 2
bytecode array length: 96
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(3),
@ -384,7 +385,6 @@ bytecodes: [
B(Star), R(0),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
@ -411,7 +411,7 @@ bytecodes: [
/* 27 S> */ B(Return),
]
constant pool: [
Smi [42],
Smi [41],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -429,6 +429,7 @@ frame size: 5
parameter count: 2
bytecode array length: 62
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(3),
@ -439,7 +440,6 @@ bytecodes: [
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -454,7 +454,7 @@ bytecodes: [
/* 31 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [35],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -470,6 +470,7 @@ frame size: 5
parameter count: 2
bytecode array length: 62
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(3),
@ -480,7 +481,6 @@ bytecodes: [
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 0 E> */ B(StackCheck),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -495,7 +495,7 @@ bytecodes: [
/* 20 S> */ B(Return),
]
constant pool: [
Smi [36],
Smi [35],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],
@ -512,6 +512,7 @@ frame size: 8
parameter count: 2
bytecode array length: 89
bytecodes: [
/* 0 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(LdaConstant), U8(1),
B(Star), R(4),
@ -526,7 +527,6 @@ bytecodes: [
B(Star), R(4),
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(4), U8(1),
B(Star), R(1),
/* 0 E> */ B(StackCheck),
B(Ldar), R(0),
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
@ -546,7 +546,7 @@ bytecodes: [
/* 46 S> */ B(Return),
]
constant pool: [
Smi [48],
Smi [47],
SCOPE_INFO_TYPE,
Smi [10],
Smi [7],

View File

@ -48,6 +48,7 @@ frame size: 15
parameter count: 1
bytecode array length: 165
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateFunctionContext), U8(0), U8(4),
B(PushContext), R(4),
B(Ldar), R(this),
@ -56,7 +57,6 @@ bytecodes: [
B(StaCurrentContextSlot), U8(5),
B(Ldar), R(3),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
B(CreateBlockContext), U8(1),
B(PushContext), R(5),
B(LdaTheHole),
@ -262,12 +262,12 @@ frame size: 5
parameter count: 1
bytecode array length: 67
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
B(Star), R(3),
@ -292,7 +292,7 @@ bytecodes: [
/* 62 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [21],
Smi [10],
Smi [7],
]
@ -310,12 +310,12 @@ frame size: 4
parameter count: 1
bytecode array length: 99
bytecodes: [
/* 11 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(2), U8(2),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
B(ResumeGenerator), R(0), R(0), U8(2),
B(Star), R(2),
@ -352,8 +352,8 @@ bytecodes: [
/* 56 S> */ B(Return),
]
constant pool: [
Smi [22],
Smi [68],
Smi [21],
Smi [67],
Smi [10],
Smi [7],
Smi [10],
@ -373,11 +373,11 @@ frame size: 8
parameter count: 1
bytecode array length: 81
bytecodes: [
/* 16 E> */ B(StackCheck),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(3), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(3),
/* 36 S> */ B(LdaZero),
B(Star), R(1),
@ -430,12 +430,12 @@ frame size: 7
parameter count: 1
bytecode array length: 117
bytecodes: [
/* 16 E> */ B(StackCheck),
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(2), U8(2),
B(Star), R(0),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(2),
/* 36 S> */ B(LdaZero),
B(Star), R(1),
@ -483,7 +483,7 @@ bytecodes: [
/* 61 S> */ B(Return),
]
constant pool: [
Smi [46],
Smi [45],
SCOPE_INFO_TYPE,
]
handlers: [

View File

@ -172,9 +172,9 @@ frame size: 4
parameter count: 1
bytecode array length: 42
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateClosure), U8(0), U8(0), U8(2),
B(Star), R(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 53 S> */ B(LdaSmi), I8(2),

View File

@ -21,10 +21,10 @@ frame size: 5
parameter count: 1
bytecode array length: 19
bytecodes: [
/* 93 E> */ B(StackCheck),
B(CreateRestParameter),
B(Star), R(2),
B(Mov), R(closure), R(1),
/* 93 E> */ B(StackCheck),
/* 93 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(4),
B(Ldar), R(0),
@ -53,10 +53,10 @@ frame size: 9
parameter count: 1
bytecode array length: 40
bytecodes: [
/* 128 E> */ B(StackCheck),
B(CreateRestParameter),
B(Star), R(3),
B(Mov), R(closure), R(1),
/* 128 E> */ B(StackCheck),
B(Mov), R(3), R(2),
/* 140 S> */ B(Ldar), R(closure),
B(GetSuperConstructor), R(5),
@ -95,10 +95,10 @@ frame size: 11
parameter count: 1
bytecode array length: 112
bytecodes: [
/* 128 E> */ B(StackCheck),
B(CreateRestParameter),
B(Star), R(3),
B(Mov), R(closure), R(1),
/* 128 E> */ B(StackCheck),
B(Mov), R(3), R(2),
/* 140 S> */ B(Ldar), R(closure),
B(GetSuperConstructor), R(5),

View File

@ -191,9 +191,9 @@ frame size: 4
parameter count: 1
bytecode array length: 45
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateClosure), U8(0), U8(0), U8(2),
B(Star), R(2),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 53 S> */ B(LdaSmi), I8(2),

View File

@ -35,8 +35,8 @@ frame size: 1
parameter count: 1
bytecode array length: 7
bytecodes: [
B(Mov), R(closure), R(0),
/* 21 E> */ B(StackCheck),
B(Mov), R(closure), R(0),
/* 26 S> */ B(Ldar), R(0),
/* 35 S> */ B(Return),
]

View File

@ -14,13 +14,13 @@ frame size: 4
parameter count: 1
bytecode array length: 37
bytecodes: [
/* 0 E> */ B(StackCheck),
B(LdaConstant), U8(0),
B(Star), R(1),
B(LdaZero),
B(Star), R(2),
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(3),
/* 0 E> */ B(StackCheck),
/* 8 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(41),
B(Star), R(1),
/* 16 E> */ B(CreateClosure), U8(2), U8(0), U8(0),

View File

@ -0,0 +1,28 @@
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --expose-gc --allow-natives-syntax --predictable --stack-size=300
function* f() {
try {
g();
} catch {}
}
function g() {
try {
for (var i of f());
} catch {
gc();
}
}
%PrepareFunctionForOptimization(g);
g();
g();
g();
// Brittle repro: depends on exact placement of OptimizeFunctionOnNextCall and
// --stack-size.
%OptimizeFunctionOnNextCall(g);
g();