summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/debug-stepnext-for.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/debug-stepnext-for.js')
-rw-r--r--deps/v8/test/mjsunit/es6/debug-stepnext-for.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/deps/v8/test/mjsunit/es6/debug-stepnext-for.js b/deps/v8/test/mjsunit/es6/debug-stepnext-for.js
index 9d5641a4a3..d425a46b84 100644
--- a/deps/v8/test/mjsunit/es6/debug-stepnext-for.js
+++ b/deps/v8/test/mjsunit/es6/debug-stepnext-for.js
@@ -11,6 +11,8 @@ var log = []
var s = 0;
var a = [1, 2, 3];
+var b = [1, 2, 3, 4];
+var null_value = null;
var i = 0;
function f() {
@@ -18,11 +20,11 @@ function f() {
debugger; // Break a
var j; // Break b
- for (var i in null) { // Break c
+ for (var i in null_value) { // Break c
s += a[i];
}
- for (j in null) { // Break d
+ for (j in null_value) { // Break d
s += a[j];
}
@@ -46,7 +48,7 @@ function f() {
s += j; // Break I
}
- for (let i of a) { // Break j
+ for (let i of a) { // Break j
s += i; // Break J
}
@@ -61,6 +63,11 @@ function f() {
for (let i = 0; i < 3; i++) { // Break m
s += a[i]; // Break M
}
+
+ for (let i of a) {} // Break n
+
+ [1, ...a] // Break o
+
} // Break y
function listener(event, exec_state, event_data, data) {
@@ -103,17 +110,21 @@ var expected = [
// For-in-let: get enumerable, next, body, next, ...
"g16","g11","G4","g11","G4","g11","G4","g11",
// For-of-var: [Symbol.iterator](), next(), body, next(), body, ...
- "h16","h14","h15","H4","h15","H4","h15","H4","h15",
+ "h16","h13","H4","h13","H4","h13","H4","h13",
// For-of: [Symbol.iterator](), next(), body, next(), body, ...
- "i12","i10","i11","I4","i11","I4","i11","I4","i11",
+ "i12","i9","I4","i9","I4","i9","I4","i9",
// For-of-let: [Symbol.iterator](), next(), body, next(), ...
- "j16","j14","j15","J4","j15","J4","j15","J4","j15",
+ "j18","j14","J4","j14","J4","j14","J4","j14",
// For-var: init, condition, body, next, condition, body, ...
"k15","k20","K4","k26","k20","K4","k26","k20","K4","k26","k20",
// For: init, condition, body, next, condition, body, ...
"l7","l16","L4","l22","l16","L4","l22","l16","L4","l22","l16",
// For-let: init, condition, body, next, condition, body, ...
"m15","m20","M4","m26","m20","M4","m26","m20","M4","m26","m20",
+ // For-of, empty: [Symbol.iterator](), next() once
+ "n16", "n13",
+ // Spread: expression statement, spread
+ "o2", "o9",
// Exit.
"y0","z0",
]