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

Side by Side Diff: src/parser.cc

Issue 1127063003: [es6] implement default parameters via desugaring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: some nits Created 5 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); 866 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
867 set_allow_harmony_classes(FLAG_harmony_classes); 867 set_allow_harmony_classes(FLAG_harmony_classes);
868 set_allow_harmony_object_literals(FLAG_harmony_object_literals); 868 set_allow_harmony_object_literals(FLAG_harmony_object_literals);
869 set_allow_harmony_sloppy(FLAG_harmony_sloppy); 869 set_allow_harmony_sloppy(FLAG_harmony_sloppy);
870 set_allow_harmony_unicode(FLAG_harmony_unicode); 870 set_allow_harmony_unicode(FLAG_harmony_unicode);
871 set_allow_harmony_computed_property_names( 871 set_allow_harmony_computed_property_names(
872 FLAG_harmony_computed_property_names); 872 FLAG_harmony_computed_property_names);
873 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); 873 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters);
874 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); 874 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls);
875 set_allow_harmony_destructuring(FLAG_harmony_destructuring); 875 set_allow_harmony_destructuring(FLAG_harmony_destructuring);
876 set_allow_harmony_optional_params(FLAG_harmony_optional_params);
876 set_allow_strong_mode(FLAG_strong_mode); 877 set_allow_strong_mode(FLAG_strong_mode);
877 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; 878 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
878 ++feature) { 879 ++feature) {
879 use_counts_[feature] = 0; 880 use_counts_[feature] = 0;
880 } 881 }
881 if (info->ast_value_factory() == NULL) { 882 if (info->ast_value_factory() == NULL) {
882 // info takes ownership of AstValueFactory. 883 // info takes ownership of AstValueFactory.
883 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); 884 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed()));
884 info->set_ast_value_factory_owned(); 885 info->set_ast_value_factory_owned();
885 ast_value_factory_ = info->ast_value_factory(); 886 ast_value_factory_ = info->ast_value_factory();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 ? FunctionLiteral::ANONYMOUS_EXPRESSION 1128 ? FunctionLiteral::ANONYMOUS_EXPRESSION
1128 : FunctionLiteral::NAMED_EXPRESSION) 1129 : FunctionLiteral::NAMED_EXPRESSION)
1129 : FunctionLiteral::DECLARATION; 1130 : FunctionLiteral::DECLARATION;
1130 bool ok = true; 1131 bool ok = true;
1131 1132
1132 if (shared_info->is_arrow()) { 1133 if (shared_info->is_arrow()) {
1133 Scope* scope = NewScope(scope_, ARROW_SCOPE); 1134 Scope* scope = NewScope(scope_, ARROW_SCOPE);
1134 scope->set_start_position(shared_info->start_position()); 1135 scope->set_start_position(shared_info->start_position());
1135 FormalParameterErrorLocations error_locs; 1136 FormalParameterErrorLocations error_locs;
1136 bool has_rest = false; 1137 bool has_rest = false;
1138 bool has_initializers = false;
1139 ZoneList<Expression*>* initializers =
1140 new (zone()) ZoneList<Expression*>(0, zone());
1137 if (Check(Token::LPAREN)) { 1141 if (Check(Token::LPAREN)) {
1138 // '(' StrictFormalParameters ')' 1142 // '(' StrictFormalParameters ')'
1139 ParseFormalParameterList(scope, &error_locs, &has_rest, &ok); 1143 ParseFormalParameterList(scope, &error_locs, initializers,
1144 &has_initializers, &has_rest, &ok);
1140 if (ok) ok = Check(Token::RPAREN); 1145 if (ok) ok = Check(Token::RPAREN);
1141 } else { 1146 } else {
1142 // BindingIdentifier 1147 // BindingIdentifier
1143 ParseFormalParameter(scope, &error_locs, has_rest, &ok); 1148 Expression** initializer_ptr = nullptr;
1149 bool** has_initializer_ptr = nullptr;
1150 ParseFormalParameter(scope, &error_locs, initializer_ptr,
1151 has_initializer_ptr, has_rest, &ok);
1144 } 1152 }
1145 1153
1146 if (ok) { 1154 if (ok) {
1147 ExpressionClassifier classifier; 1155 ExpressionClassifier classifier;
1148 Expression* expression = ParseArrowFunctionLiteral( 1156 Expression* expression = ParseArrowFunctionLiteral(
1149 scope, error_locs, has_rest, &classifier, &ok); 1157 scope, error_locs, has_rest, &classifier, &ok);
1150 ValidateExpression(&classifier, &ok); 1158 ValidateExpression(&classifier, &ok);
1151 if (ok) { 1159 if (ok) {
1152 // Scanning must end at the same position that was recorded 1160 // Scanning must end at the same position that was recorded
1153 // previously. If not, parsing has been interrupted due to a stack 1161 // previously. If not, parsing has been interrupted due to a stack
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 // initialization code. Thus, inside the 'with' statement, we need 2065 // initialization code. Thus, inside the 'with' statement, we need
2058 // both access to the static and the dynamic context chain; the 2066 // both access to the static and the dynamic context chain; the
2059 // runtime needs to provide both. 2067 // runtime needs to provide both.
2060 if (resolve && var != NULL) { 2068 if (resolve && var != NULL) {
2061 proxy->BindTo(var); 2069 proxy->BindTo(var);
2062 } 2070 }
2063 return var; 2071 return var;
2064 } 2072 }
2065 2073
2066 2074
2075 void Parser::ShadowParametersForExpressions(Scope* scope) {
2076 scope->ShadowParametersForExpressions();
2077 }
2078
2079
2067 // Language extension which is only enabled for source files loaded 2080 // Language extension which is only enabled for source files loaded
2068 // through the API's extension mechanism. A native function 2081 // through the API's extension mechanism. A native function
2069 // declaration is resolved by looking up the function through a 2082 // declaration is resolved by looking up the function through a
2070 // callback provided by the extension. 2083 // callback provided by the extension.
2071 Statement* Parser::ParseNativeDeclaration(bool* ok) { 2084 Statement* Parser::ParseNativeDeclaration(bool* ok) {
2072 int pos = peek_position(); 2085 int pos = peek_position();
2073 Expect(Token::FUNCTION, CHECK_OK); 2086 Expect(Token::FUNCTION, CHECK_OK);
2074 // Allow "eval" or "arguments" for backward compatibility. 2087 // Allow "eval" or "arguments" for backward compatibility.
2075 const AstRawString* name = 2088 const AstRawString* name =
2076 ParseIdentifier(kAllowRestrictedIdentifiers, CHECK_OK); 2089 ParseIdentifier(kAllowRestrictedIdentifiers, CHECK_OK);
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3515 3528
3516 inner_scope->set_end_position(scanner()->location().end_pos); 3529 inner_scope->set_end_position(scanner()->location().end_pos);
3517 inner_block->set_scope(inner_scope); 3530 inner_block->set_scope(inner_scope);
3518 scope_ = for_scope; 3531 scope_ = for_scope;
3519 3532
3520 outer_loop->Initialize(NULL, NULL, NULL, inner_block); 3533 outer_loop->Initialize(NULL, NULL, NULL, inner_block);
3521 return outer_block; 3534 return outer_block;
3522 } 3535 }
3523 3536
3524 3537
3538 ZoneList<Statement*>* Parser::DesugarInitializeParameters(
3539 Scope* scope, bool has_initializers, ZoneList<Expression*>* initializers) {
3540 DCHECK(scope->is_function_scope());
3541
3542 if (has_initializers) {
3543 // If hasParameterExpressions for the function is true, each parameter is
3544 // desugared as follows:
3545 //
3546 // SingleNameBinding :
3547 // let <name> = %_Arguments(<index>);
3548 // SingleNameBinding Initializer
3549 // let <name> = IS_UNDEFINED(%_Arguments(<index>)) ? <initializer>
3550 // : %_Arguments(<index>);
3551 //
3552 // TODO(caitp, dslomov): support BindingPatterns & rest parameters
3553 //
3554
3555 ShadowParametersForExpressions(scope);
3556 ZoneList<Statement*>* body = new (zone()) ZoneList<Statement*>(0, zone());
3557 for (int i = 0; i < initializers->length(); ++i) {
3558 Expression* initializer = initializers->at(i);
3559
3560 // Position of parameter VariableProxy, for hole-checking
3561 int pos = scope->parameter_position(i);
3562
3563 // Lexically declare the initialized variable
3564 static const VariableMode mode = LET;
3565 VariableProxy* proxy =
3566 NewUnresolved(scope->parameter(i)->raw_name(), mode);
3567 VariableDeclaration* declaration = factory()->NewVariableDeclaration(
3568 proxy, mode, scope, RelocInfo::kNoPosition);
3569 bool ok = true;
3570
3571 // All formal parameters have been removed from the scope VariableMap,
3572 // and so Declare() should not be able to fail.
3573 proxy = factory()->NewVariableProxy(Declare(declaration, true, &ok), pos);
3574 DCHECK(ok);
3575 proxy->var()->set_maybe_assigned();
rossberg 2015/05/12 14:04:53 Why is this set?
rossberg 2015/05/20 07:41:47 Ping
caitp (gmail) 2015/05/20 11:29:38 Maybe it's not needed, but it reads like it does t
rossberg 2015/05/20 12:33:55 Ah, note that these are initialisations, not assig
3576
3577 const AstRawString* fn_name = ast_value_factory()->empty_string();
3578 const Runtime::Function* arguments =
3579 Runtime::FunctionForId(Runtime::kInlineArguments);
3580 ZoneList<Expression*>* arguments_i0 =
3581 new (zone()) ZoneList<Expression*>(0, zone());
3582 arguments_i0->Add(factory()->NewSmiLiteral(i, RelocInfo::kNoPosition),
3583 zone());
3584
3585 // TODO(caitp): ensure proper TDZ behaviour --- need hole-check for
rossberg 2015/05/12 14:04:53 Nit: this comment seems obsolete
3586 // all parameter bindings, including ones without initializers
3587 if (initializer) {
3588 // IS_UNDEFINED(%_Arguments(i)) ? <initializer> : %_Arguments(i);
3589 ZoneList<Expression*>* arguments_i1 =
3590 new (zone()) ZoneList<Expression*>(0, zone());
3591 arguments_i1->Add(factory()->NewSmiLiteral(i, RelocInfo::kNoPosition),
3592 zone());
3593
3594 Expression* arg_or_default = factory()->NewConditional(
3595 // condition:
3596 factory()->NewCompareOperation(
3597 Token::EQ_STRICT,
3598 factory()->NewCallRuntime(fn_name, arguments, arguments_i0,
3599 RelocInfo::kNoPosition),
3600 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition),
3601 RelocInfo::kNoPosition),
3602 // if true:
3603 initializer,
3604 // if false:
3605 factory()->NewCallRuntime(fn_name, arguments, arguments_i1,
3606 RelocInfo::kNoPosition),
3607 RelocInfo::kNoPosition);
3608
3609 Expression* assign = factory()->NewAssignment(
3610 Token::INIT_LET, proxy, arg_or_default, RelocInfo::kNoPosition);
3611
3612 body->Add(
3613 factory()->NewExpressionStatement(assign, RelocInfo::kNoPosition),
3614 zone());
3615 proxy->var()->set_initializer_position(initializer->position());
3616 } else {
3617 // let <name> = %_Arguments(i)
3618 Expression* assign = factory()->NewAssignment(
3619 Token::INIT_LET, proxy,
3620 factory()->NewCallRuntime(fn_name, arguments, arguments_i0,
3621 RelocInfo::kNoPosition),
3622 RelocInfo::kNoPosition);
3623 body->Add(
3624 factory()->NewExpressionStatement(assign, RelocInfo::kNoPosition),
3625 zone());
3626 proxy->var()->set_initializer_position(pos);
3627 }
3628 }
3629 return body;
3630 } else {
3631 // If hasParameterExpressions is false, remove the unnecessary parameter
3632 // block scopes.
3633 ZoneList<Scope*>* scopes = scope->inner_scopes();
3634 for (int i = 0; i < scopes->length(); ++i) {
3635 Scope* scope = scopes->at(i);
3636 DCHECK(scope->is_block_scope());
3637 scope->FinalizeBlockScope();
3638 }
3639 return nullptr;
3640 }
3641 }
3642
3643
3525 Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels, 3644 Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
3526 bool* ok) { 3645 bool* ok) {
3527 // ForStatement :: 3646 // ForStatement ::
3528 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement 3647 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement
3529 3648
3530 int stmt_pos = peek_position(); 3649 int stmt_pos = peek_position();
3531 bool is_const = false; 3650 bool is_const = false;
3532 Statement* init = NULL; 3651 Statement* init = NULL;
3533 ZoneList<const AstRawString*> lexical_bindings(1, zone()); 3652 ZoneList<const AstRawString*> lexical_bindings(1, zone());
3534 3653
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3925 error_locs->reserved = param_location; 4044 error_locs->reserved = param_location;
3926 if (!error_locs->undefined.IsValid() && IsUndefined(raw_name)) 4045 if (!error_locs->undefined.IsValid() && IsUndefined(raw_name))
3927 error_locs->undefined = param_location; 4046 error_locs->undefined = param_location;
3928 4047
3929 // When the formal parameter was originally seen, it was parsed as a 4048 // When the formal parameter was originally seen, it was parsed as a
3930 // VariableProxy and recorded as unresolved in the scope. Here we undo that 4049 // VariableProxy and recorded as unresolved in the scope. Here we undo that
3931 // parse-time side-effect. 4050 // parse-time side-effect.
3932 parser_->scope_->RemoveUnresolved(expr->AsVariableProxy()); 4051 parser_->scope_->RemoveUnresolved(expr->AsVariableProxy());
3933 4052
3934 bool is_rest = false; 4053 bool is_rest = false;
3935 bool is_duplicate = DeclareFormalParameter(scope, raw_name, is_rest); 4054 int pos = expr->position();
4055 bool is_duplicate = DeclareFormalParameter(scope, raw_name, is_rest, pos);
3936 4056
3937 if (is_duplicate) { 4057 if (is_duplicate) {
3938 // Arrow function parameter lists are parsed as StrictFormalParameters, 4058 // Arrow function parameter lists are parsed as StrictFormalParameters,
3939 // which means that they cannot have duplicates. Note that this is a subset 4059 // which means that they cannot have duplicates. Note that this is a subset
3940 // of the restrictions placed on parameters to functions whose body is 4060 // of the restrictions placed on parameters to functions whose body is
3941 // strict. 4061 // strict.
3942 ReportMessageAt(param_location, 4062 ReportMessageAt(param_location,
3943 "duplicate_arrow_function_formal_parameter"); 4063 "duplicate_arrow_function_formal_parameter");
3944 *ok = false; 4064 *ok = false;
3945 return; 4065 return;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
4055 // expressions. This also marks the FunctionState as a generator. 4175 // expressions. This also marks the FunctionState as a generator.
4056 Variable* temp = scope_->DeclarationScope()->NewTemporary( 4176 Variable* temp = scope_->DeclarationScope()->NewTemporary(
4057 ast_value_factory()->dot_generator_object_string()); 4177 ast_value_factory()->dot_generator_object_string());
4058 function_state.set_generator_object_variable(temp); 4178 function_state.set_generator_object_variable(temp);
4059 } 4179 }
4060 4180
4061 bool has_rest = false; 4181 bool has_rest = false;
4062 Expect(Token::LPAREN, CHECK_OK); 4182 Expect(Token::LPAREN, CHECK_OK);
4063 int start_position = scanner()->location().beg_pos; 4183 int start_position = scanner()->location().beg_pos;
4064 scope_->set_start_position(start_position); 4184 scope_->set_start_position(start_position);
4185 ZoneList<Expression*>* initializers =
4186 new (zone()) ZoneList<Expression*>(0, zone());
4187 bool has_initializers = false;
4065 num_parameters = 4188 num_parameters =
4066 ParseFormalParameterList(scope, &error_locs, &has_rest, CHECK_OK); 4189 ParseFormalParameterList(scope, &error_locs, initializers,
4190 &has_initializers, &has_rest, CHECK_OK);
4067 Expect(Token::RPAREN, CHECK_OK); 4191 Expect(Token::RPAREN, CHECK_OK);
4068 int formals_end_position = scanner()->location().end_pos; 4192 int formals_end_position = scanner()->location().end_pos;
4069 4193
4070 CheckArityRestrictions(num_parameters, arity_restriction, start_position, 4194 CheckArityRestrictions(num_parameters, arity_restriction, start_position,
4071 formals_end_position, CHECK_OK); 4195 formals_end_position, CHECK_OK);
4072 4196
4073 Expect(Token::LBRACE, CHECK_OK); 4197 Expect(Token::LBRACE, CHECK_OK);
4074 4198
4075 // If we have a named function expression, we add a local variable 4199 // If we have a named function expression, we add a local variable
4076 // declaration to the body of the function with the name of the 4200 // declaration to the body of the function with the name of the
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
4157 is_lazily_parsed = false; 4281 is_lazily_parsed = false;
4158 4282
4159 // This is probably an initialization function. Inform the compiler it 4283 // This is probably an initialization function. Inform the compiler it
4160 // should also eager-compile this function, and that we expect it to be 4284 // should also eager-compile this function, and that we expect it to be
4161 // used once. 4285 // used once.
4162 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; 4286 eager_compile_hint = FunctionLiteral::kShouldEagerCompile;
4163 should_be_used_once_hint = true; 4287 should_be_used_once_hint = true;
4164 } 4288 }
4165 } 4289 }
4166 if (!is_lazily_parsed) { 4290 if (!is_lazily_parsed) {
4167 body = ParseEagerFunctionBody(function_name, pos, fvar, fvar_init_op, 4291 body = DesugarInitializeParameters(scope, has_initializers, initializers);
4168 kind, CHECK_OK); 4292 if (has_initializers) {
4293 // TODO(caitp): Function body scope must be a declaration scope
4294 Scope* function_body_scope = NewScope(scope, BLOCK_SCOPE);
4295 function_body_scope->set_start_position(scope->start_position());
4296 function_body_scope->SetScopeName(function_name);
4297 BlockState function_body_state(&scope_, function_body_scope);
4298 ZoneList<Statement*>* inner_body = ParseEagerFunctionBody(
4299 function_name, pos, fvar, fvar_init_op, kind, CHECK_OK);
4300 scope->set_end_position(function_body_scope->end_position());
4301 body->AddAll(*inner_body, zone());
rossberg 2015/05/12 14:04:53 Shouldn't this create a block statement instead?
caitp (gmail) 2015/05/12 14:34:17 Is this for the extra bailout id? I have mostly be
rossberg 2015/05/20 07:41:47 The scope chain needs to be in sync with the conte
4302 } else {
4303 body = ParseEagerFunctionBody(function_name, pos, fvar, fvar_init_op,
4304 kind, CHECK_OK);
4305 }
4169 materialized_literal_count = function_state.materialized_literal_count(); 4306 materialized_literal_count = function_state.materialized_literal_count();
4170 expected_property_count = function_state.expected_property_count(); 4307 expected_property_count = function_state.expected_property_count();
4171 handler_count = function_state.handler_count(); 4308 handler_count = function_state.handler_count();
4172 4309
4173 if (is_strong(language_mode()) && IsSubclassConstructor(kind)) { 4310 if (is_strong(language_mode()) && IsSubclassConstructor(kind)) {
4174 if (!function_state.super_location().IsValid()) { 4311 if (!function_state.super_location().IsValid()) {
4175 ReportMessageAt(function_name_location, 4312 ReportMessageAt(function_name_location,
4176 "strong_super_call_missing", kReferenceError); 4313 "strong_super_call_missing", kReferenceError);
4177 *ok = false; 4314 *ok = false;
4178 return nullptr; 4315 return nullptr;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
4409 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy()); 4546 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy());
4410 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode()); 4547 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode());
4411 reusable_preparser_->set_allow_harmony_computed_property_names( 4548 reusable_preparser_->set_allow_harmony_computed_property_names(
4412 allow_harmony_computed_property_names()); 4549 allow_harmony_computed_property_names());
4413 reusable_preparser_->set_allow_harmony_rest_params( 4550 reusable_preparser_->set_allow_harmony_rest_params(
4414 allow_harmony_rest_params()); 4551 allow_harmony_rest_params());
4415 reusable_preparser_->set_allow_harmony_spreadcalls( 4552 reusable_preparser_->set_allow_harmony_spreadcalls(
4416 allow_harmony_spreadcalls()); 4553 allow_harmony_spreadcalls());
4417 reusable_preparser_->set_allow_harmony_destructuring( 4554 reusable_preparser_->set_allow_harmony_destructuring(
4418 allow_harmony_destructuring()); 4555 allow_harmony_destructuring());
4556 reusable_preparser_->set_allow_harmony_optional_params(
4557 allow_harmony_optional_params());
4419 reusable_preparser_->set_allow_strong_mode(allow_strong_mode()); 4558 reusable_preparser_->set_allow_strong_mode(allow_strong_mode());
4420 } 4559 }
4421 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4560 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4422 language_mode(), function_state_->kind(), logger, bookmark); 4561 language_mode(), function_state_->kind(), logger, bookmark);
4423 if (pre_parse_timer_ != NULL) { 4562 if (pre_parse_timer_ != NULL) {
4424 pre_parse_timer_->Stop(); 4563 pre_parse_timer_->Stop();
4425 } 4564 }
4426 return result; 4565 return result;
4427 } 4566 }
4428 4567
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
5920 6059
5921 Expression* Parser::SpreadCallNew(Expression* function, 6060 Expression* Parser::SpreadCallNew(Expression* function,
5922 ZoneList<v8::internal::Expression*>* args, 6061 ZoneList<v8::internal::Expression*>* args,
5923 int pos) { 6062 int pos) {
5924 args->InsertAt(0, function, zone()); 6063 args->InsertAt(0, function, zone());
5925 6064
5926 return factory()->NewCallRuntime( 6065 return factory()->NewCallRuntime(
5927 ast_value_factory()->reflect_construct_string(), NULL, args, pos); 6066 ast_value_factory()->reflect_construct_string(), NULL, args, pos);
5928 } 6067 }
5929 } } // namespace v8::internal 6068 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698