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

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

Issue 2683563002: [parser] Skipping inner funcs: produce the same scopes / variables for this expressions. (Closed)
Patch Set: oops cannot assign this Created 3 years, 10 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 5a7809c5862a0aefde1ab7ae76360306b63fc550..3bf3857389c8746facbc8f31f4b602da3fcf59ba 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -9258,12 +9258,19 @@ TEST(PreParserScopeAnalysis) {
{"", "var var1; if (true) { const var1 = 0; }"},
{"", "const var1 = 0; if (true) { const var1 = 0; }"},
- // Variable called "arguments"
+ // Arguments and this.
{"", "arguments;"},
{"", "arguments = 5;"},
+ {"", "if (true) { arguments; }"},
+ {"", "if (true) { arguments = 5; }"},
{"", "function f() { arguments; }"},
{"", "function f() { arguments = 5; }"},
+ {"", "this;"},
+ {"", "if (true) { this; }"},
+ {"", "function f() { this; }"},
+
+ // Variable called "arguments"
{"", "var arguments;"},
{"", "var arguments; arguments = 5;"},
{"", "if (true) { var arguments; }"},
@@ -9435,9 +9442,6 @@ TEST(PreParserScopeAnalysis) {
{"",
"var var1 = 0; for (var1; var1 > 2; ) { function foo() { var1 = 6; } }"},
- // FIXME(marja): Add test cases for special variables (this, arguments
- // etc) referred to in the for loop conditions.
-
// Sloppy block functions.
{"", "if (true) { function f1() {} }"},
{"", "if (true) { function f1() {} function f1() {} }"},
« 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