585b39f53a
This is a reland of c3bd741efd
Original change's description:
> Fix "this" value in lazily-parsed module functions.
>
> When preparsing top-level functions in a module, we didn't track
> unresolved variables. Consequently, "this" ended up referencing
> the global "this", which has the wrong value (in a module "this"
> is supposed to be the undefined value).
>
> This patch fixes that. This also lets us stop forcing context
> allocation of all variables in module scopes, which the patch
> takes care of as well.
>
> Bug: chromium:791334
> Change-Id: Ifac1f1adc033f3facfb3d29dd4bca32ee27bffcf
> Reviewed-on: https://chromium-review.googlesource.com/808938
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50025}
TBR=adamk@chromium.org
TBR=kozyatinskiy@chromium.org
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Bug: chromium:791334
Change-Id: I57acc7b84a345565b36cbb55924fa2ff9b449eec
Reviewed-on: https://chromium-review.googlesource.com/822341
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50045}
702 lines
23 KiB
Plaintext
702 lines
23 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
module: yes
|
|
top level: yes
|
|
|
|
---
|
|
snippet: "
|
|
import \"bar\";
|
|
"
|
|
frame size: 6
|
|
parameter count: 2
|
|
bytecode array length: 91
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(3),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(5),
|
|
B(Mov), R(arg0), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
|
B(PushContext), R(3),
|
|
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),
|
|
/* 13 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(4),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 13 S> */ B(Return),
|
|
B(Mov), R(4), R(1),
|
|
B(Ldar), R(1),
|
|
/* 13 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [43],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import {foo} from \"bar\";
|
|
"
|
|
frame size: 6
|
|
parameter count: 2
|
|
bytecode array length: 91
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(3),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(5),
|
|
B(Mov), R(arg0), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
|
B(PushContext), R(3),
|
|
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),
|
|
/* 24 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(4),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 24 S> */ B(Return),
|
|
B(Mov), R(4), R(1),
|
|
B(Ldar), R(1),
|
|
/* 24 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [43],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import {foo as goo} from \"bar\";
|
|
goo(42);
|
|
{ let x; { goo(42) } };
|
|
"
|
|
frame size: 7
|
|
parameter count: 2
|
|
bytecode array length: 121
|
|
bytecodes: [
|
|
B(Ldar), R(1),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
|
|
B(PushContext), R(4),
|
|
B(RestoreGeneratorState), R(1),
|
|
B(Star), R(3),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(Mov), R(arg0), R(4),
|
|
B(Mov), R(closure), R(5),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
|
B(PushContext), R(4),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
|
B(Star), R(1),
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
|
|
/* 64 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(1), R(0), U8(5),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(5),
|
|
/* 64 S> */ B(Return),
|
|
/* 32 S> */ B(LdaModuleVariable), I8(-1), U8(0),
|
|
B(ThrowReferenceErrorIfHole), U8(4),
|
|
B(Star), R(5),
|
|
B(LdaSmi), I8(42),
|
|
B(Star), R(6),
|
|
/* 32 E> */ B(CallUndefinedReceiver1), R(5), R(6), U8(0),
|
|
/* 47 S> */ B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 52 S> */ B(LdaModuleVariable), I8(-1), U8(0),
|
|
B(ThrowReferenceErrorIfHole), U8(4),
|
|
B(Star), R(5),
|
|
B(LdaSmi), I8(42),
|
|
B(Star), R(6),
|
|
/* 52 E> */ B(CallUndefinedReceiver1), R(5), R(6), U8(2),
|
|
B(Star), R(2),
|
|
/* 64 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [43],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export var foo = 42;
|
|
foo++;
|
|
{ let x; { foo++ } };
|
|
"
|
|
frame size: 7
|
|
parameter count: 2
|
|
bytecode array length: 119
|
|
bytecodes: [
|
|
B(Ldar), R(1),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
|
|
B(PushContext), R(4),
|
|
B(RestoreGeneratorState), R(1),
|
|
B(Star), R(3),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(Mov), R(arg0), R(4),
|
|
B(Mov), R(closure), R(5),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
|
B(PushContext), R(4),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
|
B(Star), R(1),
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
|
|
/* 49 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(1), R(0), U8(5),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(5),
|
|
/* 49 S> */ B(Return),
|
|
/* 17 S> */ B(LdaSmi), I8(42),
|
|
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
|
B(Inc), U8(0),
|
|
/* 24 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
/* 34 S> */ B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 39 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
|
B(ToNumeric), U8(1),
|
|
B(Star), R(5),
|
|
B(Inc), U8(1),
|
|
/* 42 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
B(Mov), R(5), R(2),
|
|
B(Ldar), R(2),
|
|
/* 49 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [43],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export let foo = 42;
|
|
foo++;
|
|
{ let x; { foo++ } };
|
|
"
|
|
frame size: 7
|
|
parameter count: 2
|
|
bytecode array length: 125
|
|
bytecodes: [
|
|
B(Ldar), R(1),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
|
|
B(PushContext), R(4),
|
|
B(RestoreGeneratorState), R(1),
|
|
B(Star), R(3),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(Mov), R(arg0), R(4),
|
|
B(Mov), R(closure), R(5),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
|
B(PushContext), R(4),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
|
B(Star), R(1),
|
|
B(LdaTheHole),
|
|
B(StaModuleVariable), I8(1), U8(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(Ldar), R(1),
|
|
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
|
|
/* 49 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(1), R(0), U8(5),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(5),
|
|
/* 49 S> */ B(Return),
|
|
/* 17 S> */ B(LdaSmi), I8(42),
|
|
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
|
B(Inc), U8(0),
|
|
/* 24 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
/* 34 S> */ B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 39 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
|
B(ToNumeric), U8(1),
|
|
B(Star), R(5),
|
|
B(Inc), U8(1),
|
|
/* 42 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
B(Mov), R(5), R(2),
|
|
B(Ldar), R(2),
|
|
/* 49 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [49],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export const foo = 42;
|
|
foo++;
|
|
{ let x; { foo++ } };
|
|
"
|
|
frame size: 7
|
|
parameter count: 2
|
|
bytecode array length: 129
|
|
bytecodes: [
|
|
B(Ldar), R(1),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
|
|
B(PushContext), R(4),
|
|
B(RestoreGeneratorState), R(1),
|
|
B(Star), R(3),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(Mov), R(arg0), R(4),
|
|
B(Mov), R(closure), R(5),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
|
B(PushContext), R(4),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
|
B(Star), R(1),
|
|
B(LdaTheHole),
|
|
B(StaModuleVariable), I8(1), U8(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(Ldar), R(1),
|
|
/* 0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
|
|
/* 51 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(1), R(0), U8(5),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(5),
|
|
/* 51 S> */ B(Return),
|
|
/* 19 S> */ B(LdaSmi), I8(42),
|
|
/* 19 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
/* 23 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
|
B(Inc), U8(0),
|
|
/* 26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
|
|
/* 36 S> */ B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 41 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
|
B(ToNumeric), U8(1),
|
|
B(Star), R(5),
|
|
B(Inc), U8(1),
|
|
/* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
|
|
B(Mov), R(5), R(2),
|
|
B(Ldar), R(2),
|
|
/* 51 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [49],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export default (function () {});
|
|
"
|
|
frame size: 6
|
|
parameter count: 2
|
|
bytecode array length: 104
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(3),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(5),
|
|
B(Mov), R(arg0), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
|
B(PushContext), R(3),
|
|
B(Mov), R(this), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
|
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),
|
|
/* 32 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(4),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 32 S> */ B(Return),
|
|
B(Mov), R(4), R(1),
|
|
B(CreateClosure), U8(4), U8(0), U8(0),
|
|
B(StaModuleVariable), I8(1), U8(0),
|
|
B(Ldar), R(1),
|
|
/* 32 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [49],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export default (class {});
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 125
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(3),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(5),
|
|
B(Mov), R(arg0), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
|
B(PushContext), R(3),
|
|
B(Mov), R(this), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
|
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),
|
|
/* 26 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(4),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 26 S> */ B(Return),
|
|
B(Mov), R(4), R(1),
|
|
B(LdaTheHole),
|
|
B(Star), R(7),
|
|
B(CreateClosure), U8(5), U8(0), U8(0),
|
|
B(Star), R(4),
|
|
B(LdaConstant), U8(4),
|
|
B(Star), R(5),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
|
|
B(Star), R(5),
|
|
B(Ldar), R(6),
|
|
B(StaModuleVariable), I8(1), U8(0),
|
|
B(Ldar), R(1),
|
|
/* 26 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [49],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export {foo as goo} from \"bar\"
|
|
"
|
|
frame size: 6
|
|
parameter count: 2
|
|
bytecode array length: 91
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(3),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(5),
|
|
B(Mov), R(arg0), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
|
B(PushContext), R(3),
|
|
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),
|
|
/* 30 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(4),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 30 S> */ B(Return),
|
|
B(Mov), R(4), R(1),
|
|
B(Ldar), R(1),
|
|
/* 30 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [43],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export * from \"bar\"
|
|
"
|
|
frame size: 6
|
|
parameter count: 2
|
|
bytecode array length: 91
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(3),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(5),
|
|
B(Mov), R(arg0), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
|
B(PushContext), R(3),
|
|
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),
|
|
/* 19 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(4),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 19 S> */ B(Return),
|
|
B(Mov), R(4), R(1),
|
|
B(Ldar), R(1),
|
|
/* 19 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [43],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import * as foo from \"bar\"
|
|
foo.f(foo, foo.x);
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 118
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(18),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(4),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(3),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
|
B(Abort), U8(42),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(Mov), R(arg0), R(4),
|
|
B(Mov), R(closure), R(5),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
|
B(PushContext), R(4),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
|
B(Star), R(0),
|
|
B(LdaZero),
|
|
B(Star), R(5),
|
|
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(5), U8(1),
|
|
B(Star), R(1),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(Ldar), R(0),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
|
|
/* 45 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(5),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(5),
|
|
/* 45 S> */ B(Return),
|
|
/* 31 S> */ B(LdaNamedProperty), R(1), U8(4), U8(0),
|
|
B(Star), R(5),
|
|
/* 42 E> */ B(LdaNamedProperty), R(1), U8(5), U8(2),
|
|
B(Star), R(8),
|
|
/* 31 E> */ B(CallProperty2), R(5), R(1), R(1), R(8), U8(4),
|
|
B(Star), R(2),
|
|
/* 45 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [55],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["f"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|