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 #ifndef V8_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
(...skipping 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3448 DebuggerStatement* NewDebuggerStatement(int pos) { | 3448 DebuggerStatement* NewDebuggerStatement(int pos) { |
3449 return new (local_zone_) DebuggerStatement(local_zone_, pos); | 3449 return new (local_zone_) DebuggerStatement(local_zone_, pos); |
3450 } | 3450 } |
3451 | 3451 |
3452 EmptyStatement* NewEmptyStatement(int pos) { | 3452 EmptyStatement* NewEmptyStatement(int pos) { |
3453 return new (local_zone_) EmptyStatement(local_zone_, pos); | 3453 return new (local_zone_) EmptyStatement(local_zone_, pos); |
3454 } | 3454 } |
3455 | 3455 |
3456 SloppyBlockFunctionStatement* NewSloppyBlockFunctionStatement( | 3456 SloppyBlockFunctionStatement* NewSloppyBlockFunctionStatement( |
3457 Statement* statement, Scope* scope) { | 3457 Statement* statement, Scope* scope) { |
3458 return new (local_zone_) | 3458 return new (parser_zone_) |
3459 SloppyBlockFunctionStatement(local_zone_, statement, scope); | 3459 SloppyBlockFunctionStatement(parser_zone_, statement, scope); |
3460 } | 3460 } |
3461 | 3461 |
3462 CaseClause* NewCaseClause( | 3462 CaseClause* NewCaseClause( |
3463 Expression* label, ZoneList<Statement*>* statements, int pos) { | 3463 Expression* label, ZoneList<Statement*>* statements, int pos) { |
3464 return new (local_zone_) CaseClause(local_zone_, label, statements, pos); | 3464 return new (local_zone_) CaseClause(local_zone_, label, statements, pos); |
3465 } | 3465 } |
3466 | 3466 |
3467 Literal* NewStringLiteral(const AstRawString* string, int pos) { | 3467 Literal* NewStringLiteral(const AstRawString* string, int pos) { |
3468 return new (local_zone_) | 3468 return new (local_zone_) |
3469 Literal(local_zone_, ast_value_factory_->NewString(string), pos); | 3469 Literal(local_zone_, ast_value_factory_->NewString(string), pos); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3769 // the parser-level zone. | 3769 // the parser-level zone. |
3770 Zone* parser_zone_; | 3770 Zone* parser_zone_; |
3771 AstValueFactory* ast_value_factory_; | 3771 AstValueFactory* ast_value_factory_; |
3772 }; | 3772 }; |
3773 | 3773 |
3774 | 3774 |
3775 } // namespace internal | 3775 } // namespace internal |
3776 } // namespace v8 | 3776 } // namespace v8 |
3777 | 3777 |
3778 #endif // V8_AST_AST_H_ | 3778 #endif // V8_AST_AST_H_ |
OLD | NEW |