| 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()) {
|
|
|