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/ast/ast-types.h" | 8 #include "src/ast/ast-types.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 3259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3270 // A JavaScript symbol (ECMA-262 edition 6). | 3270 // A JavaScript symbol (ECMA-262 edition 6). |
3271 Literal* NewSymbolLiteral(const char* name, int pos) { | 3271 Literal* NewSymbolLiteral(const char* name, int pos) { |
3272 return new (zone_) Literal(ast_value_factory_->NewSymbol(name), pos); | 3272 return new (zone_) Literal(ast_value_factory_->NewSymbol(name), pos); |
3273 } | 3273 } |
3274 | 3274 |
3275 Literal* NewNumberLiteral(double number, int pos, bool with_dot = false) { | 3275 Literal* NewNumberLiteral(double number, int pos, bool with_dot = false) { |
3276 return new (zone_) | 3276 return new (zone_) |
3277 Literal(ast_value_factory_->NewNumber(number, with_dot), pos); | 3277 Literal(ast_value_factory_->NewNumber(number, with_dot), pos); |
3278 } | 3278 } |
3279 | 3279 |
3280 Literal* NewSmiLiteral(int number, int pos) { | 3280 Literal* NewSmiLiteral(uint32_t number, int pos) { |
3281 return new (zone_) Literal(ast_value_factory_->NewSmi(number), pos); | 3281 return new (zone_) Literal(ast_value_factory_->NewSmi(number), pos); |
3282 } | 3282 } |
3283 | 3283 |
3284 Literal* NewBooleanLiteral(bool b, int pos) { | 3284 Literal* NewBooleanLiteral(bool b, int pos) { |
3285 return new (zone_) Literal(ast_value_factory_->NewBoolean(b), pos); | 3285 return new (zone_) Literal(ast_value_factory_->NewBoolean(b), pos); |
3286 } | 3286 } |
3287 | 3287 |
3288 Literal* NewNullLiteral(int pos) { | 3288 Literal* NewNullLiteral(int pos) { |
3289 return new (zone_) Literal(ast_value_factory_->NewNull(), pos); | 3289 return new (zone_) Literal(ast_value_factory_->NewNull(), pos); |
3290 } | 3290 } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3596 : NULL; \ | 3596 : NULL; \ |
3597 } | 3597 } |
3598 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3598 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
3599 #undef DECLARE_NODE_FUNCTIONS | 3599 #undef DECLARE_NODE_FUNCTIONS |
3600 | 3600 |
3601 | 3601 |
3602 } // namespace internal | 3602 } // namespace internal |
3603 } // namespace v8 | 3603 } // namespace v8 |
3604 | 3604 |
3605 #endif // V8_AST_AST_H_ | 3605 #endif // V8_AST_AST_H_ |
OLD | NEW |