Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: src/ast-value-factory.cc

Issue 1201783003: Allow numeric literals to be checked for a decimal point. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast-value-factory.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-value-factory.cc
diff --git a/src/ast-value-factory.cc b/src/ast-value-factory.cc
index a819483eccbc417ea76e5e687dc59a3f304461d9..68cf015200365c988adfcfd55bc73cbcaff49c7e 100644
--- a/src/ast-value-factory.cc
+++ b/src/ast-value-factory.cc
@@ -140,6 +140,7 @@ bool AstValue::BooleanValue() const {
case SYMBOL:
UNREACHABLE();
break;
+ case NUMBER_WITH_DOT:
case NUMBER:
return DoubleToBoolean(number_);
case SMI:
@@ -175,6 +176,7 @@ void AstValue::Internalize(Isolate* isolate) {
value_ = isolate->factory()->home_object_symbol();
}
break;
+ case NUMBER_WITH_DOT:
case NUMBER:
value_ = isolate->factory()->NewNumber(number_, TENURED);
break;
@@ -290,8 +292,8 @@ const AstValue* AstValueFactory::NewSymbol(const char* name) {
}
-const AstValue* AstValueFactory::NewNumber(double number) {
- AstValue* value = new (zone_) AstValue(number);
+const AstValue* AstValueFactory::NewNumber(double number, bool with_dot) {
+ AstValue* value = new (zone_) AstValue(number, with_dot);
if (isolate_) {
value->Internalize(isolate_);
}
« no previous file with comments | « src/ast-value-factory.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698