| Index: test/debugger/debug/debug-scopes-suspended-generators.js
|
| diff --git a/test/debugger/debug/debug-scopes-suspended-generators.js b/test/debugger/debug/debug-scopes-suspended-generators.js
|
| index 6d78b64d6c366c70d6a104fffa15799a008eae2f..cf1b6468aa21e577bf0f8d1f05816a6fbca301cb 100644
|
| --- a/test/debugger/debug/debug-scopes-suspended-generators.js
|
| +++ b/test/debugger/debug/debug-scopes-suspended-generators.js
|
| @@ -107,7 +107,7 @@
|
| }
|
|
|
| var g = gen1();
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({}, 0, g);
|
| @@ -120,7 +120,7 @@
|
| }
|
|
|
| g = gen2(42);
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 42}, 0, g);
|
| @@ -134,7 +134,7 @@
|
| }
|
|
|
| g = gen3(0);
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 0, b: undefined}, 0, g);
|
| @@ -148,12 +148,11 @@
|
| var x = 2;
|
| yield a;
|
| var y = 3;
|
| - yield a;
|
| return b;
|
| }
|
|
|
| g = gen4(0, 1);
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 0, b: 1, x: undefined, y: undefined}, 0, g);
|
| @@ -168,13 +167,12 @@
|
|
|
| function *gen5(a) {
|
| eval('var b = 2');
|
| - yield a;
|
| return b;
|
| }
|
|
|
| g = gen5(1);
|
| g.next();
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 1, b: 2}, 0, g);
|
| @@ -192,13 +190,13 @@
|
| g = gen6();
|
| g.next();
|
| CheckScopeChain([debug.ScopeType.With,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({}, 0, g);
|
|
|
| g.next();
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
|
|
| @@ -218,7 +216,7 @@
|
| g.next();
|
| CheckScopeChain([debug.ScopeType.With,
|
| debug.ScopeType.With,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({}, 0, g);
|
| @@ -239,7 +237,7 @@
|
| g.next();
|
| CheckScopeChain([debug.ScopeType.With,
|
| debug.ScopeType.With,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 2, b: 1}, 0, g);
|
| @@ -261,7 +259,7 @@
|
| g = gen9();
|
| g.next();
|
| CheckScopeChain([debug.ScopeType.Catch,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({e: 42}, 0, g);
|
| @@ -276,23 +274,24 @@
|
| g = gen10();
|
| g.next();
|
| CheckScopeChain([debug.ScopeType.Block,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Block,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({i: 0}, 0, g);
|
|
|
| g.next();
|
| CheckScopeContent({i: 1}, 0, g);
|
| +CheckScopeContent({i: 0}, 1, g); // Additional block scope with i = 0;
|
|
|
| // Nested generators.
|
|
|
| var gen12;
|
| function *gen11() {
|
| - var b = 2;
|
| gen12 = function*() {
|
| var a = 1;
|
| yield 1;
|
| - return b;
|
| + return 2;
|
| }();
|
|
|
| var a = 0;
|
| @@ -302,12 +301,12 @@
|
| gen11().next();
|
| g = gen12;
|
|
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 1}, 0, g);
|
| -CheckScopeContent({b: 2}, 1, g);
|
| +CheckScopeContent({a: 0}, 1, g);
|
|
|
| // Set a variable in an empty scope.
|
|
|
| @@ -356,7 +355,7 @@
|
| assertEquals(1, g.next().value);
|
|
|
| CheckScopeChain([debug.ScopeType.With,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({a: 1, b: 2}, 0, g);
|
| @@ -377,7 +376,7 @@
|
| CheckScopeContent({c: 1, d: 4, e: 42}, 1, g);
|
| assertEquals(5, g.next().value); // Initialized after set.
|
|
|
| -CheckScopeChain([debug.ScopeType.Local,
|
| +CheckScopeChain([debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
|
|
| @@ -405,15 +404,15 @@
|
|
|
| CheckScopeChain([debug.ScopeType.Block,
|
| debug.ScopeType.With,
|
| - debug.ScopeType.Local,
|
| - debug.ScopeType.Script,
|
| - debug.ScopeType.Global], g);
|
| -CheckScopeContent({d: 4, e: undefined}, 0, g);
|
| + debug.ScopeType.Closure,
|
| + debug.ScopeType.Script,
|
| + debug.ScopeType.Global], g);
|
| +CheckScopeContent({d: 4}, 0, g);
|
| CheckScopeContent({a: 1, b: 2}, 1, g);
|
| CheckScopeContent({c: 3}, 2, g);
|
|
|
| Debug.generatorScope(g, 0).setVariableValue("d", 1);
|
| -CheckScopeContent({d: 1, e: undefined}, 0, g);
|
| +CheckScopeContent({d: 1}, 0, g);
|
|
|
| assertEquals(1, g.next().value);
|
|
|
| @@ -435,7 +434,7 @@
|
| g.next();
|
|
|
| CheckScopeChain([debug.ScopeType.Catch,
|
| - debug.ScopeType.Local,
|
| + debug.ScopeType.Closure,
|
| debug.ScopeType.Script,
|
| debug.ScopeType.Global], g);
|
| CheckScopeContent({e: 42}, 0, g);
|
|
|