d8990fdc76
Following up on https://crrev.com/c/3916453, we also remove the confusing breakable and steppable positions from spreads in array literals. These positions provide no meaningful advdantage for developers, but just makes it annoying to step through code that contains spreads. Drive-by: Add similar inspector tests to ensure that the positions in the stack are correctly inferred when stopped in the Symbol.iterator or the next methods. Before: https://imgur.com/jVf2JeB.png After: https://imgur.com/u8SfNhy.png Fixed: chromium:1368971 Change-Id: Ibf791167936c1ed28ac3240acb7c0846b11ebecb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925200 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#83469}
76 lines
1.6 KiB
Plaintext
76 lines
1.6 KiB
Plaintext
Tests breakable locations in array spread.
|
|
|
|
Running test: testBreakLocations
|
|
|
|
function testFunction() {
|
|
var a = |_|[...iterable];
|
|
var b = [...|_|a, ...iterable, ...a];
|
|
|R|}
|
|
|
|
const iterable = |_|{
|
|
[Symbol.iterator]() {
|
|
const it = |_|[1, 2].|C|values();
|
|
|_|return {next() { |_|return it.|C|next();|R| }};|R|
|
|
}
|
|
};
|
|
|R|
|
|
|
|
|
|
Running test: testStepping
|
|
Execution paused in testFunction:
|
|
function testFunction() {
|
|
var a = #[...iterable];
|
|
var b = [...a, ...iterable, ...a];
|
|
|
|
Execution paused in [Symbol.iterator]:
|
|
[Symbol.iterator]() {
|
|
const it = #[1, 2].values();
|
|
return {next() { return it.next(); }};
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
var a = [...#iterable];
|
|
var b = [...a, ...iterable, ...a];
|
|
|
|
Execution paused in next:
|
|
const it = [1, 2].values();
|
|
return {next() { #return it.next(); }};
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
var a = [...#iterable];
|
|
var b = [...a, ...iterable, ...a];
|
|
|
|
Execution paused in testFunction:
|
|
var a = [...iterable];
|
|
var b = [...#a, ...iterable, ...a];
|
|
}
|
|
|
|
Execution paused in [Symbol.iterator]:
|
|
[Symbol.iterator]() {
|
|
const it = #[1, 2].values();
|
|
return {next() { return it.next(); }};
|
|
|
|
Called from testFunction:
|
|
var a = [...iterable];
|
|
var b = [...a, ...#iterable, ...a];
|
|
}
|
|
|
|
Execution paused in next:
|
|
const it = [1, 2].values();
|
|
return {next() { #return it.next(); }};
|
|
}
|
|
|
|
Called from testFunction:
|
|
var a = [...iterable];
|
|
var b = [...a, ...#iterable, ...a];
|
|
}
|
|
|
|
Execution paused in testFunction:
|
|
var b = [...a, ...iterable, ...a];
|
|
#}
|
|
|
|
|
|
Resuming and finishing...
|