Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: test/mjsunit/es6/debug-blockscopes.js

Issue 981203003: Stack allocate lexical locals + hoist stack slots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Feedback + rebased Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/block-scoping-top-level.js ('k') | test/mjsunit/es6/debug-function-scopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-blockscopes.js
diff --git a/test/mjsunit/es6/debug-blockscopes.js b/test/mjsunit/es6/debug-blockscopes.js
index 9f5d13e90024f97df4a2ccc31ab59cf141a37dea..39849da95f36d64f8abee64d22ea183fb4604888 100644
--- a/test/mjsunit/es6/debug-blockscopes.js
+++ b/test/mjsunit/es6/debug-blockscopes.js
@@ -498,7 +498,47 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
- CheckScopeContent({}, 0, exec_state);
+ CheckScopeContent({x:undefined}, 0, exec_state);
};
uninitialized_1();
EndTest();
+
+
+// Block scopes shadowing
+BeginTest("Block scopes shadowing 1");
+function shadowing_1() {
+ let i = 0;
+ {
+ let i = 5;
+ debugger;
+ assertEquals(27, i);
+ }
+ assertEquals(0, i);
+ debugger;
+ assertEquals(27, i);
+}
+
+listener_delegate = function (exec_state) {
+ exec_state.frame(0).evaluate("i = 27");
+}
+shadowing_1();
+EndTest();
+
+
+// Block scopes shadowing
+BeginTest("Block scopes shadowing 2");
+function shadowing_2() {
+ let i = 0;
+ {
+ let j = 5;
+ debugger;
+ assertEquals(27, j);
+ }
+ assertEquals(0, i);
+}
+
+listener_delegate = function (exec_state) {
+ exec_state.frame(0).evaluate("j = 27");
+}
+shadowing_2();
+EndTest();
« no previous file with comments | « test/mjsunit/es6/block-scoping-top-level.js ('k') | test/mjsunit/es6/debug-function-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698