| 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 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 Assignment* tag_assign = factory()->NewAssignment( | 3003 Assignment* tag_assign = factory()->NewAssignment( |
| 3004 Token::ASSIGN, factory()->NewVariableProxy(tag_variable), tag, | 3004 Token::ASSIGN, factory()->NewVariableProxy(tag_variable), tag, |
| 3005 tag->position()); | 3005 tag->position()); |
| 3006 Statement* tag_statement = | 3006 Statement* tag_statement = |
| 3007 factory()->NewExpressionStatement(tag_assign, RelocInfo::kNoPosition); | 3007 factory()->NewExpressionStatement(tag_assign, RelocInfo::kNoPosition); |
| 3008 switch_block->AddStatement(tag_statement, zone()); | 3008 switch_block->AddStatement(tag_statement, zone()); |
| 3009 | 3009 |
| 3010 Block* cases_block = | 3010 Block* cases_block = |
| 3011 factory()->NewBlock(NULL, 1, true, RelocInfo::kNoPosition); | 3011 factory()->NewBlock(NULL, 1, true, RelocInfo::kNoPosition); |
| 3012 Scope* cases_scope = NewScope(scope_, BLOCK_SCOPE); | 3012 Scope* cases_scope = NewScope(scope_, BLOCK_SCOPE); |
| 3013 cases_scope->SetNonlinear(); |
| 3013 | 3014 |
| 3014 SwitchStatement* switch_statement = | 3015 SwitchStatement* switch_statement = |
| 3015 factory()->NewSwitchStatement(labels, switch_pos); | 3016 factory()->NewSwitchStatement(labels, switch_pos); |
| 3016 | 3017 |
| 3017 cases_scope->set_start_position(scanner()->location().beg_pos); | 3018 cases_scope->set_start_position(scanner()->location().beg_pos); |
| 3018 { | 3019 { |
| 3019 BlockState cases_block_state(&scope_, cases_scope); | 3020 BlockState cases_block_state(&scope_, cases_scope); |
| 3020 Target target(&this->target_stack_, switch_statement); | 3021 Target target(&this->target_stack_, switch_statement); |
| 3021 | 3022 |
| 3022 Expression* tag_read = factory()->NewVariableProxy(tag_variable); | 3023 Expression* tag_read = factory()->NewVariableProxy(tag_variable); |
| (...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6106 | 6107 |
| 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(Context::REFLECT_CONSTRUCT_INDEX, args, pos); | 6113 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); |
| 6113 } | 6114 } |
| 6114 } // namespace internal | 6115 } // namespace internal |
| 6115 } // namespace v8 | 6116 } // namespace v8 |
| OLD | NEW |