ade6d191c8
This CL introduces statement positions before the right-hand side of comma expressions, in order to align the stepping behavior (and also generally the breakpoint behavior) around semicolon (;) and comma (,) separated expressions. The motivation here is that left-hand sides of comma expressions are evaluated purely for their side-effects and as such, they aren't really any different from statements from a developers perspective. And more importantly, minifiers (like UglifyJS, terser, or esbuild) by default turn statement expression lists into comma-separated expressions, thus implicitly changing the stepping behavior in ways that are difficult to understand for developers. Doc: http://go/chrome-devtools:comma-stepping-proposal Demo: https://devtools-dbg-stories.netlify.app/crbug-1370200.html Video: https://i.imgur.com/5WC03wF.gif Fixed: chromium:1370200 Change-Id: I38f288d964bc992d1de0dce2ed2becd4220793df Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3934288 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#83599}
226 lines
3.6 KiB
Plaintext
226 lines
3.6 KiB
Plaintext
Tests breakable locations in comma expressions.
|
|
|
|
Running test: testBreakLocations
|
|
|
|
function testFunction() {
|
|
|C|foo(), |C|foo(), |C|foo();
|
|
|_|return |C|bar(), |C|bar();|R|
|
|
}
|
|
|
|
function foo() {
|
|
|_|return |C|baz(), |C|baz();|R|
|
|
}
|
|
|
|
function bar() {
|
|
|_|return |C|foo(),
|
|
1 |_|+ |C|foo(),
|
|
2 |_|+ |C|foo();|R|
|
|
}
|
|
|
|
const baz = |_|() => |_|0|R|;
|
|
|R|
|
|
|
|
|
|
Running test: testStepping
|
|
Execution paused in testFunction:
|
|
function testFunction() {
|
|
#foo(), foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
#return baz(), baz();
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
#foo(), foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
return baz(), #baz();
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
#foo(), foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
return baz(), baz();#
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
#foo(), foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in testFunction:
|
|
function testFunction() {
|
|
foo(), #foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
#return baz(), baz();
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
foo(), #foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
return baz(), #baz();
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
foo(), #foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
return baz(), baz();#
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
foo(), #foo(), foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in testFunction:
|
|
function testFunction() {
|
|
foo(), foo(), #foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
#return baz(), baz();
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
foo(), foo(), #foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
return baz(), #baz();
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
foo(), foo(), #foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in foo:
|
|
function foo() {
|
|
return baz(), baz();#
|
|
}
|
|
|
|
Called from testFunction:
|
|
function testFunction() {
|
|
foo(), foo(), #foo();
|
|
return bar(), bar();
|
|
|
|
Execution paused in testFunction:
|
|
foo(), foo(), foo();
|
|
#return bar(), bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
function bar() {
|
|
#return foo(),
|
|
1 + foo(),
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return #bar(), bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
return foo(),
|
|
1 #+ foo(),
|
|
2 + foo();
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return #bar(), bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
1 + foo(),
|
|
2 #+ foo();
|
|
}
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return #bar(), bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
1 + foo(),
|
|
2 + foo();#
|
|
}
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return #bar(), bar();
|
|
}
|
|
|
|
Execution paused in testFunction:
|
|
foo(), foo(), foo();
|
|
return bar(), #bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
function bar() {
|
|
#return foo(),
|
|
1 + foo(),
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return bar(), #bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
return foo(),
|
|
1 #+ foo(),
|
|
2 + foo();
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return bar(), #bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
1 + foo(),
|
|
2 #+ foo();
|
|
}
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return bar(), #bar();
|
|
}
|
|
|
|
Execution paused in bar:
|
|
1 + foo(),
|
|
2 + foo();#
|
|
}
|
|
|
|
Called from testFunction:
|
|
foo(), foo(), foo();
|
|
return bar(), #bar();
|
|
}
|
|
|
|
Execution paused in testFunction:
|
|
foo(), foo(), foo();
|
|
return bar(), bar();#
|
|
}
|
|
|
|
Resuming and finishing...
|