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

805 lines
26 KiB
Plaintext
Raw Normal View History

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: no
test function name: f
---
snippet: "
function f() {
for (let x = 0; x < 10; ++x) { let y = x; }
}
f();
"
frame size: 2
parameter count: 1
bytecode array length: 26
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 30 S> */ B(LdaZero),
B(Star), R(1),
/* 35 S> */ B(LdaSmi), I8(10),
/* 35 E> */ B(TestLessThan), R(1), U8(3),
B(JumpIfFalse), U8(15),
/* 17 E> */ B(StackCheck),
/* 56 S> */ B(Mov), R(1), R(0),
/* 43 S> */ B(Ldar), R(0),
B(Inc), U8(4),
B(Star), R(1),
B(JumpLoop), U8(17), I8(0),
B(LdaUndefined),
/* 61 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f() {
for (let x = 0; x < 10; ++x) { eval('1'); }
}
f();
"
frame size: 14
parameter count: 1
bytecode array length: 168
bytecodes: [
B(CreateFunctionContext), U8(3),
B(PushContext), R(3),
B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4),
B(CreateMappedArguments),
B(StaCurrentContextSlot), U8(6),
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 10 E> */ B(StackCheck),
B(Ldar), R(closure),
B(CreateBlockContext), U8(0),
B(PushContext), R(4),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
/* 30 S> */ B(LdaZero),
/* 30 E> */ B(StaCurrentContextSlot), U8(4),
B(LdaCurrentContextSlot), U8(4),
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(1),
/* 59 E> */ B(StackCheck),
B(Ldar), R(closure),
B(CreateBlockContext), U8(1),
B(PushContext), R(5),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(Ldar), R(0),
B(StaCurrentContextSlot), U8(4),
B(LdaSmi), I8(1),
B(TestEqual), R(1), U8(3),
B(JumpIfFalse), U8(7),
B(LdaZero),
B(Star), R(1),
B(Jump), U8(8),
/* 43 S> */ B(LdaCurrentContextSlot), U8(4),
B(Inc), U8(4),
/* 43 E> */ B(StaCurrentContextSlot), U8(4),
B(LdaSmi), I8(1),
B(Star), R(2),
/* 35 S> */ B(LdaCurrentContextSlot), U8(4),
B(Star), R(6),
B(LdaSmi), I8(10),
/* 35 E> */ B(TestLessThan), R(6), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(6),
B(PopContext), R(5),
B(Jump), U8(77),
B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(6),
B(JumpIfFalse), U8(54),
/* 17 E> */ B(StackCheck),
/* 48 S> */ B(LdaLookupGlobalSlot), U8(2), U8(9), U8(1),
B(Star), R(6),
B(LdaConstant), U8(3),
B(Star), R(7),
B(LdaZero),
B(Star), R(11),
B(LdaSmi), I8(31),
B(Star), R(12),
B(LdaSmi), I8(48),
B(Star), R(13),
B(Mov), R(6), R(8),
B(Mov), R(7), R(9),
B(Mov), R(closure), R(10),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(8), U8(6),
B(Star), R(6),
/* 48 E> */ B(CallUndefinedReceiver1), R(6), R(7), U8(7),
B(LdaZero),
B(Star), R(2),
B(LdaCurrentContextSlot), U8(4),
B(Star), R(0),
B(JumpLoop), U8(56), I8(1),
B(LdaSmi), I8(1),
/* 59 E> */ B(TestEqual), R(2), U8(11),
B(JumpIfFalse), U8(6),
B(PopContext), R(5),
B(Jump), U8(7),
B(PopContext), R(5),
B(JumpLoop), U8(125), I8(0),
B(PopContext), R(4),
B(LdaUndefined),
/* 61 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["1"],
]
handlers: [
]
---
snippet: "
function f() {
for (let x = 0; x < 10; ++x) { (function() { return x; })(); }
}
f();
"
frame size: 6
parameter count: 1
bytecode array length: 108
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 30 S> */ B(LdaZero),
B(Star), R(0),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(2),
/* 78 E> */ B(StackCheck),
B(Ldar), R(closure),
B(CreateBlockContext), U8(0),
B(PushContext), R(4),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(Ldar), R(1),
B(StaCurrentContextSlot), U8(4),
B(LdaSmi), I8(1),
B(TestEqual), R(2), U8(3),
B(JumpIfFalse), U8(7),
B(LdaZero),
B(Star), R(2),
B(Jump), U8(8),
/* 43 S> */ B(LdaCurrentContextSlot), U8(4),
B(Inc), U8(4),
/* 43 E> */ B(StaCurrentContextSlot), U8(4),
B(LdaSmi), I8(1),
B(Star), R(3),
/* 35 S> */ B(LdaCurrentContextSlot), U8(4),
B(Star), R(5),
B(LdaSmi), I8(10),
/* 35 E> */ B(TestLessThan), R(5), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(6),
B(PopContext), R(4),
B(Jump), U8(45),
B(LdaSmi), I8(1),
B(TestEqual), R(3), U8(6),
B(JumpIfFalse), U8(22),
/* 17 E> */ B(StackCheck),
/* 48 S> */ B(CreateClosure), U8(1), U8(9), U8(2),
B(Star), R(5),
/* 74 E> */ B(CallUndefinedReceiver0), R(5), U8(7),
B(LdaZero),
B(Star), R(3),
B(LdaCurrentContextSlot), U8(4),
B(Star), R(1),
B(JumpLoop), U8(24), I8(1),
B(LdaSmi), I8(1),
/* 78 E> */ B(TestEqual), R(3), U8(10),
B(JumpIfFalse), U8(6),
B(PopContext), R(4),
B(Jump), U8(7),
B(PopContext), R(4),
B(JumpLoop), U8(93), I8(0),
B(LdaUndefined),
/* 80 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]
---
snippet: "
function f() {
for (let { x, y } = { x: 0, y: 3 }; y > 0; --y) { let z = x + y; }
}
f();
"
frame size: 6
parameter count: 1
bytecode array length: 68
bytecodes: [
/* 10 E> */ B(StackCheck),
B(CreateObjectLiteral), U8(0), U8(3), U8(21), R(4),
B(Mov), R(4), R(3),
B(Ldar), R(3),
B(JumpIfUndefined), U8(6),
B(Ldar), R(3),
B(JumpIfNotNull), U8(16),
[parser] Better error message when destructuring against undefined/null Previously, when destructuring against null or undefined we would print: d8> var { x } = null (d8):1: TypeError: Cannot match against 'undefined' or 'null'. var { x } = null ^ TypeError: Cannot match against 'undefined' or 'null'. at (d8):1:1 The above message uses the term "match" which isn't a common term in JavaScript to describe destructuring. This message also doesn't provide the name of the property that fails destructuring. This patch changes the error message to be: d8> var { x } = null; (d8):1: TypeError: Cannot destructure property `x` of 'undefined' or 'null'. var { x } = null; ^ TypeError: Cannot destructure property `x` of 'undefined' or 'null'. at (d8):1:1 This patch changes the message to say "destructure" instead of "match". This patch adds support for printing property names that are string literals. We iterate through every property and pick the first string literal property name if it exists. This provides at least some feedback to the developer. This patch also makes the pointer point to the position of the property name that fails destructuring. For computed and numeric property names, we print a generic error: d8> var { 1: x } = null (d8):1: TypeError: Cannot destructure against 'undefined' or 'null'. var { 1: x } = null ^ TypeError: Cannot destructure against 'undefined' or 'null'. at (d8):1:1 Bug: v8:6499 Change-Id: I35b1ac749489828686f042975294b9926e2dfc53 Reviewed-on: https://chromium-review.googlesource.com/537341 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#45965}
2017-06-15 21:24:37 +00:00
B(LdaSmi), I8(62),
B(Star), R(4),
B(LdaConstant), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kNewTypeError), R(4), U8(2),
[parser] Better error message when destructuring against undefined/null Previously, when destructuring against null or undefined we would print: d8> var { x } = null (d8):1: TypeError: Cannot match against 'undefined' or 'null'. var { x } = null ^ TypeError: Cannot match against 'undefined' or 'null'. at (d8):1:1 The above message uses the term "match" which isn't a common term in JavaScript to describe destructuring. This message also doesn't provide the name of the property that fails destructuring. This patch changes the error message to be: d8> var { x } = null; (d8):1: TypeError: Cannot destructure property `x` of 'undefined' or 'null'. var { x } = null; ^ TypeError: Cannot destructure property `x` of 'undefined' or 'null'. at (d8):1:1 This patch changes the message to say "destructure" instead of "match". This patch adds support for printing property names that are string literals. We iterate through every property and pick the first string literal property name if it exists. This provides at least some feedback to the developer. This patch also makes the pointer point to the position of the property name that fails destructuring. For computed and numeric property names, we print a generic error: d8> var { 1: x } = null (d8):1: TypeError: Cannot destructure against 'undefined' or 'null'. var { 1: x } = null ^ TypeError: Cannot destructure against 'undefined' or 'null'. at (d8):1:1 Bug: v8:6499 Change-Id: I35b1ac749489828686f042975294b9926e2dfc53 Reviewed-on: https://chromium-review.googlesource.com/537341 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#45965}
2017-06-15 21:24:37 +00:00
/* 28 E> */ B(Throw),
/* 37 S> */ B(LdaNamedProperty), R(3), U8(1), U8(6),
B(Star), R(1),
[parser] Better error message when destructuring against undefined/null Previously, when destructuring against null or undefined we would print: d8> var { x } = null (d8):1: TypeError: Cannot match against 'undefined' or 'null'. var { x } = null ^ TypeError: Cannot match against 'undefined' or 'null'. at (d8):1:1 The above message uses the term "match" which isn't a common term in JavaScript to describe destructuring. This message also doesn't provide the name of the property that fails destructuring. This patch changes the error message to be: d8> var { x } = null; (d8):1: TypeError: Cannot destructure property `x` of 'undefined' or 'null'. var { x } = null; ^ TypeError: Cannot destructure property `x` of 'undefined' or 'null'. at (d8):1:1 This patch changes the message to say "destructure" instead of "match". This patch adds support for printing property names that are string literals. We iterate through every property and pick the first string literal property name if it exists. This provides at least some feedback to the developer. This patch also makes the pointer point to the position of the property name that fails destructuring. For computed and numeric property names, we print a generic error: d8> var { 1: x } = null (d8):1: TypeError: Cannot destructure against 'undefined' or 'null'. var { 1: x } = null ^ TypeError: Cannot destructure against 'undefined' or 'null'. at (d8):1:1 Bug: v8:6499 Change-Id: I35b1ac749489828686f042975294b9926e2dfc53 Reviewed-on: https://chromium-review.googlesource.com/537341 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#45965}
2017-06-15 21:24:37 +00:00
/* 37 S> */ B(LdaNamedProperty), R(3), U8(2), U8(8),
B(Star), R(2),
/* 55 S> */ B(LdaZero),
/* 55 E> */ B(TestGreaterThan), R(2), U8(10),
B(JumpIfFalse), U8(19),
/* 17 E> */ B(StackCheck),
/* 75 S> */ B(Ldar), R(2),
/* 77 E> */ B(Add), R(1), U8(12),
B(Star), R(0),
/* 62 S> */ B(Ldar), R(2),
B(Dec), U8(11),
B(Star), R(2),
B(JumpLoop), U8(20), I8(0),
B(LdaUndefined),
/* 84 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["y"],
]
handlers: [
]
---
snippet: "
function* f() {
for (let x = 0; x < 10; ++x) { let y = x; }
}
f();
"
frame size: 11
parameter count: 1
bytecode array length: 172
bytecodes: [
B(Mov), R(new_target), R(7),
B(Ldar), R(new_target),
B(JumpIfUndefined), U8(25),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(7), U8(1),
B(PushContext), R(9),
B(RestoreGeneratorState), R(7),
B(Star), R(8),
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(9),
B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(8),
B(Mov), R(closure), R(9),
B(Mov), R(this), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
B(Star), R(3),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(3), R(7),
B(Mov), R(3), R(9),
/* 11 E> */ B(SuspendGenerator), R(7), R(0), U8(9), U8(0),
B(Ldar), R(9),
/* 62 S> */ B(Return),
B(RestoreGeneratorRegisters), R(7), R(0), U8(9),
B(LdaSmi), I8(-2),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(Star), R(9),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Ldar), R(9),
/* 11 E> */ B(Throw),
B(Ldar), R(9),
/* 62 S> */ B(Return),
/* 31 S> */ B(LdaZero),
B(Star), R(2),
B(Star), R(4),
B(LdaSmi), I8(1),
B(Star), R(5),
/* 60 E> */ B(StackCheck),
B(Mov), R(4), R(1),
B(LdaSmi), I8(1),
B(TestEqual), R(5), U8(3),
B(JumpIfFalse), U8(7),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(8),
/* 44 S> */ B(Ldar), R(1),
B(Inc), U8(4),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(6),
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(1), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
B(Jump), U8(36),
B(LdaSmi), I8(1),
B(TestEqual), R(6), U8(6),
B(JumpIfFalse), U8(17),
/* 18 E> */ B(StackCheck),
/* 57 S> */ B(Mov), R(1), R(0),
B(LdaZero),
B(Star), R(6),
B(Mov), R(0), R(4),
B(Ldar), R(4),
B(JumpLoop), U8(19), I8(1),
B(LdaSmi), I8(1),
/* 60 E> */ B(TestEqual), R(6), U8(7),
B(JumpIfFalse), U8(4),
B(Jump), U8(5),
B(JumpLoop), U8(68), I8(0),
B(LdaUndefined),
/* 62 S> */ B(Return),
]
constant pool: [
Smi [45],
Smi [10],
Smi [7],
]
handlers: [
]
---
snippet: "
function* f() {
for (let x = 0; x < 10; ++x) yield x;
}
f();
"
frame size: 11
parameter count: 1
bytecode array length: 260
bytecodes: [
B(Mov), R(new_target), R(6),
B(Ldar), R(new_target),
B(JumpIfUndefined), U8(25),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(6), U8(1),
B(PushContext), R(8),
B(RestoreGeneratorState), R(6),
B(Star), R(7),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(8),
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(7),
B(Mov), R(closure), R(8),
B(Mov), R(this), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(8), U8(2),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
B(LdaZero),
B(Mov), R(2), R(6),
B(Mov), R(2), R(8),
/* 11 E> */ B(SuspendGenerator), R(6), R(0), U8(8), U8(0),
B(Ldar), R(8),
/* 56 S> */ B(Return),
B(RestoreGeneratorRegisters), R(6), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(8),
/* 11 E> */ B(Throw),
B(Ldar), R(8),
/* 56 S> */ B(Return),
/* 31 S> */ B(LdaZero),
B(Star), R(1),
B(Star), R(3),
B(LdaSmi), I8(1),
B(Star), R(4),
B(Ldar), R(7),
B(SwitchOnSmiNoFeedback), U8(4), U8(1), I8(1),
B(LdaSmi), I8(-2),
/* 54 E> */ B(TestEqualStrictNoFeedback), R(7),
B(JumpIfTrue), U8(11),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(8),
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
B(StackCheck),
B(Mov), R(3), R(0),
B(LdaSmi), I8(1),
B(TestEqual), R(4), U8(3),
B(JumpIfFalse), U8(7),
B(LdaZero),
B(Star), R(4),
B(Jump), U8(8),
/* 44 S> */ B(Ldar), R(0),
B(Inc), U8(4),
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(5),
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(0), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
B(Jump), U8(103),
B(Ldar), R(7),
B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
B(LdaSmi), I8(-2),
B(TestEqualStrictNoFeedback), R(7),
B(JumpIfTrue), U8(11),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(8),
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
B(LdaSmi), I8(1),
B(TestEqual), R(5), U8(6),
B(JumpIfFalse), U8(63),
/* 18 E> */ B(StackCheck),
/* 47 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(8),
B(SuspendGenerator), R(6), R(0), U8(8), U8(0),
B(LdaFalse),
B(Star), R(10),
B(Mov), R(8), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
/* 56 S> */ B(Return),
B(RestoreGeneratorRegisters), R(6), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0),
B(Ldar), R(8),
/* 47 E> */ B(Throw),
B(Ldar), R(8),
/* 56 S> */ B(Return),
B(LdaZero),
B(Star), R(5),
B(Mov), R(0), R(3),
B(Ldar), R(3),
B(JumpLoop), U8(86), I8(1),
B(LdaSmi), I8(1),
/* 54 E> */ B(TestEqual), R(5), U8(7),
B(JumpIfFalse), U8(4),
B(Jump), U8(5),
B(JumpLoop), U8(156), I8(0),
B(LdaUndefined),
/* 56 S> */ B(Return),
]
constant pool: [
Smi [45],
Smi [82],
Smi [10],
Smi [7],
Smi [56],
Smi [48],
Smi [10],
Smi [7],
]
handlers: [
]
---
snippet: "
async function f() {
for (let x = 0; x < 10; ++x) { let y = x; }
}
f();
"
frame size: 17
parameter count: 1
bytecode array length: 207
bytecodes: [
/* 16 E> */ B(StackCheck),
B(LdaUndefined),
B(Star), R(8),
B(CallJSRuntime), U8(%async_function_promise_create), R(8), U8(1),
B(Star), R(7),
B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
/* 36 S> */ B(LdaZero),
B(Star), R(2),
B(Star), R(4),
B(LdaSmi), I8(1),
B(Star), R(5),
/* 65 E> */ B(StackCheck),
B(Mov), R(4), R(1),
B(LdaSmi), I8(1),
B(TestEqual), R(5), U8(3),
B(JumpIfFalse), U8(7),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(8),
/* 49 S> */ B(Ldar), R(1),
B(Inc), U8(4),
B(Star), R(1),
B(LdaSmi), I8(1),
B(Star), R(6),
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(1), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
B(Jump), U8(36),
B(LdaSmi), I8(1),
B(TestEqual), R(6), U8(6),
B(JumpIfFalse), U8(17),
/* 23 E> */ B(StackCheck),
/* 62 S> */ B(Mov), R(1), R(0),
B(LdaZero),
B(Star), R(6),
B(Mov), R(0), R(4),
B(Ldar), R(4),
B(JumpLoop), U8(19), I8(1),
B(LdaSmi), I8(1),
/* 65 E> */ B(TestEqual), R(6), U8(7),
B(JumpIfFalse), U8(4),
B(Jump), U8(5),
B(JumpLoop), U8(68), I8(0),
B(LdaUndefined),
B(Star), R(12),
B(LdaUndefined),
B(Star), R(14),
B(Mov), R(7), R(13),
B(CallJSRuntime), U8(%promise_resolve), R(12), U8(3),
B(LdaZero),
B(Star), R(8),
B(Mov), R(7), R(9),
B(Jump), U8(59),
B(Jump), U8(45),
B(Star), R(12),
B(Ldar), R(closure),
B(CreateCatchContext), R(12), U8(0), U8(1),
B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(11),
B(PushContext), R(12),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(15),
B(LdaFalse),
B(Star), R(16),
B(Mov), R(7), R(14),
B(CallJSRuntime), U8(%promise_internal_reject), R(13), U8(4),
B(PopContext), R(12),
B(LdaZero),
B(Star), R(8),
B(Mov), R(7), R(9),
B(Jump), U8(14),
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(LdaUndefined),
B(Star), R(11),
B(Mov), R(7), R(12),
B(CallJSRuntime), U8(%async_function_promise_release), R(11), U8(2),
B(Ldar), R(10),
B(SetPendingMessage),
B(Ldar), R(8),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(9),
/* 67 S> */ B(Return),
B(Ldar), R(9),
B(ReThrow),
B(LdaUndefined),
/* 67 S> */ B(Return),
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
Smi [6],
Smi [9],
]
handlers: [
[13, 162, 168],
[16, 117, 119],
]
---
snippet: "
async function f() {
for (let x = 0; x < 10; ++x) await x;
}
f();
"
frame size: 18
parameter count: 1
bytecode array length: 356
bytecodes: [
B(Mov), R(new_target), R(7),
B(Ldar), R(new_target),
B(JumpIfUndefined), U8(25),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(7), U8(1),
B(PushContext), R(9),
B(RestoreGeneratorState), R(7),
B(Star), R(8),
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(9),
B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(8),
B(Mov), R(closure), R(9),
B(Mov), R(this), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(LdaUndefined),
B(Star), R(9),
B(CallJSRuntime), U8(%async_function_promise_create), R(9), U8(1),
B(Star), R(3),
B(Mov), R(2), R(7),
B(Mov), R(context), R(11),
B(Mov), R(context), R(12),
/* 36 S> */ B(LdaZero),
B(Star), R(1),
B(Star), R(4),
B(LdaSmi), I8(1),
B(Star), R(5),
B(Ldar), R(8),
B(SwitchOnSmiNoFeedback), U8(1), U8(1), I8(0),
B(LdaSmi), I8(-2),
/* 59 E> */ B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(11),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
B(StackCheck),
B(Mov), R(4), R(0),
B(LdaSmi), I8(1),
B(TestEqual), R(5), U8(3),
B(JumpIfFalse), U8(7),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(8),
/* 49 S> */ B(Ldar), R(0),
B(Inc), U8(4),
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(6),
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(0), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
B(Jump), U8(115),
B(Ldar), R(8),
B(SwitchOnSmiNoFeedback), U8(2), U8(1), I8(0),
B(LdaSmi), I8(-2),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(11),
Revert "[compiler] Drive optimizations with feedback vector" This reverts commit e39c9e020f53f161fff2bf8c617aa01f9459f31a. Reason for revert: Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/15561 Original change's description: > [compiler] Drive optimizations with feedback vector > > For interpreted functions, use the optimized code slot in the feedback vector > to store an optimization marker (optimize/in optimization queue) rather than > changing the JSFunction's code object. Then, adapt the self-healing mechanism > to also dispatch based on this optimization marker. Similarly, replace SFI > marking with optimization marker checks in CompileLazy. > > This allows JSFunctions to share optimization information (replacing shared > function marking) without leaking this information across native contexts. Non > I+TF functions (asm.js or --no-turbo) use a CheckOptimizationMarker shim which > generalises the old CompileOptimized/InOptimizationQueue builtins and also > checks the same optimization marker as CompileLazy and > InterpreterEntryTrampoline. > > Change-Id: I6826bdde7ab9a919cdb6b69bc0ebc6174bcb91ae > Reviewed-on: https://chromium-review.googlesource.com/509716 > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#45901} TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ib6c2b4d90fc5f659a6dcaf3fd30321507ca9cb94 Reviewed-on: https://chromium-review.googlesource.com/532916 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#45903}
2017-06-13 13:24:05 +00:00
B(LdaSmi), I8(79),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
B(LdaSmi), I8(1),
B(TestEqual), R(6), U8(6),
B(JumpIfFalse), U8(75),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(LdaUndefined),
B(Star), R(13),
B(Mov), R(2), R(14),
B(Mov), R(0), R(15),
B(Mov), R(3), R(16),
/* 58 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaZero),
B(Mov), R(3), R(13),
B(SuspendGenerator), R(7), R(0), U8(13), U8(2),
B(Ldar), R(13),
/* 61 S> */ B(Return),
B(RestoreGeneratorRegisters), R(7), R(0), U8(13),
B(LdaSmi), I8(-2),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
B(Ldar), R(13),
/* 52 E> */ B(ReThrow),
B(LdaZero),
B(Star), R(9),
B(Mov), R(13), R(10),
B(Jump), U8(103),
B(LdaZero),
B(Star), R(6),
B(Mov), R(0), R(4),
B(Ldar), R(4),
B(JumpLoop), U8(98), I8(1),
B(LdaSmi), I8(1),
/* 59 E> */ B(TestEqual), R(6), U8(7),
B(JumpIfFalse), U8(4),
B(Jump), U8(5),
B(JumpLoop), U8(168), I8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaUndefined),
B(Star), R(15),
B(Mov), R(3), R(14),
B(CallJSRuntime), U8(%promise_resolve), R(13), U8(3),
B(LdaZero),
B(Star), R(9),
B(Mov), R(3), R(10),
B(Jump), U8(59),
B(Jump), U8(45),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(5), U8(6),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(13),
B(LdaUndefined),
B(Star), R(14),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(16),
B(LdaFalse),
B(Star), R(17),
B(Mov), R(3), R(15),
B(CallJSRuntime), U8(%promise_internal_reject), R(14), U8(4),
B(PopContext), R(13),
B(LdaZero),
B(Star), R(9),
B(Mov), R(3), R(10),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
B(Star), R(9),
B(Jump), U8(8),
B(Star), R(10),
B(LdaSmi), I8(1),
B(Star), R(9),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(11),
B(LdaUndefined),
B(Star), R(12),
B(Mov), R(3), R(13),
B(CallJSRuntime), U8(%async_function_promise_release), R(12), U8(2),
B(Ldar), R(11),
B(SetPendingMessage),
B(Ldar), R(9),
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(10),
/* 61 S> */ B(Return),
B(Ldar), R(10),
B(ReThrow),
B(LdaUndefined),
/* 61 S> */ B(Return),
]
constant pool: [
Smi [57],
Smi [56],
Smi [55],
Smi [15],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
Smi [6],
Smi [9],
]
handlers: [
[62, 311, 317],
[65, 266, 268],
]