| 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/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 return factory->NewNullLiteral(pos); | 809 return factory->NewNullLiteral(pos); |
| 810 case Token::TRUE_LITERAL: | 810 case Token::TRUE_LITERAL: |
| 811 return factory->NewBooleanLiteral(true, pos); | 811 return factory->NewBooleanLiteral(true, pos); |
| 812 case Token::FALSE_LITERAL: | 812 case Token::FALSE_LITERAL: |
| 813 return factory->NewBooleanLiteral(false, pos); | 813 return factory->NewBooleanLiteral(false, pos); |
| 814 case Token::SMI: { | 814 case Token::SMI: { |
| 815 int value = scanner->smi_value(); | 815 int value = scanner->smi_value(); |
| 816 return factory->NewSmiLiteral(value, pos); | 816 return factory->NewSmiLiteral(value, pos); |
| 817 } | 817 } |
| 818 case Token::NUMBER: { | 818 case Token::NUMBER: { |
| 819 bool has_dot = scanner->ContainsDot(); |
| 819 double value = scanner->DoubleValue(); | 820 double value = scanner->DoubleValue(); |
| 820 return factory->NewNumberLiteral(value, pos); | 821 return factory->NewNumberLiteral(value, pos, has_dot); |
| 821 } | 822 } |
| 822 default: | 823 default: |
| 823 DCHECK(false); | 824 DCHECK(false); |
| 824 } | 825 } |
| 825 return NULL; | 826 return NULL; |
| 826 } | 827 } |
| 827 | 828 |
| 828 | 829 |
| 829 Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name, | 830 Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name, |
| 830 int start_position, | 831 int start_position, |
| (...skipping 5020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5851 Expression* Parser::SpreadCallNew(Expression* function, | 5852 Expression* Parser::SpreadCallNew(Expression* function, |
| 5852 ZoneList<v8::internal::Expression*>* args, | 5853 ZoneList<v8::internal::Expression*>* args, |
| 5853 int pos) { | 5854 int pos) { |
| 5854 args->InsertAt(0, function, zone()); | 5855 args->InsertAt(0, function, zone()); |
| 5855 | 5856 |
| 5856 return factory()->NewCallRuntime( | 5857 return factory()->NewCallRuntime( |
| 5857 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 5858 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 5858 } | 5859 } |
| 5859 } // namespace internal | 5860 } // namespace internal |
| 5860 } // namespace v8 | 5861 } // namespace v8 |
| OLD | NEW |