| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/ast/ast-expression-rewriter.h" | 10 #include "src/ast/ast-expression-rewriter.h" |
| (...skipping 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3600 // especially in trivial cases | 3600 // especially in trivial cases |
| 3601 Assignment* function_assignment = factory()->NewAssignment( | 3601 Assignment* function_assignment = factory()->NewAssignment( |
| 3602 Token::INIT, factory()->NewVariableProxy(function_var), function_value, | 3602 Token::INIT, factory()->NewVariableProxy(function_var), function_value, |
| 3603 kNoSourcePosition); | 3603 kNoSourcePosition); |
| 3604 do_block->statements()->Add(factory()->NewExpressionStatement( | 3604 do_block->statements()->Add(factory()->NewExpressionStatement( |
| 3605 function_assignment, kNoSourcePosition), | 3605 function_assignment, kNoSourcePosition), |
| 3606 zone()); | 3606 zone()); |
| 3607 } | 3607 } |
| 3608 do_block->set_scope(scope()->FinalizeBlockScope()); | 3608 do_block->set_scope(scope()->FinalizeBlockScope()); |
| 3609 do_expr->set_represented_function(class_info->constructor); | 3609 do_expr->set_represented_function(class_info->constructor); |
| 3610 AddFunctionForNameInference(class_info->constructor); |
| 3610 | 3611 |
| 3611 return do_expr; | 3612 return do_expr; |
| 3612 } | 3613 } |
| 3613 | 3614 |
| 3614 Literal* Parser::GetLiteralUndefined(int position) { | 3615 Literal* Parser::GetLiteralUndefined(int position) { |
| 3615 return factory()->NewUndefinedLiteral(position); | 3616 return factory()->NewUndefinedLiteral(position); |
| 3616 } | 3617 } |
| 3617 | 3618 |
| 3618 | 3619 |
| 3619 void Parser::CheckConflictingVarDeclarations(Scope* scope, bool* ok) { | 3620 void Parser::CheckConflictingVarDeclarations(Scope* scope, bool* ok) { |
| (...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5406 | 5407 |
| 5407 return final_loop; | 5408 return final_loop; |
| 5408 } | 5409 } |
| 5409 | 5410 |
| 5410 #undef CHECK_OK | 5411 #undef CHECK_OK |
| 5411 #undef CHECK_OK_VOID | 5412 #undef CHECK_OK_VOID |
| 5412 #undef CHECK_FAILED | 5413 #undef CHECK_FAILED |
| 5413 | 5414 |
| 5414 } // namespace internal | 5415 } // namespace internal |
| 5415 } // namespace v8 | 5416 } // namespace v8 |
| OLD | NEW |