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

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

Issue 1124233002: Remove Scope::scope_uses_arguments_ flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 7 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/scopes.cc ('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 f0abbc958f9a241f2270bc85864db9561817c34b..92be55b91b8fc6bc9486e91a9b7c2b38db928a6d 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -960,7 +960,6 @@ TEST(ScopeUsesArgumentsSuperThis) {
ARGUMENTS = 1,
SUPER_PROPERTY = 1 << 1,
THIS = 1 << 2,
- INNER_ARGUMENTS = 1 << 3,
INNER_SUPER_PROPERTY = 1 << 4,
};
@@ -1001,9 +1000,9 @@ TEST(ScopeUsesArgumentsSuperThis) {
{"return { m(x) { return () => super.m() } }", NONE},
// Flags must be correctly set when using block scoping.
{"\"use strict\"; while (true) { let x; this, arguments; }",
- INNER_ARGUMENTS | THIS},
+ ARGUMENTS | THIS},
{"\"use strict\"; while (true) { let x; this, super.f(), arguments; }",
- INNER_ARGUMENTS | INNER_SUPER_PROPERTY | THIS},
+ ARGUMENTS | INNER_SUPER_PROPERTY | THIS},
{"\"use strict\"; if (foo()) { let x; this.f() }", THIS},
{"\"use strict\"; if (foo()) { let x; super.f() }",
INNER_SUPER_PROPERTY},
@@ -1064,8 +1063,10 @@ TEST(ScopeUsesArgumentsSuperThis) {
CHECK_EQ(1, scope->inner_scopes()->length());
scope = scope->inner_scopes()->at(0);
}
- CHECK_EQ((source_data[i].expected & ARGUMENTS) != 0,
- scope->uses_arguments());
+ // Arguments usage in an arrow function doesn't cause local allocation of
+ // an arguments object.
+ CHECK_EQ((source_data[i].expected & ARGUMENTS) != 0 && j != 1,
+ scope->arguments() != nullptr);
CHECK_EQ((source_data[i].expected & SUPER_PROPERTY) != 0,
scope->uses_super_property());
if ((source_data[i].expected & THIS) != 0) {
@@ -1073,8 +1074,6 @@ TEST(ScopeUsesArgumentsSuperThis) {
// script scope are marked as used.
CHECK(scope->LookupThis()->is_used());
}
- CHECK_EQ((source_data[i].expected & INNER_ARGUMENTS) != 0,
- scope->inner_uses_arguments());
CHECK_EQ((source_data[i].expected & INNER_SUPER_PROPERTY) != 0,
scope->inner_uses_super_property());
}
« no previous file with comments | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698