b5f146a02a
Introduces: - a new AST node representing the GetIterator() algorithm in the specification, to be used by ForOfStatement, YieldExpression (in the case of delegating yield*), and the future `for-await-of` loop proposed in http://tc39.github.io/proposal-async-iteration/#sec-async-iterator-value-unwrap-functions. - a new opcode (JumpIfJSReceiver), which is useful for `if Type(object) is not Object` checks which are common throughout the specification. This node is easily eliminated by TurboFan. The AST node is desugared specially in bytecode, rather than manually when building the AST. The benefit of this is that desugaring in the BytecodeGenerator is much simpler and easier to understand than desugaring the AST. This also reduces parse time very slightly, and allows us to use LoadIC rather than KeyedLoadIC, which seems to have better baseline performance. This results in a ~20% improvement in test/js-perf-test/Iterators micro-benchmarks, which I believe owes to the use of the slightly faster LoadIC as opposed to the KeyedLoadIC in the baseline case. Both produce identical optimized code via TurboFan when the type check can be eliminated, and the load can be replaced with a constant value. BUG=v8:4280 R=bmeurer@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, neis@chromium.org, jarin@chromium.org TBR=rossberg@chromium.org Review-Url: https://codereview.chromium.org/2557593004 Cr-Commit-Position: refs/heads/master@{#41555}
919 lines
32 KiB
Plaintext
919 lines
32 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
module: yes
|
|
top level: yes
|
|
|
|
---
|
|
snippet: "
|
|
import \"bar\";
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 125
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(63),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 13 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 13 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(LdaUndefined),
|
|
/* 13 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import {foo} from \"bar\";
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 125
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(63),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 24 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 24 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(LdaUndefined),
|
|
/* 24 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import {foo as goo} from \"bar\";
|
|
goo(42);
|
|
{ let x; { goo(42) } };
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 195
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(2),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(2), U8(0),
|
|
B(JumpIfTrue), U8(63),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(0),
|
|
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(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(4),
|
|
B(Mov), R(closure), R(3),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(4),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(4),
|
|
B(Ldar), R(3),
|
|
/* 64 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
|
B(Star), R(5),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(5), R(7),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
|
/* 64 S> */ B(Return),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
/* 32 S> */ B(LdaUndefined),
|
|
B(Star), R(4),
|
|
/* 32 E> */ B(LdaModuleVariable), U8(-1), U8(0),
|
|
B(JumpIfNotHole), U8(11),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
|
|
B(Star), R(3),
|
|
B(LdaSmi), U8(42),
|
|
B(Star), R(5),
|
|
/* 32 E> */ B(Call), R(3), R(4), U8(2), U8(2),
|
|
B(Ldar), R(closure),
|
|
B(CreateBlockContext), U8(2),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 47 S> */ B(LdaUndefined),
|
|
/* 47 E> */ B(StaCurrentContextSlot), U8(4),
|
|
/* 52 S> */ B(LdaUndefined),
|
|
B(Star), R(4),
|
|
/* 52 E> */ B(LdaModuleVariable), U8(-1), U8(1),
|
|
B(JumpIfNotHole), U8(11),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(6),
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
|
|
B(Star), R(3),
|
|
B(LdaSmi), U8(42),
|
|
B(Star), R(5),
|
|
/* 52 E> */ B(Call), R(3), R(4), U8(2), U8(4),
|
|
B(PopContext), R(1),
|
|
B(LdaUndefined),
|
|
/* 64 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export var foo = 42;
|
|
foo++;
|
|
{ let x; { foo++ } };
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 160
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(2),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(2), U8(0),
|
|
B(JumpIfTrue), U8(63),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(0),
|
|
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(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(4),
|
|
B(Mov), R(closure), R(3),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(4),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(4),
|
|
B(Ldar), R(3),
|
|
/* 49 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
|
B(Star), R(5),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(5), R(7),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
|
/* 49 S> */ B(Return),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
/* 17 S> */ B(LdaSmi), U8(42),
|
|
/* 17 E> */ B(StaModuleVariable), U8(1), U8(0),
|
|
/* 21 S> */ B(LdaModuleVariable), U8(1), U8(0),
|
|
B(Inc), U8(2),
|
|
/* 24 E> */ B(StaModuleVariable), U8(1), U8(0),
|
|
B(Ldar), R(closure),
|
|
B(CreateBlockContext), U8(1),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 34 S> */ B(LdaUndefined),
|
|
/* 34 E> */ B(StaCurrentContextSlot), U8(4),
|
|
/* 39 S> */ B(LdaModuleVariable), U8(1), U8(1),
|
|
B(Inc), U8(3),
|
|
/* 42 E> */ B(StaModuleVariable), U8(1), U8(1),
|
|
B(PopContext), R(1),
|
|
B(LdaUndefined),
|
|
/* 49 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export let foo = 42;
|
|
foo++;
|
|
{ let x; { foo++ } };
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 164
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(2),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(2), U8(0),
|
|
B(JumpIfTrue), U8(67),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(0),
|
|
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(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(LdaTheHole),
|
|
B(StaModuleVariable), U8(1), U8(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(4),
|
|
B(Mov), R(closure), R(3),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(4),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(4),
|
|
B(Ldar), R(3),
|
|
/* 49 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
|
B(Star), R(5),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(5), R(7),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
|
/* 49 S> */ B(Return),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
/* 17 S> */ B(LdaSmi), U8(42),
|
|
/* 17 E> */ B(StaModuleVariable), U8(1), U8(0),
|
|
/* 21 S> */ B(LdaModuleVariable), U8(1), U8(0),
|
|
B(Inc), U8(2),
|
|
/* 24 E> */ B(StaModuleVariable), U8(1), U8(0),
|
|
B(Ldar), R(closure),
|
|
B(CreateBlockContext), U8(1),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 34 S> */ B(LdaUndefined),
|
|
/* 34 E> */ B(StaCurrentContextSlot), U8(4),
|
|
/* 39 S> */ B(LdaModuleVariable), U8(1), U8(1),
|
|
B(Inc), U8(3),
|
|
/* 42 E> */ B(StaModuleVariable), U8(1), U8(1),
|
|
B(PopContext), R(1),
|
|
B(LdaUndefined),
|
|
/* 49 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export const foo = 42;
|
|
foo++;
|
|
{ let x; { foo++ } };
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 168
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(2),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(2), U8(0),
|
|
B(JumpIfTrue), U8(67),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(0),
|
|
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(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(LdaTheHole),
|
|
B(StaModuleVariable), U8(1), U8(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(4),
|
|
B(Mov), R(closure), R(3),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(4),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(4),
|
|
B(Ldar), R(3),
|
|
/* 51 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
|
B(Star), R(5),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(6), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(5), R(7),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
|
/* 51 S> */ B(Return),
|
|
B(Ldar), R(5),
|
|
/* 0 E> */ B(Throw),
|
|
/* 19 S> */ B(LdaSmi), U8(42),
|
|
/* 19 E> */ B(StaModuleVariable), U8(1), U8(0),
|
|
/* 23 S> */ B(LdaModuleVariable), U8(1), U8(0),
|
|
B(Inc), U8(2),
|
|
/* 26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
|
|
B(Ldar), R(closure),
|
|
B(CreateBlockContext), U8(1),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 36 S> */ B(LdaUndefined),
|
|
/* 36 E> */ B(StaCurrentContextSlot), U8(4),
|
|
/* 41 S> */ B(LdaModuleVariable), U8(1), U8(1),
|
|
B(Inc), U8(3),
|
|
/* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
|
|
B(PopContext), R(1),
|
|
B(LdaUndefined),
|
|
/* 51 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export default (function () {});
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 135
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(67),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(LdaTheHole),
|
|
B(StaModuleVariable), U8(1), U8(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 32 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 32 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(CreateClosure), U8(1), U8(0),
|
|
B(StaModuleVariable), U8(1), U8(0),
|
|
B(LdaUndefined),
|
|
/* 32 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export default (class {});
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 175
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(67),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(LdaTheHole),
|
|
B(StaModuleVariable), U8(1), U8(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 26 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 26 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
/* 16 S> */ B(LdaTheHole),
|
|
B(Star), R(2),
|
|
B(CreateClosure), U8(1), U8(0),
|
|
B(Star), R(3),
|
|
B(LdaSmi), U8(16),
|
|
B(Star), R(4),
|
|
B(LdaSmi), U8(24),
|
|
B(Star), R(5),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
|
|
B(Star), R(2),
|
|
B(LdaNamedProperty), R(2), U8(2), U8(2),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
|
|
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
|
|
B(StaCurrentContextSlot), U8(6),
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
/* 16 E> */ B(StaModuleVariable), U8(1), U8(0),
|
|
B(LdaUndefined),
|
|
/* 26 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export {foo as goo} from \"bar\"
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 125
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(63),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 30 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 30 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(LdaUndefined),
|
|
/* 30 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
export * from \"bar\"
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 125
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(63),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 19 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 19 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(LdaUndefined),
|
|
/* 19 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import * as foo from \"bar\"
|
|
foo.f(foo, foo.x);
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 164
|
|
bytecodes: [
|
|
B(Ldar), R(new_target),
|
|
B(JumpIfUndefined), U8(21),
|
|
B(ResumeGenerator), R(new_target),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(1), U8(0),
|
|
B(JumpIfTrue), U8(73),
|
|
B(LdaSmi), U8(78),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(LdaConstant), U8(0),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
|
|
B(PushContext), R(0),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(2), U8(1),
|
|
B(StaCurrentContextSlot), U8(6),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(LdaCurrentContextSlot), U8(4),
|
|
B(Star), R(3),
|
|
B(Mov), R(closure), R(2),
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8(2),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaZero),
|
|
B(SuspendGenerator), R(3),
|
|
B(Ldar), R(2),
|
|
/* 45 S> */ B(Return),
|
|
B(LdaSmi), U8(-2),
|
|
B(Star), R(1),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(26),
|
|
B(LdaSmi), U8(2),
|
|
B(TestEqualStrict), R(5), U8(0),
|
|
B(JumpIfTrue), U8(16),
|
|
B(Jump), U8(2),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(4), R(6),
|
|
B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8(2),
|
|
/* 45 S> */ B(Return),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
/* 27 S> */ B(LdaCurrentContextSlot), U8(6),
|
|
B(Star), R(3),
|
|
/* 30 E> */ B(LdaNamedProperty), R(3), U8(1), U8(4),
|
|
B(Star), R(2),
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
B(Star), R(4),
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
B(Star), R(6),
|
|
/* 41 E> */ B(LdaNamedProperty), R(6), U8(2), U8(6),
|
|
B(Star), R(5),
|
|
/* 31 E> */ B(CallProperty), R(2), R(3), U8(3), U8(2),
|
|
B(LdaUndefined),
|
|
/* 45 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["f"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|