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

Unified Diff: test/cctest/test-parsing.cc

Issue 2616393002: PreParsing inner funcs: make scope analysis even more complete. (Closed)
Patch Set: Created 3 years, 11 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 | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index abdb3f50e43df300f6a0e02977b5d670512b6701..60b811667919d9fe5f7ed411a989525c3c886c12 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -8864,16 +8864,22 @@ TEST(NoPessimisticContextAllocation) {
false},
{"function inner() { for (var {a, my_var} in {}) { } my_var; }", false},
{"function inner() { for (var {a, my_var} of []) { } my_var; }", false},
- {"function inner() { class my_var {}; my_var }", false},
- // In the following cases we still context allocate pessimistically:
- {"function inner() { function my_var() {} my_var; }", true},
- {"function inner() { if (true) { function my_var() {} } my_var; }",
- true},
{"function inner() { for (let my_var = 0; my_var < 1; ++my_var) { my_var "
"} }",
- true},
+ false},
+ {"function inner() { for (var my_var = 0; my_var < 1; ++my_var) { my_var "
+ "} }",
+ false},
{"function inner() { for (let a = 0, my_var = 0; my_var < 1; ++my_var) { "
"my_var } }",
+ false},
+ {"function inner() { for (var a = 0, my_var = 0; my_var < 1; ++my_var) { "
+ "my_var } }",
+ false},
+ {"function inner() { class my_var {}; my_var }", false},
+ // In the following cases we still context allocate pessimistically:
+ {"function inner() { function my_var() {} my_var; }", true},
+ {"function inner() { if (true) { function my_var() {} } my_var; }",
true},
};
« no previous file with comments | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698