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

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

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope Created 4 years, 4 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
« src/ast/scopes.cc ('K') | « test/cctest/compiler/test-loop-assignment-analysis.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 1f9bf5d0b957e3ffe0457399294fc19f22f33637..bff0f3c441b95203d3453971d7dcb51c58491534 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1120,7 +1120,7 @@ TEST(ScopeUsesArgumentsSuperThis) {
CHECK(i::Scope::Analyze(&info));
CHECK(info.literal() != NULL);
- i::Scope* script_scope = info.literal()->scope();
+ i::DeclarationScope* script_scope = info.literal()->scope();
CHECK(script_scope->is_script_scope());
i::Scope* scope = script_scope->inner_scope();
@@ -1134,8 +1134,8 @@ TEST(ScopeUsesArgumentsSuperThis) {
}
// Arrows themselves never get an arguments object.
if ((source_data[i].expected & ARGUMENTS) != 0 &&
- !scope->is_arrow_scope()) {
- CHECK_NOT_NULL(scope->arguments());
+ !scope->AsDeclarationScope()->is_arrow_scope()) {
+ CHECK_NOT_NULL(scope->AsDeclarationScope()->arguments());
}
CHECK_EQ((source_data[i].expected & SUPER_PROPERTY) != 0,
scope->uses_super_property());
@@ -3392,8 +3392,8 @@ TEST(SerializationOfMaybeAssignmentFlag) {
const i::AstRawString* name = avf.GetOneByteString("result");
i::Handle<i::String> str = name->string();
CHECK(str->IsInternalizedString());
- i::Scope* script_scope =
- new (&zone) i::Scope(&zone, nullptr, i::SCRIPT_SCOPE);
+ i::DeclarationScope* script_scope =
+ new (&zone) i::DeclarationScope(&zone, nullptr, i::SCRIPT_SCOPE);
i::Scope* s = i::Scope::DeserializeScopeChain(
isolate, &zone, context, script_scope, &avf,
i::Scope::DeserializationMode::kKeepScopeInfo);
@@ -3440,8 +3440,8 @@ TEST(IfArgumentsArrayAccessedThenParametersMaybeAssigned) {
i::AstValueFactory avf(&zone, isolate->heap()->HashSeed());
avf.Internalize(isolate);
- i::Scope* script_scope =
- new (&zone) i::Scope(&zone, nullptr, i::SCRIPT_SCOPE);
+ i::DeclarationScope* script_scope =
+ new (&zone) i::DeclarationScope(&zone, nullptr, i::SCRIPT_SCOPE);
i::Scope* s = i::Scope::DeserializeScopeChain(
isolate, &zone, context, script_scope, &avf,
i::Scope::DeserializationMode::kKeepScopeInfo);
@@ -5942,7 +5942,7 @@ TEST(ModuleParsingInternals) {
CHECK(parser.Parse(&info));
CHECK(i::Compiler::Analyze(&info));
i::FunctionLiteral* func = info.literal();
- i::Scope* module_scope = func->scope();
+ i::DeclarationScope* module_scope = func->scope();
i::Scope* outer_scope = module_scope->outer_scope();
CHECK(outer_scope->is_script_scope());
CHECK_NULL(outer_scope->outer_scope());
« src/ast/scopes.cc ('K') | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698