2016-10-04 18:42:13 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
wrap: no
|
|
|
|
module: yes
|
|
|
|
top level: yes
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
import \"bar\";
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 143
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(64),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 13 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 13 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(StaCurrentContextSlot), U8(6),
|
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 13 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
import {foo} from \"bar\";
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 143
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(64),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 24 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 24 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(StaCurrentContextSlot), U8(6),
|
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 24 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
import {foo as goo} from \"bar\";
|
|
|
|
goo(42);
|
|
|
|
{ let x; { goo(42) } };
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 10
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
bytecode array length: 213
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(2),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(64),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(arg0), R(4),
|
|
|
|
B(Mov), R(closure), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(4),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(5), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 64 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(6),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
|
|
|
|
B(Star), R(7),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Mov), R(6), R(8),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 64 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
/* 32 S> */ B(LdaUndefined),
|
|
|
|
B(Star), R(5),
|
|
|
|
/* 32 E> */ B(LdaModuleVariable), I8(-1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(JumpIfNotHole), U8(11),
|
2016-11-07 16:23:20 +00:00
|
|
|
B(LdaConstant), U8(1),
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(42),
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
/* 32 E> */ B(Call1), R(4), R(5), R(6), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Ldar), R(closure),
|
2016-11-07 16:23:20 +00:00
|
|
|
B(CreateBlockContext), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(1),
|
|
|
|
B(LdaTheHole),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 47 S> */ B(LdaUndefined),
|
2016-10-28 10:10:32 +00:00
|
|
|
/* 47 E> */ B(StaCurrentContextSlot), U8(4),
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
/* 52 S> */ B(LdaUndefined),
|
|
|
|
B(Star), R(5),
|
|
|
|
/* 52 E> */ B(LdaModuleVariable), I8(-1), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(JumpIfNotHole), U8(11),
|
2016-11-07 16:23:20 +00:00
|
|
|
B(LdaConstant), U8(1),
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(42),
|
Revert "[ignition] Add call bytecodes for undefined receiver"
This reverts commit 751e89359123df4f6e5f0b28b89fcdf63ed16a77.
Reason for revert: Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14885
See:
https://github.com/v8/v8/wiki/Blink-layout-tests
Original change's description:
> [ignition] Add call bytecodes for undefined receiver
>
> Adds a collection of call bytecodes which have an implicit undefined
> receiver argument, for cases such as global calls where we know that the
> receiver has to be undefined. This way we can skip an LdaUndefined,
> decrease bytecode register pressure, and set a more accurate
> ConvertReceiverMode on the interpreter and TurboFan call.
>
> As a side effect, the "normal" Call bytecode now becomes a rare case
> (only with calls and super property calls), so we get rid of its 0-2
> argument special cases and modify CallProperty[N] to use the
> NotNullOrUndefined ConvertReceiverMode.
>
> Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
> Reviewed-on: https://chromium-review.googlesource.com/463287
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44530}
TBR=rmcilroy@chromium.org,mstarzinger@chromium.org,leszeks@chromium.org,v8-reviews@googlegroups.com,v8-mips-ports@googlegroups.com,v8-ppc-ports@googlegroups.com,v8-x87-ports@googlegroups.com,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7629dec609d0ec938ce7105d6c1c74884e5f9272
Reviewed-on: https://chromium-review.googlesource.com/474744
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44548}
2017-04-11 06:26:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
/* 52 E> */ B(Call1), R(4), R(5), R(6), U8(4),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(StaContextSlot), R(1), U8(6), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PopContext), R(1),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 64 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export var foo = 42;
|
|
|
|
foo++;
|
|
|
|
{ let x; { foo++ } };
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 10
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
2017-04-06 11:54:44 +00:00
|
|
|
bytecode array length: 185
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(2),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(64),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(arg0), R(4),
|
|
|
|
B(Mov), R(closure), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(4),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(5), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 49 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(6),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
|
|
|
|
B(Star), R(7),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Mov), R(6), R(8),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 49 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 17 S> */ B(LdaSmi), I8(42),
|
|
|
|
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
|
|
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Inc), U8(2),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 24 E> */ B(StaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Ldar), R(closure),
|
2016-11-07 16:23:20 +00:00
|
|
|
B(CreateBlockContext), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(1),
|
|
|
|
B(LdaTheHole),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 34 S> */ B(LdaUndefined),
|
2016-10-28 10:10:32 +00:00
|
|
|
/* 34 E> */ B(StaCurrentContextSlot), U8(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 39 S> */ B(LdaModuleVariable), I8(1), U8(1),
|
2017-04-06 11:54:44 +00:00
|
|
|
B(ToNumber), R(4), U8(3),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Inc), U8(3),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 E> */ B(StaModuleVariable), I8(1), U8(1),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(4),
|
|
|
|
B(StaContextSlot), R(1), U8(6), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PopContext), R(1),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 49 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export let foo = 42;
|
|
|
|
foo++;
|
|
|
|
{ let x; { foo++ } };
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 10
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
2017-04-06 11:54:44 +00:00
|
|
|
bytecode array length: 189
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(2),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(68),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(arg0), R(4),
|
|
|
|
B(Mov), R(closure), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaTheHole),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(StaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(4),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(5), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 49 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(6),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
|
|
|
|
B(Star), R(7),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Mov), R(6), R(8),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 49 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 17 S> */ B(LdaSmi), I8(42),
|
|
|
|
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
|
|
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Inc), U8(2),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 24 E> */ B(StaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Ldar), R(closure),
|
2016-11-07 16:23:20 +00:00
|
|
|
B(CreateBlockContext), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(1),
|
|
|
|
B(LdaTheHole),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 34 S> */ B(LdaUndefined),
|
2016-10-28 10:10:32 +00:00
|
|
|
/* 34 E> */ B(StaCurrentContextSlot), U8(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 39 S> */ B(LdaModuleVariable), I8(1), U8(1),
|
2017-04-06 11:54:44 +00:00
|
|
|
B(ToNumber), R(4), U8(3),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Inc), U8(3),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 E> */ B(StaModuleVariable), I8(1), U8(1),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(4),
|
|
|
|
B(StaContextSlot), R(1), U8(6), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PopContext), R(1),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 49 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export const foo = 42;
|
|
|
|
foo++;
|
|
|
|
{ let x; { foo++ } };
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 10
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
2017-04-06 11:54:44 +00:00
|
|
|
bytecode array length: 193
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(2),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(68),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(arg0), R(4),
|
|
|
|
B(Mov), R(closure), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaTheHole),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(StaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(4),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(5), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 51 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(2),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(6),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
|
|
|
|
B(Star), R(7),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(7),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Mov), R(6), R(8),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 51 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 19 S> */ B(LdaSmi), I8(42),
|
|
|
|
/* 19 E> */ B(StaModuleVariable), I8(1), U8(0),
|
|
|
|
/* 23 S> */ B(LdaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Inc), U8(2),
|
|
|
|
/* 26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
|
|
|
|
B(Ldar), R(closure),
|
2016-11-07 16:23:20 +00:00
|
|
|
B(CreateBlockContext), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(1),
|
|
|
|
B(LdaTheHole),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 36 S> */ B(LdaUndefined),
|
2016-10-28 10:10:32 +00:00
|
|
|
/* 36 E> */ B(StaCurrentContextSlot), U8(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 41 S> */ B(LdaModuleVariable), I8(1), U8(1),
|
2017-04-06 11:54:44 +00:00
|
|
|
B(ToNumber), R(4), U8(3),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Inc), U8(3),
|
|
|
|
/* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(4),
|
|
|
|
B(StaContextSlot), R(1), U8(6), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PopContext), R(1),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 51 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export default (function () {});
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 154
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(68),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaTheHole),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(StaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 32 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 32 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(StaCurrentContextSlot), U8(6),
|
2017-01-09 15:31:00 +00:00
|
|
|
B(CreateClosure), U8(1), U8(2), U8(0),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(StaModuleVariable), I8(1), U8(0),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 32 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export default (class {});
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 191
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(68),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaTheHole),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(StaModuleVariable), I8(1), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 26 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 26 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(StaCurrentContextSlot), U8(7),
|
2017-01-09 15:31:00 +00:00
|
|
|
/* 16 S> */ B(CreateClosure), U8(1), U8(2), U8(0),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(3),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(Star), R(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(16),
|
2017-01-04 19:15:26 +00:00
|
|
|
B(Star), R(6),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(24),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(3), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
|
|
|
|
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(6),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 16 E> */ B(StaModuleVariable), I8(1), U8(0),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(LdaCurrentContextSlot), U8(7),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 26 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export {foo as goo} from \"bar\"
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 143
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(64),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 30 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 30 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(StaCurrentContextSlot), U8(6),
|
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 30 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
export * from \"bar\"
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-10-04 18:42:13 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 143
|
2016-10-04 18:42:13 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(64),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-10-28 10:10:32 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 19 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-10-04 18:42:13 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 19 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(StaCurrentContextSlot), U8(6),
|
|
|
|
B(LdaCurrentContextSlot), U8(6),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-10-04 18:42:13 +00:00
|
|
|
/* 19 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
2016-11-02 09:30:24 +00:00
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
import * as foo from \"bar\"
|
|
|
|
foo.f(foo, foo.x);
|
|
|
|
"
|
2017-01-17 13:44:10 +00:00
|
|
|
frame size: 9
|
2016-11-02 09:30:24 +00:00
|
|
|
parameter count: 2
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
bytecode array length: 181
|
2016-11-02 09:30:24 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(Ldar), R(new_target),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(JumpIfUndefined), U8(27),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
|
|
|
|
B(PushContext), R(2),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(ResumeGenerator), R(new_target),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(1),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(JumpIfTrue), U8(74),
|
2017-04-11 09:33:11 +00:00
|
|
|
B(LdaSmi), I8(79),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaConstant), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(arg0), R(3),
|
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(PushContext), R(0),
|
|
|
|
B(Ldar), R(this),
|
|
|
|
B(StaCurrentContextSlot), U8(4),
|
|
|
|
B(LdaZero),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(3), U8(1),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(StaCurrentContextSlot), U8(6),
|
|
|
|
/* 0 E> */ B(StackCheck),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(closure), R(3),
|
|
|
|
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(4),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(LdaZero),
|
[async-iteration] implement AsyncGenerator
- Introduce new struct AsyncGeneratorRequest, which holds
information pertinent to resuming execution of an
AsyncGenerator, such as the Promise associated with the async
generator request. It is intended to be used as a singly
linked list, and holds a pointer to the next item in te queue.
- Introduce JSAsyncGeneratorObject (subclass of
JSGeneratorObject), which includes several new internal fields
(`queue` which contains a singly linked list of
AsyncGeneratorRequest objects, and `await_input` which
contains the sent value from an Await expression (This is
necessary to prevent function.sent (used by yield*) from
having the sent value observably overwritten during
execution).
- Modify SuspendGenerator to accept a set of Flags, which
indicate whether the suspend is for a Yield or Await, and
whether it takes place on an async generator or ES6
generator.
- Introduce interpreter intrinsics and TF intrinsic lowering for
accessing the await input of an async generator
- Modify the JSGeneratorStore operator to understand whether or
not it's suspending for a normal yield, or an AsyncGenerator
Await. This ensures appropriate registers are stored.
- Add versions of ResumeGeneratorTrampoline which store the
input value in a different field depending on wether it's an
AsyncGenerator Await resume, or an ordinary resume. Also modifies
whether debug code will assert that the generator object is a
JSGeneratorObject or a JSAsyncGeneratorObject depending on the
resume type.
BUG=v8:5855
R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
littledan@chromium.org, neis@chromium.org
TBR=marja@chromium.org
Change-Id: I9d58df1d344465fc937fe7eed322424204497187
Reviewed-on: https://chromium-review.googlesource.com/446961
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44240}
2017-03-29 13:41:45 +00:00
|
|
|
B(SuspendGenerator), R(4), U8(0),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(3),
|
2016-11-02 09:30:24 +00:00
|
|
|
/* 45 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(-2),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(Star), R(1),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(Star), R(5),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
|
|
|
|
B(Star), R(6),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(LdaZero),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
|
|
|
B(JumpIfTrue), U8(24),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(2),
|
2017-03-22 11:08:18 +00:00
|
|
|
B(TestEqualStrictNoFeedback), R(6),
|
2017-01-11 11:34:02 +00:00
|
|
|
B(JumpIfTrue), U8(15),
|
2016-11-02 09:30:24 +00:00
|
|
|
B(Jump), U8(2),
|
|
|
|
B(LdaTrue),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(5), R(7),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
2016-11-02 09:30:24 +00:00
|
|
|
/* 45 S> */ B(Return),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Ldar), R(5),
|
2016-11-02 09:30:24 +00:00
|
|
|
/* 0 E> */ B(Throw),
|
2017-02-07 20:42:03 +00:00
|
|
|
/* 27 S> */ B(LdaImmutableCurrentContextSlot), U8(6),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(Star), R(4),
|
2017-01-17 13:44:10 +00:00
|
|
|
/* 30 E> */ B(LdaNamedProperty), R(4), U8(1), U8(4),
|
|
|
|
B(Star), R(3),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(6),
|
2016-12-15 10:59:57 +00:00
|
|
|
B(Star), R(5),
|
2017-02-07 20:42:03 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(6),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
/* 41 E> */ B(LdaNamedProperty), R(6), U8(2), U8(6),
|
|
|
|
B(Star), R(6),
|
2017-03-09 14:40:02 +00:00
|
|
|
/* 31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(2),
|
2017-02-28 10:11:54 +00:00
|
|
|
B(StaCurrentContextSlot), U8(7),
|
|
|
|
B(LdaCurrentContextSlot), U8(7),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(LdaTrue),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
|
2016-11-02 09:30:24 +00:00
|
|
|
/* 45 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
FIXED_ARRAY_TYPE,
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["f"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|