2016-04-18 14:13:04 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
wrap: no
|
|
|
|
test function name: f
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function* f() { }
|
2016-05-24 12:51:18 +00:00
|
|
|
f();
|
2016-04-18 14:13:04 +00:00
|
|
|
"
|
2017-08-11 15:16:31 +00:00
|
|
|
frame size: 4
|
2016-04-18 14:13:04 +00:00
|
|
|
parameter count: 1
|
2017-09-08 11:46:07 +00:00
|
|
|
bytecode array length: 73
|
2016-04-18 14:13:04 +00:00
|
|
|
bytecodes: [
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(0),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpIfUndefined), U8(18),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
|
|
B(PushContext), R(2),
|
|
|
|
B(RestoreGeneratorState), R(0),
|
|
|
|
B(Star), R(1),
|
2017-05-15 16:31:05 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
2017-10-13 12:21:40 +00:00
|
|
|
B(Abort), U8(42),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(Mov), R(closure), R(2),
|
|
|
|
B(Mov), R(this), R(3),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(2), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 11 E> */ B(StackCheck),
|
2017-08-11 15:16:31 +00:00
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
|
2016-06-10 13:28:34 +00:00
|
|
|
/* 16 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Star), R(2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 16 S> */ B(Return),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 16 S> */ B(Return),
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
2017-09-08 11:46:07 +00:00
|
|
|
Smi [29],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function* f() { yield 42 }
|
2016-05-24 12:51:18 +00:00
|
|
|
f();
|
2016-04-18 14:13:04 +00:00
|
|
|
"
|
2017-08-11 15:16:31 +00:00
|
|
|
frame size: 4
|
2016-04-18 14:13:04 +00:00
|
|
|
parameter count: 1
|
2017-09-08 11:46:07 +00:00
|
|
|
bytecode array length: 118
|
2016-04-18 14:13:04 +00:00
|
|
|
bytecodes: [
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(0),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpIfUndefined), U8(18),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
|
|
B(PushContext), R(2),
|
|
|
|
B(RestoreGeneratorState), R(0),
|
|
|
|
B(Star), R(1),
|
2017-05-15 16:31:05 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
2017-10-13 12:21:40 +00:00
|
|
|
B(Abort), U8(42),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(Mov), R(closure), R(2),
|
|
|
|
B(Mov), R(this), R(3),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(2), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 11 E> */ B(StackCheck),
|
2017-08-11 15:16:31 +00:00
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
|
2016-06-10 13:28:34 +00:00
|
|
|
/* 25 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Star), R(2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 25 S> */ B(Return),
|
2017-05-24 13:54:57 +00:00
|
|
|
/* 16 S> */ B(LdaSmi), I8(42),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(2),
|
2017-07-20 12:35:28 +00:00
|
|
|
B(LdaFalse),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(2), U8(2),
|
|
|
|
B(SuspendGenerator), R(0), R(0), U8(2), U8(1),
|
2016-06-10 13:28:34 +00:00
|
|
|
/* 25 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Star), R(2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 16 E> */ B(Throw),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 25 S> */ B(Return),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 25 S> */ B(Return),
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
2017-09-08 11:46:07 +00:00
|
|
|
Smi [29],
|
|
|
|
Smi [74],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function* f() { for (let x of [42]) yield x }
|
2016-05-24 12:51:18 +00:00
|
|
|
f();
|
2016-04-18 14:13:04 +00:00
|
|
|
"
|
2017-08-11 15:16:31 +00:00
|
|
|
frame size: 17
|
2016-04-18 14:13:04 +00:00
|
|
|
parameter count: 1
|
2017-10-05 08:30:58 +00:00
|
|
|
bytecode array length: 402
|
2016-04-18 14:13:04 +00:00
|
|
|
bytecodes: [
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpIfUndefined), U8(18),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
|
|
|
|
B(PushContext), R(11),
|
|
|
|
B(RestoreGeneratorState), R(2),
|
|
|
|
B(Star), R(10),
|
2017-05-15 16:31:05 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
2017-10-13 12:21:40 +00:00
|
|
|
B(Abort), U8(42),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
|
|
|
B(Star), R(10),
|
|
|
|
B(Mov), R(closure), R(11),
|
|
|
|
B(Mov), R(this), R(12),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 11 E> */ B(StackCheck),
|
2017-08-11 15:16:31 +00:00
|
|
|
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0),
|
2016-06-10 13:28:34 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(2), R(0), U8(11),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Star), R(11),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(11),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(11),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaZero),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(6),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Mov), R(context), R(13),
|
2017-06-05 19:54:14 +00:00
|
|
|
B(Mov), R(context), R(14),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 30 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(LdaNamedProperty), R(15), U8(5), U8(1),
|
2017-06-05 19:54:14 +00:00
|
|
|
B(Star), R(16),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(CallProperty0), R(16), R(15), U8(3),
|
[ignition] desugar GetIterator() via bytecode rather than via AST
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}
2016-12-07 15:19:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(4),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(10),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
/* 30 E> */ B(TestEqualStrictNoFeedback), R(10),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpIfTrue), U8(4),
|
2017-10-13 12:21:40 +00:00
|
|
|
B(Abort), U8(42),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 25 S> */ B(LdaNamedProperty), R(4), U8(7), U8(7),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallProperty0), R(15), R(4), U8(5),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
/* 25 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
|
2016-05-17 20:39:45 +00:00
|
|
|
B(ToBooleanLogicalNot),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(JumpIfFalse), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(8), U8(9),
|
2017-07-25 18:37:36 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(74),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(9), U8(11),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(7),
|
2017-05-12 17:29:53 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(7), R(3),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 16 E> */ B(StackCheck),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Mov), R(3), R(0),
|
2017-07-20 12:35:28 +00:00
|
|
|
/* 36 S> */ B(LdaFalse),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(16),
|
|
|
|
B(Mov), R(0), R(15),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
|
|
|
|
B(SuspendGenerator), R(2), R(0), U8(15), U8(1),
|
2016-06-10 13:28:34 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
|
|
|
|
B(Star), R(15),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(15),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 36 E> */ B(Throw),
|
2017-05-24 15:48:27 +00:00
|
|
|
B(LdaZero),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(11),
|
|
|
|
B(Mov), R(15), R(12),
|
[ignition] Always write the deferred command result register
For deferred commands (such as in try-finally), some deferred commands
save and restore the accumulator using a result register (e.g. return,
throw, rethrow), while others don't (e.g. break, continue,
fall-through).
However, conditionally reading this result register that may not ever be
written caused it to be considered live from the start of the function,
as far as the liveness analysis could statically tell.
Now, we write the result register for all deferred commands, including
the fall-through. As a micro-optimization, we re-use the Smi command
tokeen to clobber the result, rather than emitting an LdaUndefined.
Bug: chromium:758472
Change-Id: I2ea65e2249b40ee6403216e654a8bb88d50bec3b
Reviewed-on: https://chromium-review.googlesource.com/635592
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47612}
2017-08-25 16:04:42 +00:00
|
|
|
B(Jump), U8(58),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaZero),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(6),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpLoop), U8(113), I8(0),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Jump), U8(36),
|
2017-06-05 19:54:14 +00:00
|
|
|
B(Star), R(15),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(closure),
|
|
|
|
B(CreateCatchContext), R(15), U8(12), U8(13),
|
|
|
|
B(PushContext), R(15),
|
|
|
|
B(Star), R(14),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(TestEqualStrict), R(6), U8(13),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(JumpIfFalse), U8(6),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(6),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(16),
|
|
|
|
B(CallRuntime), U16(Runtime::kReThrow), R(16), U8(1),
|
|
|
|
B(PopContext), R(15),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
[ignition] Always write the deferred command result register
For deferred commands (such as in try-finally), some deferred commands
save and restore the accumulator using a result register (e.g. return,
throw, rethrow), while others don't (e.g. break, continue,
fall-through).
However, conditionally reading this result register that may not ever be
written caused it to be considered live from the start of the function,
as far as the liveness analysis could statically tell.
Now, we write the result register for all deferred commands, including
the fall-through. As a micro-optimization, we re-use the Smi command
tokeen to clobber the result, rather than emitting an LdaUndefined.
Bug: chromium:758472
Change-Id: I2ea65e2249b40ee6403216e654a8bb88d50bec3b
Reviewed-on: https://chromium-review.googlesource.com/635592
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47612}
2017-08-25 16:04:42 +00:00
|
|
|
B(Star), R(12),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(11),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Jump), U8(8),
|
2017-06-05 19:54:14 +00:00
|
|
|
B(Star), R(12),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaSmi), I8(1),
|
|
|
|
B(Star), R(11),
|
2016-11-16 10:46:23 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(13),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaZero),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(TestEqualStrict), R(6), U8(14),
|
2017-10-05 08:30:58 +00:00
|
|
|
B(JumpIfTrue), U8(104),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(LdaNamedProperty), R(4), U8(14), U8(15),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(8),
|
2017-04-03 14:17:16 +00:00
|
|
|
B(TestUndetectable),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(4),
|
2017-10-05 08:30:58 +00:00
|
|
|
B(Jump), U8(93),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(TestEqualStrict), R(6), U8(18),
|
2017-10-05 08:30:58 +00:00
|
|
|
B(JumpIfFalse), U8(61),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Ldar), R(8),
|
2017-03-15 11:29:12 +00:00
|
|
|
B(TestTypeOf), U8(5),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(4),
|
|
|
|
B(Jump), U8(18),
|
2017-10-10 16:00:31 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(138),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(14),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(LdaConstant), U8(15),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(Throw),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Mov), R(context), R(14),
|
|
|
|
B(Mov), R(8), R(15),
|
|
|
|
B(Mov), R(4), R(16),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
|
2017-10-05 08:30:58 +00:00
|
|
|
B(Jump), U8(20),
|
|
|
|
B(Star), R(15),
|
|
|
|
B(Ldar), R(closure),
|
|
|
|
B(CreateCatchContext), R(15), U8(12), U8(16),
|
|
|
|
B(Star), R(14),
|
2016-11-16 10:46:23 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(14),
|
2017-10-05 08:30:58 +00:00
|
|
|
B(PushContext), R(15),
|
|
|
|
B(PopContext), R(15),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Jump), U8(27),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Mov), R(8), R(14),
|
|
|
|
B(Mov), R(4), R(15),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfToBooleanFalse), U8(4),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Jump), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(13),
|
2016-11-16 10:46:23 +00:00
|
|
|
B(SetPendingMessage),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(11),
|
2017-10-05 08:30:58 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
|
2017-06-13 13:49:45 +00:00
|
|
|
B(Jump), U8(8),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(12),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(12),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 44 S> */ B(Return),
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
2017-09-08 11:46:07 +00:00
|
|
|
Smi [29],
|
|
|
|
Smi [91],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2017-04-18 12:46:39 +00:00
|
|
|
TUPLE2_TYPE,
|
2016-09-06 16:10:19 +00:00
|
|
|
SYMBOL_TYPE,
|
2017-09-08 11:46:07 +00:00
|
|
|
Smi [75],
|
2016-09-06 16:10:19 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
2017-06-05 19:54:14 +00:00
|
|
|
Smi [15],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2016-09-06 16:10:19 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-10-05 08:30:58 +00:00
|
|
|
FIXED_ARRAY_TYPE,
|
2017-05-16 11:36:04 +00:00
|
|
|
Smi [6],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [9],
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2017-09-08 11:46:07 +00:00
|
|
|
[77, 257, 265],
|
|
|
|
[80, 221, 223],
|
|
|
|
[326, 336, 338],
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
|
2017-05-22 14:52:07 +00:00
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function* g() { yield 42 }
|
|
|
|
function* f() { yield* g() }
|
|
|
|
f();
|
|
|
|
"
|
2017-08-11 15:16:31 +00:00
|
|
|
frame size: 9
|
2017-05-22 14:52:07 +00:00
|
|
|
parameter count: 1
|
2017-09-08 11:46:07 +00:00
|
|
|
bytecode array length: 265
|
2017-05-22 14:52:07 +00:00
|
|
|
bytecodes: [
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(0),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpIfUndefined), U8(18),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
|
|
B(PushContext), R(2),
|
|
|
|
B(RestoreGeneratorState), R(0),
|
|
|
|
B(Star), R(1),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
2017-10-13 12:21:40 +00:00
|
|
|
B(Abort), U8(42),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(Mov), R(closure), R(2),
|
|
|
|
B(Mov), R(this), R(3),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(2), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(0),
|
2017-05-22 14:52:07 +00:00
|
|
|
/* 38 E> */ B(StackCheck),
|
2017-08-11 15:16:31 +00:00
|
|
|
/* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
|
2017-05-22 14:52:07 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(Star), R(2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 38 E> */ B(Throw),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 43 S> */ B(LdaGlobal), U8(4), U8(2),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(Star), R(8),
|
2017-08-11 15:16:31 +00:00
|
|
|
/* 50 E> */ B(CallUndefinedReceiver0), R(8), U8(0),
|
|
|
|
B(Star), R(6),
|
|
|
|
B(LdaNamedProperty), R(6), U8(5), U8(4),
|
|
|
|
B(Star), R(7),
|
|
|
|
B(CallProperty0), R(7), R(6), U8(16),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(4),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(LdaUndefined),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(5),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(LdaZero),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(Ldar), R(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpIfTrue), U8(4),
|
2017-10-13 12:21:40 +00:00
|
|
|
B(Abort), U8(42),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(3),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(1),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaNamedProperty), R(4), U8(9), U8(8),
|
|
|
|
B(Star), R(8),
|
|
|
|
B(CallProperty1), R(8), R(4), R(5), U8(22),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(Jump), U8(65),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaNamedProperty), R(4), U8(10), U8(6),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfUndefined), U8(13),
|
|
|
|
B(JumpIfNull), U8(11),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(CallProperty1), R(8), R(4), R(5), U8(18),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(Jump), U8(48),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(5),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaNamedProperty), R(4), U8(11), U8(10),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfUndefined), U8(13),
|
|
|
|
B(JumpIfNull), U8(11),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(CallProperty1), R(8), R(4), R(5), U8(24),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(Jump), U8(28),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaNamedProperty), R(4), U8(10), U8(6),
|
|
|
|
B(Star), R(8),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfUndefined), U8(15),
|
|
|
|
B(JumpIfNull), U8(13),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(CallProperty0), R(8), R(4), U8(20),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(2),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
|
|
|
|
B(LdaNamedProperty), R(2), U8(12), U8(12),
|
2017-07-25 18:37:36 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(33),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(2),
|
|
|
|
B(SuspendGenerator), R(0), R(0), U8(8), U8(1),
|
2017-05-22 14:52:07 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(8),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(Star), R(5),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
|
|
B(Star), R(3),
|
2017-09-08 11:46:07 +00:00
|
|
|
B(JumpLoop), U8(139), I8(0),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(LdaNamedProperty), R(2), U8(13), U8(14),
|
|
|
|
B(Star), R(4),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(3),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Ldar), R(4),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 54 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
2017-09-08 11:46:07 +00:00
|
|
|
Smi [29],
|
|
|
|
Smi [92],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2017-05-22 14:52:07 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
|
|
|
SYMBOL_TYPE,
|
2017-09-08 11:46:07 +00:00
|
|
|
Smi [117],
|
2017-06-22 16:31:00 +00:00
|
|
|
Smi [17],
|
|
|
|
Smi [37],
|
2017-05-22 14:52:07 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|