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

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

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 years, 2 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 | « test/cctest/test-liveedit.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 f097505d76e8cb7683594fc77da5c539f4955f37..40739c45098000108af98b58f2dc080e2c5d35fb 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -913,9 +913,9 @@ static void CheckParsesToNumber(const char* source, bool with_dot) {
CHECK(info.scope()->declarations()->length() == 1);
i::FunctionLiteral* fun =
info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
- CHECK(fun->body()->length() == 1);
- CHECK(fun->body()->at(0)->IsReturnStatement());
- i::ReturnStatement* ret = fun->body()->at(0)->AsReturnStatement();
+ CHECK(fun->body()->size() == 1);
+ CHECK(fun->body()->front()->IsReturnStatement());
+ i::ReturnStatement* ret = fun->body()->front()->AsReturnStatement();
i::Literal* lit = ret->expression()->AsLiteral();
if (lit != NULL) {
const i::AstValue* val = lit->raw_value();
@@ -1221,10 +1221,14 @@ TEST(DiscardFunctionBody) {
function = info.literal();
CHECK_NOT_NULL(function);
CHECK_NOT_NULL(function->body());
- CHECK_EQ(1, function->body()->length());
- i::FunctionLiteral* inner =
- function->body()->first()->AsExpressionStatement()->expression()->
- AsCall()->expression()->AsFunctionLiteral();
+ CHECK_EQ(1, function->body()->size());
+ i::FunctionLiteral* inner = function->body()
+ ->front()
+ ->AsExpressionStatement()
+ ->expression()
+ ->AsCall()
+ ->expression()
+ ->AsFunctionLiteral();
i::Scope* inner_scope = inner->scope();
i::FunctionLiteral* fun = nullptr;
if (inner_scope->declarations()->length() > 0) {
@@ -1234,9 +1238,14 @@ TEST(DiscardFunctionBody) {
// uncommented.
UNREACHABLE();
CHECK_NOT_NULL(inner->body());
- CHECK_GE(2, inner->body()->length());
- i::Expression* exp = inner->body()->at(1)->AsExpressionStatement()->
- expression()->AsBinaryOperation()->right();
+ CHECK_GE(size_t(2), inner->body()->size());
+ auto it = inner->body()->begin();
+ it++;
+ i::Expression* exp = (*it)
+ ->AsExpressionStatement()
+ ->expression()
+ ->AsBinaryOperation()
+ ->right();
if (exp->IsFunctionLiteral()) {
fun = exp->AsFunctionLiteral();
} else if (exp->IsObjectLiteral()) {
« no previous file with comments | « test/cctest/test-liveedit.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698