| 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/parser.h" | 5 #include "src/parser.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 2984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2995 Assignment* tag_assign = factory()->NewAssignment( | 2995 Assignment* tag_assign = factory()->NewAssignment( |
| 2996 Token::ASSIGN, factory()->NewVariableProxy(tag_variable), tag, | 2996 Token::ASSIGN, factory()->NewVariableProxy(tag_variable), tag, |
| 2997 tag->position()); | 2997 tag->position()); |
| 2998 Statement* tag_statement = | 2998 Statement* tag_statement = |
| 2999 factory()->NewExpressionStatement(tag_assign, RelocInfo::kNoPosition); | 2999 factory()->NewExpressionStatement(tag_assign, RelocInfo::kNoPosition); |
| 3000 switch_block->AddStatement(tag_statement, zone()); | 3000 switch_block->AddStatement(tag_statement, zone()); |
| 3001 | 3001 |
| 3002 Block* cases_block = | 3002 Block* cases_block = |
| 3003 factory()->NewBlock(NULL, 1, true, RelocInfo::kNoPosition); | 3003 factory()->NewBlock(NULL, 1, true, RelocInfo::kNoPosition); |
| 3004 Scope* cases_scope = NewScope(scope_, BLOCK_SCOPE); | 3004 Scope* cases_scope = NewScope(scope_, BLOCK_SCOPE); |
| 3005 cases_scope->SetNonlinear(); |
| 3005 | 3006 |
| 3006 SwitchStatement* switch_statement = | 3007 SwitchStatement* switch_statement = |
| 3007 factory()->NewSwitchStatement(labels, switch_pos); | 3008 factory()->NewSwitchStatement(labels, switch_pos); |
| 3008 | 3009 |
| 3009 cases_scope->set_start_position(scanner()->location().beg_pos); | 3010 cases_scope->set_start_position(scanner()->location().beg_pos); |
| 3010 { | 3011 { |
| 3011 BlockState cases_block_state(&scope_, cases_scope); | 3012 BlockState cases_block_state(&scope_, cases_scope); |
| 3012 Target target(&this->target_stack_, switch_statement); | 3013 Target target(&this->target_stack_, switch_statement); |
| 3013 | 3014 |
| 3014 Expression* tag_read = factory()->NewVariableProxy(tag_variable); | 3015 Expression* tag_read = factory()->NewVariableProxy(tag_variable); |
| (...skipping 3092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6107 Expression* Parser::SpreadCallNew(Expression* function, | 6108 Expression* Parser::SpreadCallNew(Expression* function, |
| 6108 ZoneList<v8::internal::Expression*>* args, | 6109 ZoneList<v8::internal::Expression*>* args, |
| 6109 int pos) { | 6110 int pos) { |
| 6110 args->InsertAt(0, function, zone()); | 6111 args->InsertAt(0, function, zone()); |
| 6111 | 6112 |
| 6112 return factory()->NewCallRuntime( | 6113 return factory()->NewCallRuntime( |
| 6113 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6114 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 6114 } | 6115 } |
| 6115 } // namespace internal | 6116 } // namespace internal |
| 6116 } // namespace v8 | 6117 } // namespace v8 |
| OLD | NEW |