2017-04-18 14:56:06 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
wrap: no
|
|
|
|
test function name: f
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(arr) {
|
|
|
|
for (let x of arr) { let y = x; }
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 15
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 160
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 34 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Star), R(5),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(0), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(context), R(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 29 S> */ B(CallProperty0), R(4), R(5), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
|
|
B(LdaNamedProperty), R(10), U8(1), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(25),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(10), U8(2), U8(10),
|
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(10), R(0),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 29 S> */ B(Mov), R(0), R(2),
|
|
|
|
/* 49 S> */ B(Mov), R(2), R(3),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(10),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 20 E> */ B(JumpLoop), U8(42), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Star), R(7),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
Revert "[esnext] load `iterator.next` only once at beginning of iteration"
This reverts commit bf4cc9ee154f15942594016777f77d3208230f5f.
Reason for revert: Breaks windows with msvc and linux with gcc
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/841
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/17265
Original change's description:
> [esnext] load `iterator.next` only once at beginning of iteration
>
> https://github.com/tc39/ecma262/pull/988 gained concensus during the
> september 2017 TC39 meetings. This moves the load of the "next" method
> to the very beginning of the iteration protocol, rather than during
> each iteration step.
>
> This impacts:
>
> - yield*
> - for-of loops
> - spread arguments
> - array spreads
>
> In the v8 implementation, this also affects async iteration versions of
> these things (the sole exception being the Async-From-Sync iterator,
> which requires a few more changes to work with this, likely done in a
> followup patch).
>
> This change introduces a new AST node, ResolvedProperty, which can be used
> as a callee by Call nodes to produce the same bytecode as Property calls,
> without observably re-loading the property. This is used in several
> AST-desugarings involving the iteration protocol.
>
> BUG=v8:6861, v8:5699
> R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org
>
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b
> Reviewed-on: https://chromium-review.googlesource.com/687997
> Commit-Queue: Caitlin Potter <caitp@igalia.com>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50452}
TBR=rmcilroy@chromium.org,adamk@chromium.org,neis@chromium.org,caitp@igalia.com,caitp@chromium.org
Change-Id: I1797c0d596dfd6850d6f0f505f591a7a990dd1f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6861, v8:5699
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/857616
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50454}
2018-01-09 16:50:16 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
2020-03-11 15:07:16 +00:00
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Ldar), R(6),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(3), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(12),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(4),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(11), R(5), U8(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(7),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(8),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 54 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[25, 70, 78],
|
|
|
|
[102, 135, 137],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(arr) {
|
|
|
|
for (let x of arr) { eval('1'); }
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 20
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 244
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2020-02-10 16:09:27 +00:00
|
|
|
/* 10 E> */ B(CreateFunctionContext), U8(0), U8(5),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(PushContext), R(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Ldar), R(this),
|
Revert "Reland "[runtime] Move Context::native_context to the map""
This reverts commit c7c47c68f2c0eb1155cfacab785aba54f61d9218.
Reason for revert: breaks TSAN
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/28738
Original change's description:
> Reland "[runtime] Move Context::native_context to the map"
>
> This is a reland of f05bae1e0df48aa6a32d958fb4339a85fefb5179
>
> Previously I presumed that the context read from a frame in the profiler was
> a valid context. Turns out that on non-intel we're not guaranteed that the
> frame is properly set up. In the case we looked at, the profiler took a
> sample right before writing the frame marker indicating a builtin frame,
> causing the "context" pointer from that frame to be a bytecode array. Since
> we'll read random garbage on the stack as a possible context pointer, I made
> the code reading the native context from it a little more defensive.
>
> Bug: v8:9860
>
> Original change's description:
> > [runtime] Move Context::native_context to the map
> >
> > Remove the native context slot from contexts by making context maps
> > native-context-specific. Now we require 2 loads to go from a context to the
> > native context, but we have 1 field fewer to store when creating contexts.
> >
> > Change-Id: I3c0d7c50c94060c4129db684f46a567de6f30e8d
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1859629
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Georg Neis <neis@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#64296}
>
> Change-Id: If9461e9b21d35a260d71c79d7f95e518cc429e09
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864930
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Auto-Submit: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64314}
TBR=ulan@chromium.org,neis@chromium.org,petermarshall@chromium.org,ishell@chromium.org,verwaest@chromium.org,mslekova@chromium.org,victorgomes@google.com
Change-Id: I4f9edc62ea6f9f5857619ff0ad1a63cab4b33cc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9860
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864937
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64316}
2019-10-16 13:10:30 +00:00
|
|
|
B(StaCurrentContextSlot), U8(4),
|
2019-10-17 15:58:38 +00:00
|
|
|
B(Ldar), R(arg0),
|
|
|
|
B(StaCurrentContextSlot), U8(3),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(CreateMappedArguments),
|
Revert "Reland "[runtime] Move Context::native_context to the map""
This reverts commit c7c47c68f2c0eb1155cfacab785aba54f61d9218.
Reason for revert: breaks TSAN
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/28738
Original change's description:
> Reland "[runtime] Move Context::native_context to the map"
>
> This is a reland of f05bae1e0df48aa6a32d958fb4339a85fefb5179
>
> Previously I presumed that the context read from a frame in the profiler was
> a valid context. Turns out that on non-intel we're not guaranteed that the
> frame is properly set up. In the case we looked at, the profiler took a
> sample right before writing the frame marker indicating a builtin frame,
> causing the "context" pointer from that frame to be a bytecode array. Since
> we'll read random garbage on the stack as a possible context pointer, I made
> the code reading the native context from it a little more defensive.
>
> Bug: v8:9860
>
> Original change's description:
> > [runtime] Move Context::native_context to the map
> >
> > Remove the native context slot from contexts by making context maps
> > native-context-specific. Now we require 2 loads to go from a context to the
> > native context, but we have 1 field fewer to store when creating contexts.
> >
> > Change-Id: I3c0d7c50c94060c4129db684f46a567de6f30e8d
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1859629
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Georg Neis <neis@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#64296}
>
> Change-Id: If9461e9b21d35a260d71c79d7f95e518cc429e09
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864930
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Auto-Submit: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64314}
TBR=ulan@chromium.org,neis@chromium.org,petermarshall@chromium.org,ishell@chromium.org,verwaest@chromium.org,mslekova@chromium.org,victorgomes@google.com
Change-Id: I4f9edc62ea6f9f5857619ff0ad1a63cab4b33cc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9860
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864937
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64316}
2019-10-16 13:10:30 +00:00
|
|
|
B(StaCurrentContextSlot), U8(6),
|
2019-10-17 15:58:38 +00:00
|
|
|
B(Ldar), R(1),
|
|
|
|
B(StaCurrentContextSlot), U8(5),
|
2018-05-02 13:57:26 +00:00
|
|
|
B(CreateBlockContext), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(PushContext), R(3),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
B(StaCurrentContextSlot), U8(2),
|
2019-10-17 15:58:38 +00:00
|
|
|
/* 34 S> */ B(LdaContextSlot), R(3), U8(3), U8(0),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(6),
|
2019-09-06 12:41:00 +00:00
|
|
|
B(GetIterator), R(6), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Star), R(5),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(2), U8(4),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Star), R(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(context), R(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 29 S> */ B(CallProperty0), R(4), R(5), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
|
|
B(LdaNamedProperty), R(10), U8(3), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(74),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(10), U8(4), U8(10),
|
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(10), R(0),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(CreateBlockContext), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(PushContext), R(11),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
B(StaCurrentContextSlot), U8(2),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 29 S> */ B(Ldar), R(0),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
/* 29 E> */ B(StaCurrentContextSlot), U8(2),
|
2019-08-08 20:43:41 +00:00
|
|
|
/* 41 S> */ B(LdaLookupGlobalSlot), U8(6), U8(12), U8(3),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(17),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(LdaSmi), I8(37),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(18),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(LdaSmi), I8(41),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(19),
|
|
|
|
B(Mov), R(12), R(14),
|
|
|
|
B(Mov), R(13), R(15),
|
|
|
|
B(Mov), R(closure), R(16),
|
|
|
|
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(14), U8(6),
|
|
|
|
B(Star), R(12),
|
|
|
|
/* 41 E> */ B(CallUndefinedReceiver1), R(12), R(13), U8(14),
|
|
|
|
B(PopContext), R(11),
|
|
|
|
B(Mov), R(0), R(10),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 20 E> */ B(JumpLoop), U8(91), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Star), R(7),
|
2017-08-11 15:16:31 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
Revert "[esnext] load `iterator.next` only once at beginning of iteration"
This reverts commit bf4cc9ee154f15942594016777f77d3208230f5f.
Reason for revert: Breaks windows with msvc and linux with gcc
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/841
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/17265
Original change's description:
> [esnext] load `iterator.next` only once at beginning of iteration
>
> https://github.com/tc39/ecma262/pull/988 gained concensus during the
> september 2017 TC39 meetings. This moves the load of the "next" method
> to the very beginning of the iteration protocol, rather than during
> each iteration step.
>
> This impacts:
>
> - yield*
> - for-of loops
> - spread arguments
> - array spreads
>
> In the v8 implementation, this also affects async iteration versions of
> these things (the sole exception being the Async-From-Sync iterator,
> which requires a few more changes to work with this, likely done in a
> followup patch).
>
> This change introduces a new AST node, ResolvedProperty, which can be used
> as a callee by Call nodes to produce the same bytecode as Property calls,
> without observably re-loading the property. This is used in several
> AST-desugarings involving the iteration protocol.
>
> BUG=v8:6861, v8:5699
> R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org
>
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b
> Reviewed-on: https://chromium-review.googlesource.com/687997
> Commit-Queue: Caitlin Potter <caitp@igalia.com>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50452}
TBR=rmcilroy@chromium.org,adamk@chromium.org,neis@chromium.org,caitp@igalia.com,caitp@chromium.org
Change-Id: I1797c0d596dfd6850d6f0f505f591a7a990dd1f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6861, v8:5699
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/857616
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50454}
2018-01-09 16:50:16 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Ldar), R(6),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(8), U8(16),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(13),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(9),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(12), R(5), U8(18),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(13),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(7),
|
2017-05-24 08:08:21 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(8),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(PopContext), R(3),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 54 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
2018-05-02 13:57:26 +00:00
|
|
|
SCOPE_INFO_TYPE,
|
2018-02-16 12:36:47 +00:00
|
|
|
SCOPE_INFO_TYPE,
|
2017-04-18 14:56:06 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
2018-02-16 12:36:47 +00:00
|
|
|
SCOPE_INFO_TYPE,
|
2017-04-18 14:56:06 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["1"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[58, 152, 160],
|
|
|
|
[184, 217, 219],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(arr) {
|
|
|
|
for (let x of arr) { (function() { return x; })(); }
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 14
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 177
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 34 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Star), R(3),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(3), U8(0), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(2),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(context), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 29 S> */ B(CallProperty0), R(2), R(3), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
|
|
|
|
B(LdaNamedProperty), R(8), U8(1), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(42),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(8), U8(2), U8(10),
|
|
|
|
B(Star), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Mov), R(8), R(0),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(CreateBlockContext), U8(3),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(PushContext), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
B(StaCurrentContextSlot), U8(2),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 29 S> */ B(Ldar), R(0),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
/* 29 E> */ B(StaCurrentContextSlot), U8(2),
|
2019-08-08 20:43:41 +00:00
|
|
|
/* 41 S> */ B(CreateClosure), U8(4), U8(0), U8(2),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
/* 67 E> */ B(CallUndefinedReceiver0), R(10), U8(12),
|
|
|
|
B(PopContext), R(9),
|
|
|
|
B(Mov), R(0), R(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 20 E> */ B(JumpLoop), U8(59), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Star), R(5),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
Revert "[esnext] load `iterator.next` only once at beginning of iteration"
This reverts commit bf4cc9ee154f15942594016777f77d3208230f5f.
Reason for revert: Breaks windows with msvc and linux with gcc
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/841
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/17265
Original change's description:
> [esnext] load `iterator.next` only once at beginning of iteration
>
> https://github.com/tc39/ecma262/pull/988 gained concensus during the
> september 2017 TC39 meetings. This moves the load of the "next" method
> to the very beginning of the iteration protocol, rather than during
> each iteration step.
>
> This impacts:
>
> - yield*
> - for-of loops
> - spread arguments
> - array spreads
>
> In the v8 implementation, this also affects async iteration versions of
> these things (the sole exception being the Async-From-Sync iterator,
> which requires a few more changes to work with this, likely done in a
> followup patch).
>
> This change introduces a new AST node, ResolvedProperty, which can be used
> as a callee by Call nodes to produce the same bytecode as Property calls,
> without observably re-loading the property. This is used in several
> AST-desugarings involving the iteration protocol.
>
> BUG=v8:6861, v8:5699
> R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org
>
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b
> Reviewed-on: https://chromium-review.googlesource.com/687997
> Commit-Queue: Caitlin Potter <caitp@igalia.com>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50452}
TBR=rmcilroy@chromium.org,adamk@chromium.org,neis@chromium.org,caitp@igalia.com,caitp@chromium.org
Change-Id: I1797c0d596dfd6850d6f0f505f591a7a990dd1f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6861, v8:5699
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/857616
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50454}
2018-01-09 16:50:16 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(5),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Ldar), R(4),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(3), U8(5), U8(14),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(11),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(10), R(3), U8(16),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(5),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(7),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(5),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(6),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 73 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
2018-02-16 12:36:47 +00:00
|
|
|
SCOPE_INFO_TYPE,
|
2017-04-18 14:56:06 +00:00
|
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[25, 87, 95],
|
|
|
|
[119, 152, 154],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(arr) {
|
|
|
|
for (let { x, y } of arr) { let z = x + y; }
|
|
|
|
}
|
|
|
|
f([{ x: 0, y: 3 }, { x: 1, y: 9 }, { x: -12, y: 17 }]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 17
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 171
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 41 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Star), R(7),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(7), U8(0), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(context), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 36 S> */ B(CallProperty0), R(6), R(7), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
|
|
|
B(LdaNamedProperty), R(12), U8(1), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(36),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(12), U8(2), U8(10),
|
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(12), R(0),
|
Reland "[destructuring] Elide coercible check for simple keys"
This is a reland of 1fba04415450d26675fc62873683c15f50a6e356
Chromium expectation tests have been disabled, and will be enabled
Original change's description:
> [destructuring] Elide coercible check for simple keys
>
> Simple object destructuring, such as `let {a,b} = o`, is less efficient
> than the equivalent assignments `let a = o.a; let b = o.b`. This is
> because it does a nil check of `o` before the assignments. However, this
> nil check is not strictly necessary for simple (i.e. non-computed) names,
> as there will be an equivalent nil check on the first access to o in
> `o.a`. For computed names the computation is unfortunately obervable.
>
> So, we can elide the nil check when the first property (if any) of the
> destructuring target is a non-computed name. This messes a bit with our
> error messages, so we re-use the CallPrinter to also find destructuring
> assignment based errors, and fiddle with the error message there. As
> a side-effect, we also get out the object name in the AST, so we can
> output a slightly nicer error message.
>
> Change-Id: Iafa858e27ed771a146cd3ba57903cc73bb46951d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1773254
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63453}
TBR=verwaest@chromium.org
Bug: chromium:999473
Change-Id: Ib0b2e4be433c50521ba1722e1c06b672bfefa405
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1777702
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63477}
2019-08-30 09:51:04 +00:00
|
|
|
/* 31 S> */ B(LdaNamedProperty), R(0), U8(3), U8(12),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(3),
|
Reland "[destructuring] Elide coercible check for simple keys"
This is a reland of 1fba04415450d26675fc62873683c15f50a6e356
Chromium expectation tests have been disabled, and will be enabled
Original change's description:
> [destructuring] Elide coercible check for simple keys
>
> Simple object destructuring, such as `let {a,b} = o`, is less efficient
> than the equivalent assignments `let a = o.a; let b = o.b`. This is
> because it does a nil check of `o` before the assignments. However, this
> nil check is not strictly necessary for simple (i.e. non-computed) names,
> as there will be an equivalent nil check on the first access to o in
> `o.a`. For computed names the computation is unfortunately obervable.
>
> So, we can elide the nil check when the first property (if any) of the
> destructuring target is a non-computed name. This messes a bit with our
> error messages, so we re-use the CallPrinter to also find destructuring
> assignment based errors, and fiddle with the error message there. As
> a side-effect, we also get out the object name in the AST, so we can
> output a slightly nicer error message.
>
> Change-Id: Iafa858e27ed771a146cd3ba57903cc73bb46951d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1773254
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63453}
TBR=verwaest@chromium.org
Bug: chromium:999473
Change-Id: Ib0b2e4be433c50521ba1722e1c06b672bfefa405
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1777702
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63477}
2019-08-30 09:51:04 +00:00
|
|
|
/* 34 S> */ B(LdaNamedProperty), R(0), U8(4), U8(14),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
/* 56 S> */ B(Ldar), R(4),
|
|
|
|
/* 58 E> */ B(Add), R(3), U8(16),
|
|
|
|
B(Star), R(5),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 20 E> */ B(JumpLoop), U8(53), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
B(Star), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2019-01-09 13:21:06 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
2020-03-11 15:07:16 +00:00
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
|
|
|
B(Ldar), R(8),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(7), U8(5), U8(17),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(14),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(16),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(13), R(7), U8(19),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(9),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(10),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 65 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["y"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[25, 81, 89],
|
|
|
|
[113, 146, 148],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function* f(arr) {
|
|
|
|
for (let x of arr) { let y = x; }
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 16
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 201
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-01-31 15:36:58 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(closure), R(5),
|
|
|
|
B(Mov), R(this), R(6),
|
2020-02-10 16:09:27 +00:00
|
|
|
/* 11 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(0),
|
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(5),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2018-05-24 09:29:53 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(5),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(5),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 55 S> */ B(Return),
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 35 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2017-05-24 13:54:57 +00:00
|
|
|
B(Star), R(6),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(6), U8(3), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(context), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 30 S> */ B(CallProperty0), R(5), R(6), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
|
|
|
|
B(LdaNamedProperty), R(11), U8(4), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(25),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(11), U8(5), U8(10),
|
|
|
|
B(Star), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(11), R(1),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 30 S> */ B(Mov), R(1), R(3),
|
|
|
|
/* 50 S> */ B(Mov), R(3), R(4),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 21 E> */ B(JumpLoop), U8(42), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Star), R(8),
|
2017-06-02 11:55:48 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
2018-05-24 09:29:53 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
2020-03-11 15:07:16 +00:00
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
B(Ldar), R(7),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(6), U8(6), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(13),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(12), R(6), U8(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(13),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(10),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(8),
|
2017-06-05 19:54:14 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
|
|
|
/* 55 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
Smi [21],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2017-04-18 14:56:06 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[66, 111, 119],
|
|
|
|
[143, 176, 178],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function* f(arr) {
|
|
|
|
for (let x of arr) yield x;
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 15
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 245
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-01-31 15:36:58 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(Mov), R(this), R(5),
|
2020-02-10 16:09:27 +00:00
|
|
|
/* 11 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(0),
|
|
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(4),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2018-05-24 09:29:53 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(4),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 11 E> */ B(Throw),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(4),
|
2017-06-05 19:54:14 +00:00
|
|
|
/* 49 S> */ B(Return),
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 35 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Star), R(5),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(4), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(context), R(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 30 S> */ B(CallProperty0), R(4), R(5), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
|
|
B(LdaNamedProperty), R(10), U8(5), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(63),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(10), U8(6), U8(10),
|
|
|
|
B(Star), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(Mov), R(10), R(1),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 30 S> */ B(Mov), R(1), R(3),
|
2017-07-20 12:35:28 +00:00
|
|
|
/* 40 S> */ B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
|
|
|
B(Mov), R(3), R(11),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
|
|
|
|
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(1),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(11),
|
|
|
|
B(Star), R(11),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2017-06-05 13:23:20 +00:00
|
|
|
/* 40 E> */ B(Throw),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(11), R(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(Jump), U8(20),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 21 E> */ B(JumpLoop), U8(80), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Star), R(7),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-02 16:12:54 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Ldar), R(6),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(5), U8(9), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(12),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(10),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(11), R(5), U8(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(Ldar), R(9),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(SetPendingMessage),
|
|
|
|
B(Ldar), R(7),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
|
2017-06-13 13:49:45 +00:00
|
|
|
B(Jump), U8(8),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(8),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(8),
|
2019-01-02 16:12:54 +00:00
|
|
|
/* 49 S> */ B(Return),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 49 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
[interpreter] Move function-entry stack check to start of bytecode array
The function-entry stack check should dominate all other
instructions in a function. Prior to this CL it was possible to create
paths not including a stack check due to SwitchOnGeneratorState: the
generator-creation branch had a stack check, while generator-resume
branches did not.
0 : af fb 00 01 SwitchOnGeneratorState r0, [0], [1] { 0: @22 }
4 : 27 fe fa Mov <closure>, r1
7 : 27 02 f9 Mov <this>, r2
10 : 64 0a fa 02 InvokeIntrinsic [_CreateJSGeneratorObject], r1-r2
14 : 26 fb Star r0
16 : a7 StackCheck
17 : b0 fb fb 01 00 SuspendGenerator r0, r0-r0, [0]
22 : b1 fb fb 01 ResumeGenerator r0, r0-r0
[... no stack check here ...]
This CL moves the stack check to the beginning of the bytecode array,
i.e. before SwitchOnGeneratorState.
Bug: chromium:1020031
Change-Id: I8ba8cba99611ddbe50c76023129d926cc84b1d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903440
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64888}
2019-11-11 13:34:07 +00:00
|
|
|
Smi [21],
|
2020-03-11 15:07:16 +00:00
|
|
|
Smi [118],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [10],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2017-04-18 14:56:06 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
2019-01-02 16:12:54 +00:00
|
|
|
Smi [16],
|
2017-06-05 13:23:20 +00:00
|
|
|
Smi [7],
|
2017-04-18 14:56:06 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2017-05-16 11:36:04 +00:00
|
|
|
Smi [6],
|
2017-06-13 13:49:45 +00:00
|
|
|
Smi [9],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[66, 149, 157],
|
|
|
|
[181, 214, 216],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
async function f(arr) {
|
|
|
|
for (let x of arr) { let y = x; }
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 17
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 215
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(closure), R(5),
|
|
|
|
B(Mov), R(this), R(6),
|
2020-02-10 16:09:27 +00:00
|
|
|
/* 16 E> */ B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(5), U8(2),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(0),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(context), R(5),
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 40 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Star), R(7),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(7), U8(0), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(6),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(context), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 35 S> */ B(CallProperty0), R(6), R(7), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
|
|
|
B(LdaNamedProperty), R(12), U8(1), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(25),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(12), U8(2), U8(10),
|
|
|
|
B(Star), R(12),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
|
|
|
B(Mov), R(12), R(1),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 35 S> */ B(Mov), R(1), R(3),
|
|
|
|
/* 55 S> */ B(Mov), R(3), R(4),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(12),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 26 E> */ B(JumpLoop), U8(42), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
B(Star), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
2018-10-11 08:35:56 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
2020-03-11 15:07:16 +00:00
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
|
|
|
B(Ldar), R(8),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(7), U8(3), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(14),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(4),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(16),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(13), R(7), U8(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(9),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(11),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
2017-05-16 16:38:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(9),
|
2017-05-24 08:08:21 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(10),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(7),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(LdaFalse),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Mov), R(0), R(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(6), U8(3),
|
[async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
/* 60 S> */ B(Return),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(6),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(CreateCatchContext), R(6), U8(5),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(5),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(5),
|
|
|
|
B(PushContext), R(6),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(2),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(8),
|
2018-05-30 14:21:39 +00:00
|
|
|
B(LdaFalse),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(9),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Mov), R(0), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(7), U8(3),
|
2017-04-18 14:56:06 +00:00
|
|
|
/* 60 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2018-02-16 12:36:47 +00:00
|
|
|
SCOPE_INFO_TYPE,
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[15, 187, 187],
|
|
|
|
[40, 85, 93],
|
|
|
|
[117, 150, 152],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
async function f(arr) {
|
|
|
|
for (let x of arr) await x;
|
|
|
|
}
|
|
|
|
f([1, 2, 3]);
|
|
|
|
"
|
2019-08-23 14:23:52 +00:00
|
|
|
frame size: 16
|
2017-04-18 14:56:06 +00:00
|
|
|
parameter count: 2
|
2020-03-20 11:13:04 +00:00
|
|
|
bytecode array length: 251
|
2017-04-18 14:56:06 +00:00
|
|
|
bytecodes: [
|
2019-01-31 15:36:58 +00:00
|
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(closure), R(4),
|
|
|
|
B(Mov), R(this), R(5),
|
2020-02-10 16:09:27 +00:00
|
|
|
/* 16 E> */ B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Star), R(0),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Mov), R(context), R(4),
|
2019-09-06 12:41:00 +00:00
|
|
|
/* 40 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
2019-12-20 14:06:40 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
2018-01-11 17:24:11 +00:00
|
|
|
B(Star), R(6),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(6), U8(1), U8(4),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(context), R(10),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaTrue),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
2019-01-14 14:15:52 +00:00
|
|
|
/* 35 S> */ B(CallProperty0), R(5), R(6), U8(6),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
|
|
|
|
B(LdaNamedProperty), R(11), U8(2), U8(8),
|
2020-03-20 11:13:04 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(57),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(LdaNamedProperty), R(11), U8(3), U8(10),
|
|
|
|
B(Star), R(11),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaFalse),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(11), R(1),
|
2019-01-31 15:36:58 +00:00
|
|
|
/* 35 S> */ B(Mov), R(1), R(3),
|
2019-08-23 14:23:52 +00:00
|
|
|
/* 45 S> */ B(Mov), R(0), R(12),
|
|
|
|
B(Mov), R(3), R(13),
|
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(12), U8(2),
|
|
|
|
/* 45 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(0),
|
|
|
|
B(ResumeGenerator), R(0), R(0), U8(12),
|
|
|
|
B(Star), R(12),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2017-05-31 11:40:31 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(13),
|
2017-07-13 13:53:13 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(12),
|
Reland "[async-iteration] implement spec-change to `yield` in async generators"
Per https://github.com/tc39/proposal-async-iteration/pull/102/files:
AsyncGeneratorResolve no longer unwraps a value component. Instead, the value is
unwrapped before the builtin call via Await, allowing Promise rejections to
affect the generator control flow.
Thus, all `yield <expr>` implicitly become `yield await <expr>`.
Additionally, `return <expr>` becomes `return await <expr>`. Finally, when the
generator is resumed with `.return()`, the parameter passed to .return() is
awaited before generator execution properly continues).
BUG=v8:6187, v8:5855
R=littledan@chromium.org, neis@chromium.org, adamk@chromium.org
TBR=rmcilroy@chromium.org, neis@chromium.org
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Id7718028fd555481f9f4ca0dbecfa788e3057c48
Reviewed-on: https://chromium-review.googlesource.com/594500
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#47058}
2017-08-01 14:45:03 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(12),
|
2020-03-20 11:13:04 +00:00
|
|
|
/* 26 E> */ B(JumpLoop), U8(74), I8(0),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaSmi), I8(-1),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
|
|
|
B(Star), R(8),
|
2017-07-13 13:53:13 +00:00
|
|
|
B(Jump), U8(7),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(9),
|
2018-10-11 08:35:56 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(8),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(10),
|
|
|
|
B(Ldar), R(7),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfToBooleanTrue), U8(58),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaNamedProperty), R(6), U8(4), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(12),
|
2019-08-08 15:56:48 +00:00
|
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Mov), R(context), R(13),
|
2017-11-07 09:26:56 +00:00
|
|
|
B(TestTypeOf), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(18),
|
2019-12-05 20:26:18 +00:00
|
|
|
B(Wide), B(LdaSmi), I16(160),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(LdaConstant), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(15),
|
|
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(Throw),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(CallProperty0), R(12), R(6), U8(14),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfJSReceiver), U8(21),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(14),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Jump), U8(12),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Star), R(13),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(8),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(JumpIfTrue), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(13),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(ReThrow),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(10),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(SetPendingMessage),
|
|
|
|
B(LdaZero),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(TestReferenceEqual), R(8),
|
2017-07-13 13:53:13 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2019-08-23 14:23:52 +00:00
|
|
|
B(Ldar), R(9),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(ReThrow),
|
|
|
|
B(LdaUndefined),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(6),
|
[async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
B(LdaTrue),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(7),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Mov), R(0), R(5),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(5), U8(3),
|
[async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.
We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.
In essence we now turn an async function like
```js
async function f(x) { return await bar(x); }
```
into something like this (in Parser and BytecodeGenerator respectively):
```
function f(x) {
.generator_object = %_AsyncFunctionEnter(.closure, this);
.promise = %AsyncFunctionCreatePromise();
try {
.tmp = await bar(x);
return %_AsyncFunctionResolve(.promise, .tmp);
} catch (e) {
return %_AsyncFunctionReject(.promise, e);
}
}
```
Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function
```js
async function f(x) { return await x; }
```
goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.
Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!
Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 05:54:39 +00:00
|
|
|
/* 54 S> */ B(Return),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(5),
|
2019-08-08 20:43:41 +00:00
|
|
|
B(CreateCatchContext), R(5), U8(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(4),
|
2017-04-18 14:56:06 +00:00
|
|
|
B(LdaTheHole),
|
|
|
|
B(SetPendingMessage),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Ldar), R(4),
|
|
|
|
B(PushContext), R(5),
|
Reland x3 "[runtime] Remove extension slots from context objects"
Original change's description:
> [runtime] Remove extension slots from context objects
>
> Context objects have an extension slot, which contains further
> additional data that depends on the type of the context.
>
> This CL removes the extension slot from contexts that don't need
> them, hence reducing memory.
>
> The following contexts will still have an extension slot: native,
> module, await, block and with contexts. See objects/contexts.h for
> what the slot is used for.
> The following contexts will not have an extension slot anymore (they
> were not used before): script, catch and builtin contexts.
> Eval and function contexts only have the extension slot if they
> contain a sloppy eval.
>
> Bug: v8:9744
> Change-Id: I8ca56c22fa02437bbac392ea72174ebfca80e030
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863191
> Commit-Queue: Victor Gomes <victorgomes@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@google.com>
> Cr-Commit-Position: refs/heads/master@{#64372}
TBR=verwaest@chromium.org,jgruber@chromium.org,ulan@chromium.org,leszeks@chromium.org,petermarshall@chromium.org
Bug: v8:9744
Change-Id: I8700ed2fa62c89e86c39bb16ac3167f38ea8d63f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1873695
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64477}
2019-10-22 12:59:24 +00:00
|
|
|
B(LdaImmutableCurrentContextSlot), U8(2),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(7),
|
2018-05-30 14:21:39 +00:00
|
|
|
B(LdaTrue),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(Star), R(8),
|
2019-01-31 15:36:58 +00:00
|
|
|
B(Mov), R(0), R(6),
|
2019-01-14 14:15:52 +00:00
|
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(6), U8(3),
|
2017-04-18 14:56:06 +00:00
|
|
|
/* 54 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
2020-03-11 15:07:16 +00:00
|
|
|
Smi [96],
|
2017-04-18 14:56:06 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
2019-04-18 09:29:49 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
2018-02-16 12:36:47 +00:00
|
|
|
SCOPE_INFO_TYPE,
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
2020-03-20 11:13:04 +00:00
|
|
|
[19, 223, 223],
|
|
|
|
[44, 121, 129],
|
|
|
|
[153, 186, 188],
|
2017-04-18 14:56:06 +00:00
|
|
|
]
|
|
|
|
|