| 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/rewriter.h" | 5 #include "src/parsing/rewriter.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/parsing/parser.h" | 9 #include "src/parsing/parser.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 factory_(ast_value_factory) { | 24 factory_(ast_value_factory) { |
| 25 InitializeAstVisitor(isolate); | 25 InitializeAstVisitor(isolate); |
| 26 } | 26 } |
| 27 | 27 |
| 28 Processor(Parser* parser, Scope* scope, Variable* result, | 28 Processor(Parser* parser, Scope* scope, Variable* result, |
| 29 AstValueFactory* ast_value_factory) | 29 AstValueFactory* ast_value_factory) |
| 30 : result_(result), | 30 : result_(result), |
| 31 result_assigned_(false), | 31 result_assigned_(false), |
| 32 replacement_(nullptr), | 32 replacement_(nullptr), |
| 33 is_set_(false), | 33 is_set_(false), |
| 34 zone_(ast_value_factory->zone()), |
| 34 scope_(scope), | 35 scope_(scope), |
| 35 factory_(ast_value_factory) { | 36 factory_(ast_value_factory) { |
| 36 InitializeAstVisitor(parser->stack_limit()); | 37 InitializeAstVisitor(parser->stack_limit()); |
| 37 } | 38 } |
| 38 | 39 |
| 39 ~Processor() override {} | 40 ~Processor() override {} |
| 40 | 41 |
| 41 void Process(ZoneList<Statement*>* statements); | 42 void Process(ZoneList<Statement*>* statements); |
| 42 bool result_assigned() const { return result_assigned_; } | 43 bool result_assigned() const { return result_assigned_; } |
| 43 | 44 |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 processor.SetResult(undef), expr->position()); | 396 processor.SetResult(undef), expr->position()); |
| 396 body->Add(completion, factory->zone()); | 397 body->Add(completion, factory->zone()); |
| 397 } | 398 } |
| 398 } | 399 } |
| 399 return true; | 400 return true; |
| 400 } | 401 } |
| 401 | 402 |
| 402 | 403 |
| 403 } // namespace internal | 404 } // namespace internal |
| 404 } // namespace v8 | 405 } // namespace v8 |
| OLD | NEW |