| OLD | NEW |
| 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/ast-literal-reindexer.h" | 9 #include "src/ast-literal-reindexer.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 4425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4436 if (!is_simple_parameter_list) { | 4436 if (!is_simple_parameter_list) { |
| 4437 DCHECK_NOT_NULL(inner_scope); | 4437 DCHECK_NOT_NULL(inner_scope); |
| 4438 DCHECK_EQ(body, inner_block->statements()); | 4438 DCHECK_EQ(body, inner_block->statements()); |
| 4439 scope_->SetLanguageMode(inner_scope->language_mode()); | 4439 scope_->SetLanguageMode(inner_scope->language_mode()); |
| 4440 Block* init_block = | 4440 Block* init_block = |
| 4441 BuildParameterInitializationBlock(formal_parameters, CHECK_OK); | 4441 BuildParameterInitializationBlock(formal_parameters, CHECK_OK); |
| 4442 DCHECK_NOT_NULL(init_block); | 4442 DCHECK_NOT_NULL(init_block); |
| 4443 | 4443 |
| 4444 inner_scope->set_end_position(scanner()->location().end_pos); | 4444 inner_scope->set_end_position(scanner()->location().end_pos); |
| 4445 inner_scope = inner_scope->FinalizeBlockScope(); | 4445 inner_scope = inner_scope->FinalizeBlockScope(); |
| 4446 if (inner_scope != nullptr) { |
| 4447 CheckConflictingVarDeclarations(inner_scope, CHECK_OK); |
| 4448 } |
| 4446 | 4449 |
| 4447 result->Add(init_block, zone()); | 4450 result->Add(init_block, zone()); |
| 4448 result->Add(inner_block, zone()); | 4451 result->Add(inner_block, zone()); |
| 4449 } | 4452 } |
| 4450 | 4453 |
| 4451 return result; | 4454 return result; |
| 4452 } | 4455 } |
| 4453 | 4456 |
| 4454 | 4457 |
| 4455 PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( | 4458 PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5991 Expression* Parser::SpreadCallNew(Expression* function, | 5994 Expression* Parser::SpreadCallNew(Expression* function, |
| 5992 ZoneList<v8::internal::Expression*>* args, | 5995 ZoneList<v8::internal::Expression*>* args, |
| 5993 int pos) { | 5996 int pos) { |
| 5994 args->InsertAt(0, function, zone()); | 5997 args->InsertAt(0, function, zone()); |
| 5995 | 5998 |
| 5996 return factory()->NewCallRuntime( | 5999 return factory()->NewCallRuntime( |
| 5997 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6000 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 5998 } | 6001 } |
| 5999 } // namespace internal | 6002 } // namespace internal |
| 6000 } // namespace v8 | 6003 } // namespace v8 |
| OLD | NEW |