| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast.h" | 8 #include "src/ast.h" |
| 9 #include "src/ast-literal-reindexer.h" | 9 #include "src/ast-literal-reindexer.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 return factory->NewNullLiteral(pos); | 808 return factory->NewNullLiteral(pos); |
| 809 case Token::TRUE_LITERAL: | 809 case Token::TRUE_LITERAL: |
| 810 return factory->NewBooleanLiteral(true, pos); | 810 return factory->NewBooleanLiteral(true, pos); |
| 811 case Token::FALSE_LITERAL: | 811 case Token::FALSE_LITERAL: |
| 812 return factory->NewBooleanLiteral(false, pos); | 812 return factory->NewBooleanLiteral(false, pos); |
| 813 case Token::SMI: { | 813 case Token::SMI: { |
| 814 int value = scanner->smi_value(); | 814 int value = scanner->smi_value(); |
| 815 return factory->NewSmiLiteral(value, pos); | 815 return factory->NewSmiLiteral(value, pos); |
| 816 } | 816 } |
| 817 case Token::NUMBER: { | 817 case Token::NUMBER: { |
| 818 bool has_dot = scanner->ContainsDot(); |
| 818 double value = scanner->DoubleValue(); | 819 double value = scanner->DoubleValue(); |
| 819 return factory->NewNumberLiteral(value, pos); | 820 return factory->NewNumberLiteral(value, pos, has_dot); |
| 820 } | 821 } |
| 821 default: | 822 default: |
| 822 DCHECK(false); | 823 DCHECK(false); |
| 823 } | 824 } |
| 824 return NULL; | 825 return NULL; |
| 825 } | 826 } |
| 826 | 827 |
| 827 | 828 |
| 828 Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name, | 829 Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name, |
| 829 int start_position, | 830 int start_position, |
| (...skipping 5074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5904 Expression* Parser::SpreadCallNew(Expression* function, | 5905 Expression* Parser::SpreadCallNew(Expression* function, |
| 5905 ZoneList<v8::internal::Expression*>* args, | 5906 ZoneList<v8::internal::Expression*>* args, |
| 5906 int pos) { | 5907 int pos) { |
| 5907 args->InsertAt(0, function, zone()); | 5908 args->InsertAt(0, function, zone()); |
| 5908 | 5909 |
| 5909 return factory()->NewCallRuntime( | 5910 return factory()->NewCallRuntime( |
| 5910 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 5911 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 5911 } | 5912 } |
| 5912 } // namespace internal | 5913 } // namespace internal |
| 5913 } // namespace v8 | 5914 } // namespace v8 |
| OLD | NEW |