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/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 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3548 | 3548 |
3549 Expect(Token::RPAREN, CHECK_OK); | 3549 Expect(Token::RPAREN, CHECK_OK); |
3550 | 3550 |
3551 Scope* body_scope = NewScope(scope_, BLOCK_SCOPE); | 3551 Scope* body_scope = NewScope(scope_, BLOCK_SCOPE); |
3552 body_scope->set_start_position(scanner()->location().beg_pos); | 3552 body_scope->set_start_position(scanner()->location().beg_pos); |
3553 | 3553 |
3554 Block* body_block = | 3554 Block* body_block = |
3555 factory()->NewBlock(NULL, 3, false, RelocInfo::kNoPosition); | 3555 factory()->NewBlock(NULL, 3, false, RelocInfo::kNoPosition); |
3556 | 3556 |
3557 { | 3557 { |
| 3558 DontCollectExpressionsInTailPositionScope no_tail_calls( |
| 3559 function_state_); |
3558 BlockState block_state(&scope_, body_scope); | 3560 BlockState block_state(&scope_, body_scope); |
3559 | 3561 |
3560 Statement* body = ParseScopedStatement(NULL, true, CHECK_OK); | 3562 Statement* body = ParseScopedStatement(NULL, true, CHECK_OK); |
3561 | 3563 |
3562 auto each_initialization_block = | 3564 auto each_initialization_block = |
3563 factory()->NewBlock(nullptr, 1, true, RelocInfo::kNoPosition); | 3565 factory()->NewBlock(nullptr, 1, true, RelocInfo::kNoPosition); |
3564 { | 3566 { |
3565 auto descriptor = parsing_result.descriptor; | 3567 auto descriptor = parsing_result.descriptor; |
3566 descriptor.declaration_pos = RelocInfo::kNoPosition; | 3568 descriptor.declaration_pos = RelocInfo::kNoPosition; |
3567 descriptor.initialization_pos = RelocInfo::kNoPosition; | 3569 descriptor.initialization_pos = RelocInfo::kNoPosition; |
(...skipping 3223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6791 try_block, target); | 6793 try_block, target); |
6792 final_loop = target; | 6794 final_loop = target; |
6793 } | 6795 } |
6794 | 6796 |
6795 return final_loop; | 6797 return final_loop; |
6796 } | 6798 } |
6797 | 6799 |
6798 | 6800 |
6799 } // namespace internal | 6801 } // namespace internal |
6800 } // namespace v8 | 6802 } // namespace v8 |
OLD | NEW |