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_H_ | 5 #ifndef V8_AST_H_ |
6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3408 new (zone_) Literal(zone_, ast_value_factory_->NewSmi(number), pos); | 3408 new (zone_) Literal(zone_, ast_value_factory_->NewSmi(number), pos); |
3409 VISIT_AND_RETURN(Literal, lit) | 3409 VISIT_AND_RETURN(Literal, lit) |
3410 } | 3410 } |
3411 | 3411 |
3412 Literal* NewBooleanLiteral(bool b, int pos) { | 3412 Literal* NewBooleanLiteral(bool b, int pos) { |
3413 Literal* lit = | 3413 Literal* lit = |
3414 new (zone_) Literal(zone_, ast_value_factory_->NewBoolean(b), pos); | 3414 new (zone_) Literal(zone_, ast_value_factory_->NewBoolean(b), pos); |
3415 VISIT_AND_RETURN(Literal, lit) | 3415 VISIT_AND_RETURN(Literal, lit) |
3416 } | 3416 } |
3417 | 3417 |
3418 Literal* NewStringListLiteral(ZoneList<const AstRawString*>* strings, | |
3419 int pos) { | |
3420 Literal* lit = new (zone_) | |
3421 Literal(zone_, ast_value_factory_->NewStringList(strings), pos); | |
3422 VISIT_AND_RETURN(Literal, lit) | |
3423 } | |
3424 | |
3425 Literal* NewNullLiteral(int pos) { | 3418 Literal* NewNullLiteral(int pos) { |
3426 Literal* lit = | 3419 Literal* lit = |
3427 new (zone_) Literal(zone_, ast_value_factory_->NewNull(), pos); | 3420 new (zone_) Literal(zone_, ast_value_factory_->NewNull(), pos); |
3428 VISIT_AND_RETURN(Literal, lit) | 3421 VISIT_AND_RETURN(Literal, lit) |
3429 } | 3422 } |
3430 | 3423 |
3431 Literal* NewUndefinedLiteral(int pos) { | 3424 Literal* NewUndefinedLiteral(int pos) { |
3432 Literal* lit = | 3425 Literal* lit = |
3433 new (zone_) Literal(zone_, ast_value_factory_->NewUndefined(), pos); | 3426 new (zone_) Literal(zone_, ast_value_factory_->NewUndefined(), pos); |
3434 VISIT_AND_RETURN(Literal, lit) | 3427 VISIT_AND_RETURN(Literal, lit) |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 private: | 3643 private: |
3651 Zone* zone_; | 3644 Zone* zone_; |
3652 Visitor visitor_; | 3645 Visitor visitor_; |
3653 AstValueFactory* ast_value_factory_; | 3646 AstValueFactory* ast_value_factory_; |
3654 }; | 3647 }; |
3655 | 3648 |
3656 | 3649 |
3657 } } // namespace v8::internal | 3650 } } // namespace v8::internal |
3658 | 3651 |
3659 #endif // V8_AST_H_ | 3652 #endif // V8_AST_H_ |
OLD | NEW |