v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
Leszek Swirski e2ca2e69a6 [ignition] Re-use deferred return/rethrow commands
Since deferred return/async return/rethrow commands don't have an associated
statement, we can reuse their entries in the deferred command list.

Bug: v8:4280
Bug: v8:6218
Change-Id: Ic51fb735d4ea13ebea1d5e456ec5689c0d98a4ac
Reviewed-on: https://chromium-review.googlesource.com/506077
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45344}
2017-05-16 15:38:33 +00:00

572 lines
21 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: no
test function name: f
---
snippet: "
function* f() { }
f();
"
frame size: 12
parameter count: 1
bytecode array length: 177
bytecodes: [
B(Ldar), R(new_target),
B(JumpIfUndefined), U8(26),
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
B(PushContext), R(2),
B(ResumeGenerator), R(new_target),
B(Star), R(1),
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CreateFunctionContext), U8(1),
B(PushContext), R(0),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck),
B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(7), U8(0),
B(Ldar), R(6),
/* 16 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(9),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(9),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(11),
B(Mov), R(8), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(34),
B(Ldar), R(8),
/* 11 E> */ B(Throw),
B(LdaUndefined),
B(Star), R(6),
B(LdaTrue),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
B(Star), R(3),
B(Jump), U8(8),
B(Star), R(4),
B(LdaSmi), I8(1),
B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(5),
B(SetPendingMessage),
B(Ldar), R(3),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(4),
/* 16 S> */ B(Return),
B(Ldar), R(4),
B(ReThrow),
B(LdaUndefined),
/* 16 S> */ B(Return),
]
constant pool: [
Smi [52],
Smi [6],
Smi [9],
]
handlers: [
[52, 133, 139],
]
---
snippet: "
function* f() { yield 42 }
f();
"
frame size: 12
parameter count: 1
bytecode array length: 251
bytecodes: [
B(Ldar), R(new_target),
B(JumpIfUndefined), U8(26),
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
B(PushContext), R(2),
B(ResumeGenerator), R(new_target),
B(Star), R(1),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(LdaSmi), I8(79),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CreateFunctionContext), U8(1),
B(PushContext), R(0),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck),
B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(7), U8(0),
B(Ldar), R(6),
/* 25 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(9),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(9),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(11),
B(Mov), R(8), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(108),
B(Ldar), R(8),
/* 11 E> */ B(Throw),
/* 16 S> */ B(LdaSmi), I8(42),
B(Star), R(6),
B(LdaFalse),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(7), U8(0),
B(Ldar), R(6),
/* 25 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(9),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(9),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(11),
B(Mov), R(8), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(34),
B(Ldar), R(8),
/* 16 E> */ B(Throw),
B(LdaUndefined),
B(Star), R(6),
B(LdaTrue),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
B(Star), R(3),
B(Jump), U8(8),
B(Star), R(4),
B(LdaSmi), I8(1),
B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(5),
B(SetPendingMessage),
B(Ldar), R(3),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(4),
/* 25 S> */ B(Return),
B(Ldar), R(4),
B(ReThrow),
B(LdaUndefined),
/* 25 S> */ B(Return),
]
constant pool: [
Smi [52],
Smi [126],
Smi [6],
Smi [9],
]
handlers: [
[52, 207, 213],
]
---
snippet: "
function* f() { for (let x of [42]) yield x }
f();
"
frame size: 18
parameter count: 1
bytecode array length: 697
bytecodes: [
B(Ldar), R(new_target),
B(JumpIfUndefined), U8(26),
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
B(PushContext), R(4),
B(ResumeGenerator), R(new_target),
B(Star), R(3),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(LdaSmi), I8(79),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CreateFunctionContext), U8(8),
B(PushContext), R(0),
B(Mov), R(closure), R(5),
B(Mov), R(this), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck),
B(Mov), R(context), R(7),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(8),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(9),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(8),
/* 44 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(17),
B(Ldar), R(10),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
B(CreateBlockContext), U8(2),
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(LdaZero),
B(StaContextSlot), R(1), U8(8), U8(0),
B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
/* 30 S> */ B(CreateArrayLiteral), U8(3), U8(3), U8(17),
B(Star), R(12),
B(LdaNamedProperty), R(12), U8(4), U8(4),
B(Star), R(13),
B(CallProperty0), R(13), R(12), U8(6),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
/* 30 E> */ B(StaContextSlot), R(1), U8(6), U8(0),
B(Ldar), R(3),
B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
B(LdaSmi), I8(-2),
B(TestEqualStrictNoFeedback), R(3),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
/* 27 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(13),
B(LdaNamedProperty), R(13), U8(6), U8(10),
B(Star), R(12),
/* 27 E> */ B(CallProperty0), R(12), R(13), U8(8),
/* 27 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
B(Star), R(12),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(12),
B(LdaNamedProperty), R(12), U8(7), U8(12),
B(JumpIfToBooleanTrue), U8(144),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(12),
B(LdaNamedProperty), R(12), U8(8), U8(14),
B(StaContextSlot), R(1), U8(9), U8(0),
B(LdaSmi), I8(2),
B(StaContextSlot), R(1), U8(8), U8(0),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(StaContextSlot), R(1), U8(5), U8(0),
/* 16 E> */ B(StackCheck),
B(Ldar), R(closure),
B(CreateBlockContext), U8(9),
B(PushContext), R(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(LdaContextSlot), R(1), U8(5), U8(0),
B(StaCurrentContextSlot), U8(4),
/* 36 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(12),
B(LdaFalse),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(13), U8(0),
B(Ldar), R(12),
/* 44 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(40),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(31),
B(LdaTrue),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(Star), R(9),
B(LdaZero),
B(Star), R(8),
B(Jump), U8(71),
B(Ldar), R(14),
/* 36 E> */ B(Throw),
B(PopContext), R(2),
B(LdaZero),
B(StaContextSlot), R(1), U8(8), U8(0),
B(JumpLoop), U8(212), I8(0),
B(Jump), U8(44),
B(Star), R(12),
B(Ldar), R(closure),
B(CreateCatchContext), R(12), U8(10), U8(11),
B(PushContext), R(2),
B(Star), R(11),
B(LdaContextSlot), R(1), U8(8), U8(0),
B(Star), R(12),
B(LdaSmi), I8(2),
B(TestEqualStrict), R(12), U8(16),
B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1),
B(StaContextSlot), R(1), U8(8), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
B(PopContext), R(2),
B(LdaSmi), I8(-1),
B(Star), R(8),
B(Jump), U8(8),
B(Star), R(9),
B(LdaSmi), I8(1),
B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(10),
B(LdaContextSlot), R(1), U8(8), U8(0),
B(Star), R(11),
B(LdaZero),
B(TestEqualStrict), R(11), U8(17),
B(JumpIfTrue), U8(150),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(11),
B(LdaNamedProperty), R(11), U8(12), U8(18),
B(StaContextSlot), R(1), U8(10), U8(0),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(127),
B(LdaContextSlot), R(1), U8(8), U8(0),
B(Star), R(11),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(11), U8(21),
B(JumpIfFalse), U8(69),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(130),
B(Star), R(11),
B(LdaConstant), U8(13),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
B(Throw),
B(Mov), R(context), R(11),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(Jump), U8(20),
B(Star), R(12),
B(Ldar), R(closure),
B(CreateCatchContext), R(12), U8(10), U8(14),
B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(11),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(47),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(11),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(12),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
B(StaContextSlot), R(1), U8(11), U8(0),
B(LdaContextSlot), R(1), U8(11), U8(0),
B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(13),
B(LdaContextSlot), R(1), U8(11), U8(0),
B(Star), R(11),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
B(Ldar), R(10),
B(SetPendingMessage),
B(Ldar), R(8),
B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
B(Jump), U8(27),
B(PopContext), R(1),
B(PopContext), R(1),
B(LdaZero),
B(Star), R(5),
B(Mov), R(9), R(6),
B(Jump), U8(46),
B(PopContext), R(1),
B(PopContext), R(1),
B(LdaSmi), I8(1),
B(Star), R(5),
B(Mov), R(9), R(6),
B(Jump), U8(33),
B(PopContext), R(1),
B(LdaUndefined),
B(Star), R(8),
B(LdaTrue),
B(Star), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
B(Star), R(5),
B(Jump), U8(8),
B(Star), R(6),
B(LdaSmi), I8(1),
B(Star), R(5),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(7),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorClose), R(8), U8(1),
B(Ldar), R(7),
B(SetPendingMessage),
B(Ldar), R(5),
B(SwitchOnSmiNoFeedback), U8(18), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(6),
/* 44 S> */ B(Return),
B(Ldar), R(6),
B(ReThrow),
B(LdaUndefined),
/* 44 S> */ B(Return),
]
constant pool: [
Smi [52],
Smi [148],
FIXED_ARRAY_TYPE,
TUPLE2_TYPE,
SYMBOL_TYPE,
Smi [142],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
FIXED_ARRAY_TYPE,
Smi [6],
Smi [18],
Smi [554],
Smi [6],
Smi [9],
]
handlers: [
[52, 653, 659],
[133, 422, 428],
[136, 378, 380],
[515, 531, 533],
]