v8/test/cctest/interpreter/bytecode_expectations/Generators.golden

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

459 lines
16 KiB
Plaintext
Raw Normal View History

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: no
test function name: f
---
snippet: "
function* f() { }
f();
"
frame size: 4
parameter count: 1
bytecode array length: 73
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(18),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(RestoreGeneratorState), R(0),
B(Star), R(1),
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(Abort), U8(43),
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),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
/* 16 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Ldar), R(2),
/* 11 E> */ B(Throw),
B(Ldar), R(2),
/* 16 S> */ B(Return),
B(LdaUndefined),
/* 16 S> */ B(Return),
]
constant pool: [
Smi [29],
Smi [10],
Smi [7],
]
handlers: [
]
---
snippet: "
function* f() { yield 42 }
f();
"
frame size: 4
parameter count: 1
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(2),
B(RestoreGeneratorState), R(0),
B(Star), R(1),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(Abort), U8(43),
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),
B(Star), R(0),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
/* 25 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(2),
/* 11 E> */ B(Throw),
B(Ldar), R(2),
/* 25 S> */ B(Return),
/* 16 S> */ B(LdaSmi), I8(42),
B(Star), R(2),
B(LdaFalse),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(2), U8(2),
B(SuspendGenerator), R(0), R(0), U8(2), U8(1),
/* 25 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
B(Ldar), R(2),
/* 16 E> */ B(Throw),
B(Ldar), R(2),
/* 25 S> */ B(Return),
B(LdaUndefined),
/* 25 S> */ B(Return),
]
constant pool: [
Smi [29],
Smi [74],
Smi [10],
Smi [7],
Smi [10],
Smi [7],
]
handlers: [
]
---
snippet: "
function* f() { for (let x of [42]) yield x }
f();
"
frame size: 17
parameter count: 1
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
bytecode array length: 402
bytecodes: [
B(Ldar), R(2),
B(JumpIfUndefined), U8(18),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
B(PushContext), R(11),
B(RestoreGeneratorState), R(2),
B(Star), R(10),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(Abort), U8(43),
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),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0),
/* 44 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(11),
B(LdaSmi), I8(-2),
B(Star), R(10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(11),
/* 11 E> */ B(Throw),
B(Ldar), R(11),
/* 44 S> */ B(Return),
B(LdaZero),
B(Star), R(6),
B(Mov), R(context), R(13),
B(Mov), R(context), R(14),
/* 30 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
B(Star), R(15),
B(LdaNamedProperty), R(15), U8(5), U8(1),
B(Star), R(16),
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),
B(Star), R(4),
B(Ldar), R(10),
B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
B(LdaSmi), I8(-2),
/* 30 E> */ B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(4),
B(Abort), U8(43),
/* 25 S> */ B(LdaNamedProperty), R(4), U8(7), U8(7),
B(Star), R(15),
B(CallProperty0), R(15), R(4), U8(5),
B(Star), R(5),
/* 25 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(8), U8(9),
B(JumpIfToBooleanTrue), U8(74),
B(LdaNamedProperty), R(5), U8(9), U8(11),
B(Star), R(7),
B(LdaSmi), I8(2),
B(Star), R(6),
B(Mov), R(7), R(3),
/* 16 E> */ B(StackCheck),
B(Mov), R(3), R(0),
/* 36 S> */ B(LdaFalse),
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),
/* 44 S> */ B(Return),
B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
B(LdaSmi), I8(-2),
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),
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
B(Ldar), R(15),
/* 36 E> */ B(Throw),
B(LdaZero),
B(Star), R(11),
B(Mov), R(15), R(12),
B(Jump), U8(58),
B(LdaZero),
B(Star), R(6),
B(JumpLoop), U8(113), I8(0),
B(Jump), U8(36),
B(Star), R(15),
B(Ldar), R(closure),
B(CreateCatchContext), R(15), U8(12), U8(13),
B(PushContext), R(15),
B(Star), R(14),
B(LdaSmi), I8(2),
B(TestEqualStrict), R(6), U8(13),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1),
B(Star), R(6),
Reland of Thread maybe-assigned through the bytecodes. (patchset #1 id:1 of https://codereview.chromium.org/2680923003/ ) Reason for revert: False alarm, bot hiccup Original issue's description: > Revert of Thread maybe-assigned through the bytecodes. (patchset #5 id:80001 of https://codereview.chromium.org/2655733003/ ) > > Reason for revert: > needed for properly reverting https://chromium.googlesource.com/v8/v8/+/f3ae5ccf57690d8c2d87c4fe1d10b103ad6a4ab3 > > Original issue's description: > > Thread maybe-assigned through the bytecodes. > > > > This introduces LoadImmutableContextSlot and LoadImmutableCurrentContextSlot > > bytecodes, which are emitted when reading from never-assigned context slot. > > > > There is a subtlety here: the slot are not immutable, the meaning is > > actually undefined-or-hole-or-immutable. > > > > Review-Url: https://codereview.chromium.org/2655733003 > > Cr-Commit-Position: refs/heads/master@{#43000} > > Committed: https://chromium.googlesource.com/v8/v8/+/17c2dd388697da626224c371c8181d20d2016d82 > > TBR=rmcilroy@chromium.org,bmeurer@chromium.org,neis@chromium.org,jarin@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Review-Url: https://codereview.chromium.org/2680923003 > Cr-Commit-Position: refs/heads/master@{#43011} > Committed: https://chromium.googlesource.com/v8/v8/+/ece4e54a31ac76ee9c450270d65270562db716e1 TBR=rmcilroy@chromium.org,bmeurer@chromium.org,neis@chromium.org,jarin@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2679953003 Cr-Commit-Position: refs/heads/master@{#43012}
2017-02-07 20:42:03 +00:00
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(16),
B(CallRuntime), U16(Runtime::kReThrow), R(16), U8(1),
B(PopContext), R(15),
B(LdaSmi), I8(-1),
B(Star), R(12),
B(Star), R(11),
B(Jump), U8(8),
B(Star), R(12),
B(LdaSmi), I8(1),
B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(13),
B(LdaZero),
B(TestEqualStrict), R(6), U8(14),
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
B(JumpIfTrue), U8(104),
B(LdaNamedProperty), R(4), U8(14), U8(15),
B(Star), R(8),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
B(Jump), U8(93),
B(LdaSmi), I8(1),
B(TestEqualStrict), R(6), U8(18),
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
B(JumpIfFalse), U8(61),
B(Ldar), R(8),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(137),
B(Star), R(14),
B(LdaConstant), U8(15),
B(Star), R(15),
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
B(Throw),
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),
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
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),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(14),
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
B(PushContext), R(15),
B(PopContext), R(15),
B(Jump), U8(27),
B(Mov), R(8), R(14),
B(Mov), R(4), R(15),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
B(Star), R(9),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(Ldar), R(13),
B(SetPendingMessage),
B(Ldar), R(11),
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(12),
/* 44 S> */ B(Return),
B(Ldar), R(12),
B(ReThrow),
B(LdaUndefined),
/* 44 S> */ B(Return),
]
constant pool: [
Smi [29],
Smi [91],
Smi [10],
Smi [7],
TUPLE2_TYPE,
SYMBOL_TYPE,
Smi [75],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
Smi [15],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
Revert "[language] Implement optional catch binding proposal" This reverts commit d0651bd108e0ee70ae822eda9bad7049cb2f3df4. Reason for revert: Breaks gc stress with embedded snapshot: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/15355 Original change's description: > [language] Implement optional catch binding proposal > > This allows the syntax `try {} catch {}` (with no binding after the > `catch`). > > See https://github.com/michaelficarra/optional-catch-binding-proposal/ > > Currently behind --harmony-optional-catch-binding. > > As part of the implementation, this allows TryCatchStatements to not > have an associated catch scope; various paths which assumed they > would have been updated to handle this case. > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ic525b45199eef025eb05da562e10fbd4f3d7465f > Reviewed-on: https://chromium-review.googlesource.com/571453 > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Kevin Gibbons <bakkot@gmail.com> > Cr-Commit-Position: refs/heads/master@{#48300} TBR=rmcilroy@chromium.org,adamk@chromium.org,marja@chromium.org,gsathya@chromium.org,bakkot@gmail.com Change-Id: I63d68160ec75b87e28d3dcdddca2d8b7d0503b46 No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/702334 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48303}
2017-10-05 08:30:58 +00:00
FIXED_ARRAY_TYPE,
Smi [6],
Smi [9],
]
handlers: [
[77, 257, 265],
[80, 221, 223],
[326, 336, 338],
]
---
snippet: "
function* g() { yield 42 }
function* f() { yield* g() }
f();
"
frame size: 9
parameter count: 1
bytecode array length: 265
bytecodes: [
B(Ldar), R(0),
B(JumpIfUndefined), U8(18),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
B(PushContext), R(2),
B(RestoreGeneratorState), R(0),
B(Star), R(1),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(Abort), U8(43),
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),
B(Star), R(0),
/* 38 E> */ B(StackCheck),
/* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
/* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(2),
/* 38 E> */ B(Throw),
B(Ldar), R(2),
/* 54 S> */ B(Return),
/* 43 S> */ B(LdaGlobal), U8(4), U8(2),
B(Star), R(8),
/* 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),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(4),
B(LdaUndefined),
B(Star), R(5),
B(LdaZero),
B(Star), R(3),
B(Ldar), R(1),
B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
B(LdaSmi), I8(-2),
B(TestEqualStrictNoFeedback), R(1),
B(JumpIfTrue), U8(4),
B(Abort), U8(43),
B(Ldar), R(3),
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(1),
B(LdaNamedProperty), R(4), U8(9), U8(8),
B(Star), R(8),
B(CallProperty1), R(8), R(4), R(5), U8(22),
B(Jump), U8(65),
B(LdaNamedProperty), R(4), U8(10), U8(6),
B(JumpIfUndefined), U8(13),
B(JumpIfNull), U8(11),
B(Star), R(8),
B(CallProperty1), R(8), R(4), R(5), U8(18),
B(Jump), U8(48),
B(Ldar), R(5),
/* 54 S> */ B(Return),
B(LdaNamedProperty), R(4), U8(11), U8(10),
B(JumpIfUndefined), U8(13),
B(JumpIfNull), U8(11),
B(Star), R(8),
B(CallProperty1), R(8), R(4), R(5), U8(24),
B(Jump), U8(28),
B(LdaNamedProperty), R(4), U8(10), U8(6),
B(Star), R(8),
B(JumpIfUndefined), U8(15),
B(JumpIfNull), U8(13),
B(CallProperty0), R(8), R(4), U8(20),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
B(Star), R(2),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
B(LdaNamedProperty), R(2), U8(12), U8(12),
B(JumpIfToBooleanTrue), U8(33),
B(Ldar), R(2),
B(SuspendGenerator), R(0), R(0), U8(8), U8(1),
/* 54 S> */ B(Return),
B(RestoreGeneratorRegisters), R(0), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(1),
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(Star), R(3),
B(JumpLoop), U8(139), I8(0),
B(LdaNamedProperty), R(2), U8(13), U8(14),
B(Star), R(4),
B(LdaSmi), I8(1),
B(TestEqualStrictNoFeedback), R(3),
B(JumpIfFalse), U8(5),
B(Ldar), R(4),
/* 54 S> */ B(Return),
B(LdaUndefined),
/* 54 S> */ B(Return),
]
constant pool: [
Smi [29],
Smi [92],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
SYMBOL_TYPE,
Smi [117],
Smi [17],
Smi [37],
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: [
]