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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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
|
[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: 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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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),
|
2016-11-10 10:41:48 +00:00
|
|
|
/* 32 S> */ B(LdaUndefined),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 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),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
|
|
|
|
B(Star), R(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(42),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
2017-03-09 14:40:02 +00:00
|
|
|
/* 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),
|
2016-11-10 10:41:48 +00:00
|
|
|
/* 52 S> */ B(LdaUndefined),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 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),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
|
|
|
|
B(Star), R(4),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(42),
|
2017-01-17 13:44:10 +00:00
|
|
|
B(Star), R(6),
|
2017-03-09 14:40:02 +00:00
|
|
|
/* 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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(78),
|
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: [
|
|
|
|
]
|
|
|
|
|