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 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3373 Literal* NewStringLiteral(const AstRawString* string, int pos) { | 3373 Literal* NewStringLiteral(const AstRawString* string, int pos) { |
3374 return new (zone_) | 3374 return new (zone_) |
3375 Literal(zone_, ast_value_factory_->NewString(string), pos); | 3375 Literal(zone_, ast_value_factory_->NewString(string), pos); |
3376 } | 3376 } |
3377 | 3377 |
3378 // A JavaScript symbol (ECMA-262 edition 6). | 3378 // A JavaScript symbol (ECMA-262 edition 6). |
3379 Literal* NewSymbolLiteral(const char* name, int pos) { | 3379 Literal* NewSymbolLiteral(const char* name, int pos) { |
3380 return new (zone_) Literal(zone_, ast_value_factory_->NewSymbol(name), pos); | 3380 return new (zone_) Literal(zone_, ast_value_factory_->NewSymbol(name), pos); |
3381 } | 3381 } |
3382 | 3382 |
3383 Literal* NewNumberLiteral(double number, int pos) { | 3383 Literal* NewNumberLiteral(double number, int pos, bool with_dot = false) { |
3384 return new (zone_) | 3384 return new (zone_) |
3385 Literal(zone_, ast_value_factory_->NewNumber(number), pos); | 3385 Literal(zone_, ast_value_factory_->NewNumber(number, with_dot), pos); |
3386 } | 3386 } |
3387 | 3387 |
3388 Literal* NewSmiLiteral(int number, int pos) { | 3388 Literal* NewSmiLiteral(int number, int pos) { |
3389 return new (zone_) Literal(zone_, ast_value_factory_->NewSmi(number), pos); | 3389 return new (zone_) Literal(zone_, ast_value_factory_->NewSmi(number), pos); |
3390 } | 3390 } |
3391 | 3391 |
3392 Literal* NewBooleanLiteral(bool b, int pos) { | 3392 Literal* NewBooleanLiteral(bool b, int pos) { |
3393 return new (zone_) Literal(zone_, ast_value_factory_->NewBoolean(b), pos); | 3393 return new (zone_) Literal(zone_, ast_value_factory_->NewBoolean(b), pos); |
3394 } | 3394 } |
3395 | 3395 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3606 | 3606 |
3607 private: | 3607 private: |
3608 Zone* zone_; | 3608 Zone* zone_; |
3609 AstValueFactory* ast_value_factory_; | 3609 AstValueFactory* ast_value_factory_; |
3610 }; | 3610 }; |
3611 | 3611 |
3612 | 3612 |
3613 } } // namespace v8::internal | 3613 } } // namespace v8::internal |
3614 | 3614 |
3615 #endif // V8_AST_H_ | 3615 #endif // V8_AST_H_ |
OLD | NEW |