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
|
|
|
"
|
2018-01-23 13:51:38 +00:00
|
|
|
frame size: 3
|
2016-04-18 14:13:04 +00:00
|
|
|
parameter count: 1
|
2018-01-24 11:19:51 +00:00
|
|
|
bytecode array length: 44
|
2016-04-18 14:13:04 +00:00
|
|
|
bytecodes: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
/* 11 E> */ B(StackCheck),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
|
|
|
B(Mov), R(closure), R(1),
|
|
|
|
B(Mov), R(this), R(2),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(0),
|
2018-01-23 13:51:38 +00:00
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(1),
|
|
|
|
B(Star), R(1),
|
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),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
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: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
Smi [21],
|
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
|
|
|
"
|
2018-01-23 13:51:38 +00:00
|
|
|
frame size: 3
|
2016-04-18 14:13:04 +00:00
|
|
|
parameter count: 1
|
2018-01-24 11:19:51 +00:00
|
|
|
bytecode array length: 80
|
2016-04-18 14:13:04 +00:00
|
|
|
bytecodes: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
/* 11 E> */ B(StackCheck),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
|
|
B(Mov), R(closure), R(1),
|
|
|
|
B(Mov), R(this), R(2),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(0),
|
2018-01-23 13:51:38 +00:00
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(1),
|
|
|
|
B(Star), R(1),
|
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),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
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),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(1),
|
2017-07-20 12:35:28 +00:00
|
|
|
B(LdaFalse),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Star), R(2),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(1), U8(2),
|
|
|
|
/* 16 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(1),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(1),
|
|
|
|
B(Star), R(1),
|
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),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 16 E> */ B(Throw),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
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: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
Smi [21],
|
|
|
|
Smi [57],
|
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
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 15
|
2016-04-18 14:13:04 +00:00
|
|
|
parameter count: 1
|
2019-09-11 17:04:42 +00:00
|
|
|
bytecode array length: 246
|
2016-04-18 14:13:04 +00:00
|
|
|
bytecodes: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
/* 11 E> */ B(StackCheck),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(Mov), R(this), R(5),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(0),
|
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(4),
|
2019-01-31 15:36:58 +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),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(4),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(4),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 30 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(6),
|
2019-09-06 12:41:00 +00:00
|
|
|
B(GetIterator), R(6), U8(1), U8(3),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Star), R(5),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(5), U8(5),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(context), R(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 25 S> */ B(CallProperty0), R(4), R(5), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
|
|
B(LdaNamedProperty), R(10), U8(6), U8(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(64),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(10), U8(7), U8(11),
|
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(10), R(1),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 16 E> */ B(StackCheck),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 25 S> */ B(Mov), R(1), R(3),
|
2017-07-20 12:35:28 +00:00
|
|
|
/* 36 S> */ B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
|
|
|
B(Mov), R(3), R(11),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
|
|
|
|
/* 36 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(1),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(11),
|
|
|
|
B(Star), R(11),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 36 E> */ B(Throw),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(11), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(20),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpLoop), U8(81), I8(0),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Star), R(7),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
2016-11-16 10:46:23 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Ldar), R(6),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(10), U8(13),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(12),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-10-24 01:15:47 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(159),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(11),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(11), R(5), U8(15),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(Ldar), R(9),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(SetPendingMessage),
|
|
|
|
B(Ldar), R(7),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
|
2017-06-13 13:49:45 +00:00
|
|
|
B(Jump), U8(8),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(8),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(8),
|
2019-01-02 16:12:54 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 44 S> */ B(Return),
|
2016-04-18 14:13:04 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
Smi [21],
|
|
|
|
Smi [118],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2018-07-05 18:34:09 +00:00
|
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
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"],
|
2019-01-02 16:12:54 +00:00
|
|
|
Smi [16],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2016-09-06 16:10:19 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_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: [
|
2019-09-11 17:04:42 +00:00
|
|
|
[66, 150, 158],
|
|
|
|
[182, 215, 217],
|
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();
|
|
|
|
"
|
2019-09-06 12:41:00 +00:00
|
|
|
frame size: 7
|
2017-05-22 14:52:07 +00:00
|
|
|
parameter count: 1
|
2019-09-11 17:04:42 +00:00
|
|
|
bytecode array length: 198
|
2017-05-22 14:52:07 +00:00
|
|
|
bytecodes: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
/* 38 E> */ B(StackCheck),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
|
|
B(Mov), R(closure), R(1),
|
|
|
|
B(Mov), R(this), R(2),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(0),
|
2018-01-23 13:51:38 +00:00
|
|
|
/* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(1),
|
|
|
|
B(Star), R(1),
|
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),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 38 E> */ B(Throw),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(1),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2017-10-19 15:12:42 +00:00
|
|
|
/* 43 S> */ B(LdaGlobal), U8(4), U8(0),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
/* 50 E> */ B(CallUndefinedReceiver0), R(5), U8(2),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(6),
|
2019-09-06 12:41:00 +00:00
|
|
|
B(GetIterator), R(6), U8(4), U8(6),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(3),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(3), U8(5), U8(8),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(5),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
B(Star), R(4),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(LdaZero),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(2),
|
|
|
|
B(Ldar), R(2),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(1),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(CallProperty1), R(5), R(3), R(4), U8(10),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(Jump), U8(63),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(3), U8(8), U8(12),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(11),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallProperty1), R(6), R(3), R(4), U8(14),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(Jump), U8(48),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(4),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(3), U8(9), U8(16),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(11),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallProperty1), R(6), R(3), R(4), U8(18),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(Jump), U8(30),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(3), U8(8), U8(20),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(19),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallProperty0), R(6), R(3), U8(22),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(JumpIfJSReceiver), U8(9),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(1),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(1), U8(10), U8(24),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(24),
|
|
|
|
B(Ldar), R(1),
|
2019-08-23 14:23:52 +00:00
|
|
|
/* 43 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(6),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(4),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Star), R(2),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpLoop), U8(108), I8(0),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(1), U8(11), U8(26),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Star), R(3),
|
2017-05-22 14:52:07 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2018-04-18 00:04:34 +00:00
|
|
|
B(TestReferenceEqual), R(2),
|
2017-06-22 16:31:00 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2018-01-23 13:51:38 +00:00
|
|
|
B(Ldar), R(3),
|
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: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
Smi [21],
|
|
|
|
Smi [165],
|
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"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
2018-01-11 17:24:11 +00:00
|
|
|
Smi [11],
|
2019-08-08 15:56:48 +00:00
|
|
|
Smi [29],
|
2017-05-22 14:52:07 +00:00
|
|
|
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: [
|
|
|
|
]
|
|
|
|
|