2017-05-24 12:12:53 +00:00
|
|
|
Tests breakable locations in for-of loops.
|
|
|
|
|
|
|
|
Running test: testBreakLocations
|
|
|
|
|
[inspector] moved var initialization break location before init expression (reland)
This CL improves break locations for expressions like 'var a = <expr>'. Without CL we use <expr> position as break location for initialization statement, with this CL we use position of first character after '=' as position.
Benefits (see test for details):
- only one break in expressions which includes mix of property lookup and calls, e.g. var p = Promise.resolve().then(x => x * 2),
- removed redundant break location for expressions like: let { x, y } = { x: 1, y: 2}.
TBR=dgozman@chromium.org,rmcilroy@chromium.org,machenbach@chromium.org,marja@chromium.org,kozyatinskiy@chromium.org,devtools-reviews@chromium.org,v8-reviews@googlegroups.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: v8:5909
Change-Id: Ie84fa79afeed09e28cf8478ba610a0cfbfdfc294
Reviewed-on: https://chromium-review.googlesource.com/518116
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45598}
2017-05-30 12:25:55 +00:00
|
|
|
Running test: testStepInto
|
|
|
|
|
2017-05-24 12:12:53 +00:00
|
|
|
function testFunction() {
|
|
|
|
var obj = |_|{a : 1};
|
|
|
|
var arr = |_|[1];
|
|
|
|
var all = |_|[];
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var |_|k in |_|arr) { all.|C|push(k); }
|
2018-01-11 17:24:11 +00:00
|
|
|
for (var |C|k of |_|arr) { all.|C|push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var |_|k in |_|obj) { all.|C|push(k); }
|
|
|
|
for (let |_|k in |_|arr) { all.|C|push(k); }
|
2018-01-11 17:24:11 +00:00
|
|
|
for (let |C|k of |_|arr) { all.|C|push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (let |_|k in |_|obj) { all.|C|push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
var iterable = |_|{
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
|_|return {
|
|
|
|
i: 0,
|
|
|
|
next() {
|
2017-07-17 19:02:35 +00:00
|
|
|
if (this.|_|i < 1) {
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return { value: this.i++, done: false };|R|
|
2017-05-24 12:12:53 +00:00
|
|
|
}
|
2017-07-14 17:50:09 +00:00
|
|
|
|_|return { value: undefined, done: true };|R|
|
|
|
|
}
|
|
|
|
};|R|
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
};
|
2018-01-11 17:24:11 +00:00
|
|
|
for (var |C|k of |_|iterable) { all.|C|push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
|_|iterable.i = 0;
|
2018-01-11 17:24:11 +00:00
|
|
|
for (let |C|k of |_|iterable) { all.|C|push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
|R|}
|
|
|
|
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
|
|
|
|
|
|
|
|
testFunction (test.js:2:12)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
function testFunction() {
|
|
|
|
var obj = #{a : 1};
|
|
|
|
var arr = [1];
|
|
|
|
|
|
|
|
testFunction (test.js:3:12)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
var obj = {a : 1};
|
|
|
|
var arr = #[1];
|
|
|
|
var all = [];
|
|
|
|
|
|
|
|
testFunction (test.js:4:12)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
var arr = [1];
|
|
|
|
var all = #[];
|
|
|
|
for (var k in arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:5:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
var all = [];
|
|
|
|
for (var k in #arr) { all.push(k); }
|
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:5:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
var all = [];
|
|
|
|
for (var #k in arr) { all.push(k); }
|
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:5:27)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
var all = [];
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var k in arr) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:5:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
var all = [];
|
|
|
|
for (var #k in arr) { all.push(k); }
|
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:6:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in arr) { all.push(k); }
|
|
|
|
for (var k of #arr) { all.push(k); }
|
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:6:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in arr) { all.push(k); }
|
|
|
|
for (var #k of arr) { all.push(k); }
|
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:6:27)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in arr) { all.push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var k of arr) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:6:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in arr) { all.push(k); }
|
|
|
|
for (var #k of arr) { all.push(k); }
|
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:7:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
for (var k in #obj) { all.push(k); }
|
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:7:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
for (var #k in obj) { all.push(k); }
|
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:7:27)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k of arr) { all.push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var k in obj) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:7:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k of arr) { all.push(k); }
|
|
|
|
for (var #k in obj) { all.push(k); }
|
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:8:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
for (let k in #arr) { all.push(k); }
|
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:8:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
for (let #k in arr) { all.push(k); }
|
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:8:27)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in obj) { all.push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (let k in arr) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:8:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k in obj) { all.push(k); }
|
|
|
|
for (let #k in arr) { all.push(k); }
|
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:9:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
for (let k of #arr) { all.push(k); }
|
|
|
|
for (let k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:9:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
for (let #k of arr) { all.push(k); }
|
|
|
|
for (let k in obj) { all.push(k); }
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:9:27)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k in arr) { all.push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (let k of arr) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
for (let k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:9:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k in arr) { all.push(k); }
|
|
|
|
for (let #k of arr) { all.push(k); }
|
|
|
|
for (let k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:10:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
for (let k in #obj) { all.push(k); }
|
|
|
|
|
|
|
|
|
|
|
|
testFunction (test.js:10:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
for (let #k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:10:27)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k of arr) { all.push(k); }
|
2017-07-17 19:02:35 +00:00
|
|
|
for (let k in obj) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
testFunction (test.js:10:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k of arr) { all.push(k); }
|
|
|
|
for (let #k in obj) { all.push(k); }
|
|
|
|
|
|
|
|
|
|
|
|
testFunction (test.js:12:17)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
|
|
|
|
var iterable = #{
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
|
|
|
|
testFunction (test.js:25:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
};
|
|
|
|
for (var k of #iterable) { all.push(k); }
|
|
|
|
iterable.i = 0;
|
|
|
|
|
|
|
|
[Symbol.iterator] (test.js:14:6)
|
|
|
|
testFunction (test.js:25:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
#return {
|
|
|
|
i: 0,
|
|
|
|
|
2017-07-14 17:50:09 +00:00
|
|
|
[Symbol.iterator] (test.js:22:8)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:25:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
|
|
|
};#
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
};
|
|
|
|
for (var #k of iterable) { all.push(k); }
|
|
|
|
iterable.i = 0;
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
next (test.js:17:19)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
next() {
|
2017-07-17 19:02:35 +00:00
|
|
|
if (this.#i < 1) {
|
2017-05-24 12:12:53 +00:00
|
|
|
return { value: this.i++, done: false };
|
|
|
|
|
|
|
|
next (test.js:18:12)
|
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
if (this.i < 1) {
|
|
|
|
#return { value: this.i++, done: false };
|
|
|
|
}
|
|
|
|
|
2017-07-14 17:50:09 +00:00
|
|
|
next (test.js:18:52)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
2017-07-14 17:50:09 +00:00
|
|
|
if (this.i < 1) {
|
|
|
|
return { value: this.i++, done: false };#
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
|
2019-01-09 13:21:06 +00:00
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
};
|
|
|
|
for (var #k of iterable) { all.push(k); }
|
|
|
|
iterable.i = 0;
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:25:32)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
};
|
2017-07-17 19:02:35 +00:00
|
|
|
for (var k of iterable) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
iterable.i = 0;
|
|
|
|
|
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
};
|
|
|
|
for (var #k of iterable) { all.push(k); }
|
|
|
|
iterable.i = 0;
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
next (test.js:17:19)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
next() {
|
2017-07-17 19:02:35 +00:00
|
|
|
if (this.#i < 1) {
|
2017-05-24 12:12:53 +00:00
|
|
|
return { value: this.i++, done: false };
|
|
|
|
|
|
|
|
next (test.js:20:10)
|
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
}
|
|
|
|
#return { value: undefined, done: true };
|
|
|
|
}
|
|
|
|
|
2017-07-14 17:50:09 +00:00
|
|
|
next (test.js:20:50)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
|
|
|
return { value: undefined, done: true };#
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
testFunction (test.js:26:2)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (var k of iterable) { all.push(k); }
|
|
|
|
#iterable.i = 0;
|
|
|
|
for (let k of iterable) { all.push(k); }
|
|
|
|
|
|
|
|
testFunction (test.js:27:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
iterable.i = 0;
|
|
|
|
for (let k of #iterable) { all.push(k); }
|
|
|
|
}
|
|
|
|
|
|
|
|
[Symbol.iterator] (test.js:14:6)
|
|
|
|
testFunction (test.js:27:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
#return {
|
|
|
|
i: 0,
|
|
|
|
|
2017-07-14 17:50:09 +00:00
|
|
|
[Symbol.iterator] (test.js:22:8)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:27:16)
|
|
|
|
(anonymous) (expr.js:0:0)
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
|
|
|
};#
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
iterable.i = 0;
|
|
|
|
for (let #k of iterable) { all.push(k); }
|
|
|
|
}
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
next (test.js:17:19)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
next() {
|
2017-07-17 19:02:35 +00:00
|
|
|
if (this.#i < 1) {
|
2017-05-24 12:12:53 +00:00
|
|
|
return { value: this.i++, done: false };
|
|
|
|
|
|
|
|
next (test.js:18:12)
|
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
if (this.i < 1) {
|
|
|
|
#return { value: this.i++, done: false };
|
|
|
|
}
|
|
|
|
|
2017-07-14 17:50:09 +00:00
|
|
|
next (test.js:18:52)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
2017-07-14 17:50:09 +00:00
|
|
|
if (this.i < 1) {
|
|
|
|
return { value: this.i++, done: false };#
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
|
2019-01-09 13:21:06 +00:00
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
iterable.i = 0;
|
|
|
|
for (let #k of iterable) { all.push(k); }
|
|
|
|
}
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:27:32)
|
2017-05-24 12:12:53 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
iterable.i = 0;
|
2017-07-17 19:02:35 +00:00
|
|
|
for (let k of iterable) { all.#push(k); }
|
2017-05-24 12:12:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
iterable.i = 0;
|
|
|
|
for (let #k of iterable) { all.push(k); }
|
|
|
|
}
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
next (test.js:17:19)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
next() {
|
2017-07-17 19:02:35 +00:00
|
|
|
if (this.#i < 1) {
|
2017-05-24 12:12:53 +00:00
|
|
|
return { value: this.i++, done: false };
|
|
|
|
|
|
|
|
next (test.js:20:10)
|
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
}
|
|
|
|
#return { value: undefined, done: true };
|
|
|
|
}
|
|
|
|
|
2017-07-14 17:50:09 +00:00
|
|
|
next (test.js:20:50)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:27:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
|
|
|
return { value: undefined, done: true };#
|
|
|
|
}
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
testFunction (test.js:28:0)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
for (let k of iterable) { all.push(k); }
|
|
|
|
#}
|
|
|
|
|
2018-06-12 21:57:52 +00:00
|
|
|
(anonymous) (expr.js:0:35)
|
2017-05-24 12:12:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Running test: testStepIntoAfterBreakpoint
|
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
};
|
|
|
|
for (var #k of iterable) { all.push(k); }
|
|
|
|
iterable.i = 0;
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
next (test.js:17:19)
|
2017-05-24 12:12:53 +00:00
|
|
|
testFunction (test.js:25:11)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
next() {
|
2017-07-17 19:02:35 +00:00
|
|
|
if (this.#i < 1) {
|
2017-05-24 12:12:53 +00:00
|
|
|
return { value: this.i++, done: false };
|
|
|
|
|