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

Side by Side Diff: src/parsing/parser.cc

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: properly rebase Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 // ES6 14.6.1 Static Semantics: IsInTailPosition 2713 // ES6 14.6.1 Static Semantics: IsInTailPosition
2714 Scanner::Location loc(pos, pos + 1); 2714 Scanner::Location loc(pos, pos + 1);
2715 function_state_->AddExpressionInTailPosition(return_value, loc); 2715 function_state_->AddExpressionInTailPosition(return_value, loc);
2716 } 2716 }
2717 } 2717 }
2718 } 2718 }
2719 ExpectSemicolon(CHECK_OK); 2719 ExpectSemicolon(CHECK_OK);
2720 2720
2721 if (is_generator()) { 2721 if (is_generator()) {
2722 return_value = BuildIteratorResult(return_value, true); 2722 return_value = BuildIteratorResult(return_value, true);
2723 } else if (is_async_function()) {
2724 return_value = EmitPromiseResolve(return_value, return_value->position());
2723 } 2725 }
2724 2726
2725 result = factory()->NewReturnStatement(return_value, loc.beg_pos); 2727 result = factory()->NewReturnStatement(return_value, loc.beg_pos);
2726 2728
2727 Scope* decl_scope = scope_->DeclarationScope(); 2729 Scope* decl_scope = scope_->DeclarationScope();
2728 if (decl_scope->is_script_scope() || decl_scope->is_eval_scope()) { 2730 if (decl_scope->is_script_scope() || decl_scope->is_eval_scope()) {
2729 ReportMessageAt(loc, MessageTemplate::kIllegalReturn); 2731 ReportMessageAt(loc, MessageTemplate::kIllegalReturn);
2730 *ok = false; 2732 *ok = false;
2731 return NULL; 2733 return NULL;
2732 } 2734 }
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
3953 expr = assignment->target(); 3955 expr = assignment->target();
3954 3956
3955 // TODO(adamk): Only call this if necessary. 3957 // TODO(adamk): Only call this if necessary.
3956 RewriteParameterInitializerScope(parser_->stack_limit(), initializer, 3958 RewriteParameterInitializerScope(parser_->stack_limit(), initializer,
3957 parser_->scope_, parameters->scope); 3959 parser_->scope_, parameters->scope);
3958 } 3960 }
3959 3961
3960 AddFormalParameter(parameters, expr, initializer, end_pos, is_rest); 3962 AddFormalParameter(parameters, expr, initializer, end_pos, is_rest);
3961 } 3963 }
3962 3964
3965 void ParserTraits::ParseAsyncArrowSingleExpressionBody(
3966 ZoneList<Statement*>* body, bool accept_IN,
3967 Type::ExpressionClassifier* classifier, int pos, bool* ok) {
3968 parser_->DesugarAsyncFunctionBody(
3969 parser_->ast_value_factory()->empty_string(), parser_->scope_, body,
3970 classifier, kAsyncArrowFunction, FunctionBody::ArrowConcise, accept_IN,
3971 pos, ok);
3972 }
3973
3974 void Parser::DesugarAsyncFunctionBody(const AstRawString* function_name,
3975 Scope* scope, ZoneList<Statement*>* body,
3976 ExpressionClassifier* classifier,
3977 FunctionKind kind, FunctionBody body_type,
3978 bool accept_IN, int pos, bool* ok) {
3979 scope->ForceContextAllocation();
3980 // Calling a generator returns a generator object. That object is
3981 // stored
3982 // in a temporary variable, a definition that is used by "yield"
3983 // expressions. This also marks the FunctionState as a generator.
3984 Variable* temp =
3985 scope_->NewTemporary(ast_value_factory()->dot_generator_object_string());
3986 function_state_->set_generator_object_variable(temp);
3987
3988 // Create generator, but do not yield.
3989 Expression* allocation = EmitCreateJSGeneratorObject(pos);
3990 Expression* assign_yield =
3991 factory()->NewAssignment(Token::INIT, factory()->NewVariableProxy(temp),
3992 allocation, RelocInfo::kNoPosition);
3993
3994 body->Add(
3995 factory()->NewExpressionStatement(assign_yield, RelocInfo::kNoPosition),
3996 zone());
3997
3998 Block* try_block = factory()->NewBlock(NULL, 8, true, RelocInfo::kNoPosition);
3999
4000 ZoneList<Statement*>* inner_body = try_block->statements();
4001
4002 Expression* return_value = nullptr;
4003 if (body_type == FunctionBody::Normal) {
4004 ParseStatementList(inner_body, Token::RBRACE, ok);
4005 if (!*ok) return;
4006 return_value = factory()->NewUndefinedLiteral(RelocInfo::kNoPosition);
4007 } else {
4008 return_value = ParseAssignmentExpression(accept_IN, classifier, ok);
4009 if (!*ok) return;
4010 ParserTraits::RewriteNonPattern(classifier, ok);
4011 if (!*ok) return;
4012 }
4013
4014 return_value = EmitPromiseResolve(return_value, return_value->position());
4015 inner_body->Add(
4016 factory()->NewReturnStatement(return_value, return_value->position()),
4017 zone());
4018
4019 Block* catch_block = BuildRejectPromiseOnException(try_block);
4020
4021 body->Add(catch_block, zone());
4022
4023 scope->set_end_position(scanner()->location().end_pos);
4024 }
3963 4025
3964 DoExpression* Parser::ParseDoExpression(bool* ok) { 4026 DoExpression* Parser::ParseDoExpression(bool* ok) {
3965 // AssignmentExpression :: 4027 // AssignmentExpression ::
3966 // do '{' StatementList '}' 4028 // do '{' StatementList '}'
3967 int pos = peek_position(); 4029 int pos = peek_position();
3968 4030
3969 Expect(Token::DO, CHECK_OK); 4031 Expect(Token::DO, CHECK_OK);
3970 Variable* result = 4032 Variable* result =
3971 scope_->NewTemporary(ast_value_factory()->dot_result_string()); 4033 scope_->NewTemporary(ast_value_factory()->dot_result_string());
3972 Block* block = ParseBlock(nullptr, false, CHECK_OK); 4034 Block* block = ParseBlock(nullptr, false, CHECK_OK);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
4080 if (is_generator) { 4142 if (is_generator) {
4081 // For generators, allocating variables in contexts is currently a win 4143 // For generators, allocating variables in contexts is currently a win
4082 // because it minimizes the work needed to suspend and resume an 4144 // because it minimizes the work needed to suspend and resume an
4083 // activation. The machine code produced for generators (by full-codegen) 4145 // activation. The machine code produced for generators (by full-codegen)
4084 // relies on this forced context allocation, but not in an essential way. 4146 // relies on this forced context allocation, but not in an essential way.
4085 scope_->ForceContextAllocation(); 4147 scope_->ForceContextAllocation();
4086 4148
4087 // Calling a generator returns a generator object. That object is stored 4149 // Calling a generator returns a generator object. That object is stored
4088 // in a temporary variable, a definition that is used by "yield" 4150 // in a temporary variable, a definition that is used by "yield"
4089 // expressions. This also marks the FunctionState as a generator. 4151 // expressions. This also marks the FunctionState as a generator.
4090 Variable* temp = scope_->NewTemporary( 4152 if (is_generator) {
4091 ast_value_factory()->dot_generator_object_string()); 4153 Variable* temp = scope_->NewTemporary(
4092 function_state.set_generator_object_variable(temp); 4154 ast_value_factory()->dot_generator_object_string());
4155 function_state.set_generator_object_variable(temp);
Dan Ehrenberg 2016/05/04 22:52:36 This conditional is redundant--you just checked is
caitp (gmail) 2016/05/06 18:45:26 It complicates things to do that --- because for A
4156 }
4093 } 4157 }
4094 4158
4095 Expect(Token::LPAREN, CHECK_OK); 4159 Expect(Token::LPAREN, CHECK_OK);
4096 int start_position = scanner()->location().beg_pos; 4160 int start_position = scanner()->location().beg_pos;
4097 scope_->set_start_position(start_position); 4161 scope_->set_start_position(start_position);
4098 ParserFormalParameters formals(scope); 4162 ParserFormalParameters formals(scope);
4099 ParseFormalParameterList(&formals, &formals_classifier, CHECK_OK); 4163 ParseFormalParameterList(&formals, &formals_classifier, CHECK_OK);
4100 arity = formals.Arity(); 4164 arity = formals.Arity();
4101 Expect(Token::RPAREN, CHECK_OK); 4165 Expect(Token::RPAREN, CHECK_OK);
4102 int formals_end_position = scanner()->location().end_pos; 4166 int formals_end_position = scanner()->location().end_pos;
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
4501 param_scope = param_scope->FinalizeBlockScope(); 4565 param_scope = param_scope->FinalizeBlockScope();
4502 if (param_scope != nullptr) { 4566 if (param_scope != nullptr) {
4503 CheckConflictingVarDeclarations(param_scope, CHECK_OK); 4567 CheckConflictingVarDeclarations(param_scope, CHECK_OK);
4504 } 4568 }
4505 init_block->statements()->Add(param_block, zone()); 4569 init_block->statements()->Add(param_block, zone());
4506 } 4570 }
4507 } 4571 }
4508 return init_block; 4572 return init_block;
4509 } 4573 }
4510 4574
4575 Block* Parser::BuildRejectPromiseOnException(Block* block) {
4576 // try { <block> } catch (error) { return Promise.reject(error); }
4577 Block* try_block = block;
4578 Scope* catch_scope = NewScope(scope_, CATCH_SCOPE);
4579 catch_scope->set_is_hidden();
4580 Variable* catch_variable =
4581 catch_scope->DeclareLocal(ast_value_factory()->dot_catch_string(), VAR,
4582 kCreatedInitialized, Variable::NORMAL);
4583 Block* catch_block =
4584 factory()->NewBlock(nullptr, 1, true, RelocInfo::kNoPosition);
4585
4586 Expression* promise_reject = EmitPromiseReject(
4587 factory()->NewVariableProxy(catch_variable), RelocInfo::kNoPosition);
4588
4589 ReturnStatement* return_promise_reject =
4590 factory()->NewReturnStatement(promise_reject, RelocInfo::kNoPosition);
4591 catch_block->statements()->Add(return_promise_reject, zone());
4592 TryStatement* try_catch_statement =
4593 factory()->NewTryCatchStatement(try_block, catch_scope, catch_variable,
4594 catch_block, RelocInfo::kNoPosition);
4595
4596 block = factory()->NewBlock(nullptr, 1, true, RelocInfo::kNoPosition);
4597 block->statements()->Add(try_catch_statement, zone());
4598 return block;
4599 }
4600
4601 Expression* Parser::EmitCreateJSGeneratorObject(int pos) {
4602 DCHECK_NOT_NULL(function_state_->generator_object_variable());
4603 ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(2, zone());
4604 args->Add(factory()->NewThisFunction(pos), zone());
4605 args->Add(ThisExpression(scope_, factory(), RelocInfo::kNoPosition), zone());
4606 return factory()->NewCallRuntime(Runtime::kCreateJSGeneratorObject, args,
4607 pos);
4608 }
4609
4610 Expression* Parser::EmitPromiseResolve(Expression* value, int pos) {
4611 ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(1, zone());
4612 args->Add(value, zone());
4613 return factory()->NewCallRuntime(Context::PROMISE_CREATE_RESOLVED_INDEX, args,
4614 pos);
4615 }
4616
4617 Expression* Parser::EmitPromiseReject(Expression* value, int pos) {
4618 ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(1, zone());
4619 args->Add(value, zone());
4620 return factory()->NewCallRuntime(Context::PROMISE_CREATE_REJECTED_INDEX, args,
4621 pos);
4622 }
4511 4623
4512 ZoneList<Statement*>* Parser::ParseEagerFunctionBody( 4624 ZoneList<Statement*>* Parser::ParseEagerFunctionBody(
4513 const AstRawString* function_name, int pos, 4625 const AstRawString* function_name, int pos,
4514 const ParserFormalParameters& parameters, FunctionKind kind, 4626 const ParserFormalParameters& parameters, FunctionKind kind,
4515 FunctionLiteral::FunctionType function_type, bool* ok) { 4627 FunctionLiteral::FunctionType function_type, bool* ok) {
4516 // Everything inside an eagerly parsed function will be parsed eagerly 4628 // Everything inside an eagerly parsed function will be parsed eagerly
4517 // (see comment above). 4629 // (see comment above).
4518 ParsingModeScope parsing_mode(this, PARSE_EAGERLY); 4630 ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
4519 ZoneList<Statement*>* result = new(zone()) ZoneList<Statement*>(8, zone()); 4631 ZoneList<Statement*>* result = new(zone()) ZoneList<Statement*>(8, zone());
4520 4632
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4554 // - InitialYield yields the actual generator object. 4666 // - InitialYield yields the actual generator object.
4555 // - Any return statement inside the body will have its argument wrapped 4667 // - Any return statement inside the body will have its argument wrapped
4556 // in a "done" iterator result object. 4668 // in a "done" iterator result object.
4557 // - If the generator terminates for whatever reason, we must close it. 4669 // - If the generator terminates for whatever reason, we must close it.
4558 // Hence the finally clause. 4670 // Hence the finally clause.
4559 4671
4560 Block* try_block = 4672 Block* try_block =
4561 factory()->NewBlock(nullptr, 3, false, RelocInfo::kNoPosition); 4673 factory()->NewBlock(nullptr, 3, false, RelocInfo::kNoPosition);
4562 4674
4563 { 4675 {
4564 ZoneList<Expression*>* arguments = 4676 Expression* allocation = EmitCreateJSGeneratorObject(pos);
4565 new (zone()) ZoneList<Expression*>(2, zone());
4566 arguments->Add(factory()->NewThisFunction(pos), zone());
4567 arguments->Add(
4568 ThisExpression(scope_, factory(), RelocInfo::kNoPosition), zone());
4569 CallRuntime* allocation = factory()->NewCallRuntime(
4570 Runtime::kCreateJSGeneratorObject, arguments, pos);
4571
4572 VariableProxy* init_proxy = factory()->NewVariableProxy( 4677 VariableProxy* init_proxy = factory()->NewVariableProxy(
4573 function_state_->generator_object_variable()); 4678 function_state_->generator_object_variable());
4574 Assignment* assignment = factory()->NewAssignment( 4679 Assignment* assignment = factory()->NewAssignment(
4575 Token::INIT, init_proxy, allocation, RelocInfo::kNoPosition); 4680 Token::INIT, init_proxy, allocation, RelocInfo::kNoPosition);
4576 VariableProxy* get_proxy = factory()->NewVariableProxy( 4681 VariableProxy* get_proxy = factory()->NewVariableProxy(
4577 function_state_->generator_object_variable()); 4682 function_state_->generator_object_variable());
4578 Yield* yield = 4683 Yield* yield =
4579 factory()->NewYield(get_proxy, assignment, RelocInfo::kNoPosition); 4684 factory()->NewYield(get_proxy, assignment, RelocInfo::kNoPosition);
4685
Dan Ehrenberg 2016/05/04 22:52:36 No need for the extra newline
4580 try_block->statements()->Add( 4686 try_block->statements()->Add(
4581 factory()->NewExpressionStatement(yield, RelocInfo::kNoPosition), 4687 factory()->NewExpressionStatement(yield, RelocInfo::kNoPosition),
4582 zone()); 4688 zone());
4583 } 4689 }
4584 4690
4585 ParseStatementList(try_block->statements(), Token::RBRACE, CHECK_OK); 4691 ParseStatementList(try_block->statements(), Token::RBRACE, CHECK_OK);
4586 4692
4587 Statement* final_return = factory()->NewReturnStatement( 4693 Statement* final_return = factory()->NewReturnStatement(
4588 BuildIteratorResult(nullptr, true), RelocInfo::kNoPosition); 4694 BuildIteratorResult(nullptr, true), RelocInfo::kNoPosition);
4589 try_block->statements()->Add(final_return, zone()); 4695 try_block->statements()->Add(final_return, zone());
4590 4696
4591 Block* finally_block = 4697 Block* finally_block =
4592 factory()->NewBlock(nullptr, 1, false, RelocInfo::kNoPosition); 4698 factory()->NewBlock(nullptr, 1, false, RelocInfo::kNoPosition);
4593 ZoneList<Expression*>* args = 4699 ZoneList<Expression*>* args =
4594 new (zone()) ZoneList<Expression*>(1, zone()); 4700 new (zone()) ZoneList<Expression*>(1, zone());
4595 VariableProxy* call_proxy = factory()->NewVariableProxy( 4701 VariableProxy* call_proxy = factory()->NewVariableProxy(
4596 function_state_->generator_object_variable()); 4702 function_state_->generator_object_variable());
4597 args->Add(call_proxy, zone()); 4703 args->Add(call_proxy, zone());
4598 Expression* call = factory()->NewCallRuntime( 4704 Expression* call = factory()->NewCallRuntime(
4599 Runtime::kGeneratorClose, args, RelocInfo::kNoPosition); 4705 Runtime::kGeneratorClose, args, RelocInfo::kNoPosition);
4600 finally_block->statements()->Add( 4706 finally_block->statements()->Add(
4601 factory()->NewExpressionStatement(call, RelocInfo::kNoPosition), 4707 factory()->NewExpressionStatement(call, RelocInfo::kNoPosition),
4602 zone()); 4708 zone());
4603 4709
4604 body->Add(factory()->NewTryFinallyStatement(try_block, finally_block, 4710 body->Add(factory()->NewTryFinallyStatement(try_block, finally_block,
4605 RelocInfo::kNoPosition), 4711 RelocInfo::kNoPosition),
4606 zone()); 4712 zone());
4713 } else if (IsAsyncFunction(kind)) {
4714 const bool accept_IN = true;
4715 DesugarAsyncFunctionBody(function_name, inner_scope, body, nullptr, kind,
4716 FunctionBody::Normal, accept_IN, pos, CHECK_OK);
Dan Ehrenberg 2016/05/04 22:52:36 I like how you factored out DesugarAsyncFunctionBo
caitp (gmail) 2016/05/06 18:45:26 Sure --- but lets do that in a separate CL
4607 } else { 4717 } else {
4608 ParseStatementList(body, Token::RBRACE, CHECK_OK); 4718 ParseStatementList(body, Token::RBRACE, CHECK_OK);
4609 } 4719 }
4610 4720
4611 if (IsSubclassConstructor(kind)) { 4721 if (IsSubclassConstructor(kind)) {
4612 body->Add( 4722 body->Add(
4613 factory()->NewReturnStatement( 4723 factory()->NewReturnStatement(
4614 this->ThisExpression(scope_, factory(), RelocInfo::kNoPosition), 4724 this->ThisExpression(scope_, factory(), RelocInfo::kNoPosition),
4615 RelocInfo::kNoPosition), 4725 RelocInfo::kNoPosition),
4616 zone()); 4726 zone());
4617 } 4727 }
4618 } 4728 }
4619 4729
4620 Expect(Token::RBRACE, CHECK_OK); 4730 Expect(Token::RBRACE, CHECK_OK);
4621 scope_->set_end_position(scanner()->location().end_pos); 4731 scope_->set_end_position(scanner()->location().end_pos);
4622 4732
4623 if (!parameters.is_simple) { 4733 if (!parameters.is_simple) {
4624 DCHECK_NOT_NULL(inner_scope); 4734 DCHECK_NOT_NULL(inner_scope);
4625 DCHECK_EQ(body, inner_block->statements()); 4735 DCHECK_EQ(body, inner_block->statements());
4626 SetLanguageMode(scope_, inner_scope->language_mode()); 4736 SetLanguageMode(scope_, inner_scope->language_mode());
4627 Block* init_block = BuildParameterInitializationBlock(parameters, CHECK_OK); 4737 Block* init_block = BuildParameterInitializationBlock(parameters, CHECK_OK);
4738
4739 if (IsAsyncFunction(kind)) {
4740 init_block = BuildRejectPromiseOnException(init_block);
Dan Ehrenberg 2016/05/04 22:52:36 Rather than adding a second call to BuildRejectPro
caitp (gmail) 2016/05/06 18:45:26 You mean like ``` if (IsAsyncFunction(kind)) {
4741 }
4742
4628 DCHECK_NOT_NULL(init_block); 4743 DCHECK_NOT_NULL(init_block);
4629 4744
4630 inner_scope->set_end_position(scanner()->location().end_pos); 4745 inner_scope->set_end_position(scanner()->location().end_pos);
4631 inner_scope = inner_scope->FinalizeBlockScope(); 4746 inner_scope = inner_scope->FinalizeBlockScope();
4632 if (inner_scope != nullptr) { 4747 if (inner_scope != nullptr) {
4633 CheckConflictingVarDeclarations(inner_scope, CHECK_OK); 4748 CheckConflictingVarDeclarations(inner_scope, CHECK_OK);
4634 InsertShadowingVarBindingInitializers(inner_block); 4749 InsertShadowingVarBindingInitializers(inner_block);
4635 } 4750 }
4636 4751
4637 result->Add(init_block, zone()); 4752 result->Add(init_block, zone());
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
5419 int pos) { 5534 int pos) {
5420 return parser_->RewriteAssignExponentiation(left, right, pos); 5535 return parser_->RewriteAssignExponentiation(left, right, pos);
5421 } 5536 }
5422 5537
5423 void ParserTraits::RewriteNonPattern(Type::ExpressionClassifier* classifier, 5538 void ParserTraits::RewriteNonPattern(Type::ExpressionClassifier* classifier,
5424 bool* ok) { 5539 bool* ok) {
5425 parser_->RewriteNonPattern(classifier, ok); 5540 parser_->RewriteNonPattern(classifier, ok);
5426 } 5541 }
5427 5542
5428 Expression* ParserTraits::RewriteAwaitExpression(Expression* value, int pos) { 5543 Expression* ParserTraits::RewriteAwaitExpression(Expression* value, int pos) {
5429 // TODO(caitp): Implement AsyncFunctionAwait() 5544 Expression* generator_object = parser_->factory()->NewVariableProxy(
5430 // per tc39.github.io/ecmascript-asyncawait/#abstract-ops-async-function-await 5545 parser_->function_state_->generator_object_variable());
5431 return value; 5546
5547 ZoneList<Expression*>* async_function_await_args =
5548 new (zone()) ZoneList<Expression*>(2, zone());
5549 async_function_await_args->Add(generator_object, zone());
5550 async_function_await_args->Add(value, zone());
5551 Expression* async_function_await = parser_->factory()->NewCallRuntime(
5552 Context::ASYNC_FUNCTION_AWAIT_INDEX, async_function_await_args,
5553 RelocInfo::kNoPosition);
5554
5555 generator_object = parser_->factory()->NewVariableProxy(
5556 parser_->function_state_->generator_object_variable());
5557 return parser_->factory()->NewYield(generator_object, async_function_await,
5558 pos);
5432 } 5559 }
5433 5560
5434 Zone* ParserTraits::zone() const { 5561 Zone* ParserTraits::zone() const {
5435 return parser_->function_state_->scope()->zone(); 5562 return parser_->function_state_->scope()->zone();
5436 } 5563 }
5437 5564
5438 5565
5439 ZoneList<Expression*>* ParserTraits::GetNonPatternList() const { 5566 ZoneList<Expression*>* ParserTraits::GetNonPatternList() const {
5440 return parser_->function_state_->non_patterns_to_rewrite(); 5567 return parser_->function_state_->non_patterns_to_rewrite();
5441 } 5568 }
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
6915 try_block, target); 7042 try_block, target);
6916 final_loop = target; 7043 final_loop = target;
6917 } 7044 }
6918 7045
6919 return final_loop; 7046 return final_loop;
6920 } 7047 }
6921 7048
6922 7049
6923 } // namespace internal 7050 } // namespace internal
6924 } // namespace v8 7051 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698