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

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

Issue 2162143005: Turn ZoneList inner_scopes into a linked list (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 5 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/debug/debug-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 873252f9aef8c151fab68150906bb82d224712a3..4d14da46041066dd7f72c096aba8062810aca9fc 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1094,13 +1094,15 @@ TEST(ScopeUsesArgumentsSuperThis) {
i::Scope* script_scope = info.literal()->scope();
CHECK(script_scope->is_script_scope());
- CHECK_EQ(1, script_scope->inner_scopes()->length());
- i::Scope* scope = script_scope->inner_scopes()->at(0);
+ i::Scope* scope = script_scope->inner_scope();
+ DCHECK_NOT_NULL(scope);
+ DCHECK_NULL(scope->sibling());
// Adjust for constructor scope.
if (j == 2) {
- CHECK_EQ(1, scope->inner_scopes()->length());
- scope = scope->inner_scopes()->at(0);
+ scope = scope->inner_scope();
+ DCHECK_NOT_NULL(scope);
+ DCHECK_NULL(scope->sibling());
}
CHECK_EQ((source_data[i].expected & ARGUMENTS) != 0,
scope->uses_arguments());
@@ -1412,9 +1414,10 @@ TEST(ScopePositions) {
CHECK(scope->is_script_scope());
CHECK_EQ(scope->start_position(), 0);
CHECK_EQ(scope->end_position(), kProgramSize);
- CHECK_EQ(scope->inner_scopes()->length(), 1);
- i::Scope* inner_scope = scope->inner_scopes()->at(0);
+ i::Scope* inner_scope = scope->inner_scope();
+ DCHECK_NOT_NULL(inner_scope);
+ DCHECK_NULL(inner_scope->sibling());
CHECK_EQ(inner_scope->scope_type(), source_data[i].scope_type);
CHECK_EQ(inner_scope->start_position(), kPrefixLen);
// The end position of a token is one position after the last
@@ -3550,8 +3553,9 @@ TEST(InnerAssignment) {
CHECK(info.literal() != NULL);
i::Scope* scope = info.literal()->scope();
- CHECK_EQ(scope->inner_scopes()->length(), 1);
- i::Scope* inner_scope = scope->inner_scopes()->at(0);
+ i::Scope* inner_scope = scope->inner_scope();
+ DCHECK_NOT_NULL(inner_scope);
+ DCHECK_NULL(inner_scope->sibling());
const i::AstRawString* var_name =
info.ast_value_factory()->GetOneByteString("x");
i::Variable* var = inner_scope->Lookup(var_name);
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698