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

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

Issue 2248693005: [Parser] Track ContainsDot for SMI values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
Index: src/ast/ast-value-factory.cc
diff --git a/src/ast/ast-value-factory.cc b/src/ast/ast-value-factory.cc
index a18f6141cf78079595527d1dfd9c402612571acb..a2717518395623b08591b835d798d7238556dea7 100644
--- a/src/ast/ast-value-factory.cc
+++ b/src/ast/ast-value-factory.cc
@@ -156,6 +156,7 @@ bool AstValue::BooleanValue() const {
case NUMBER_WITH_DOT:
case NUMBER:
return DoubleToBoolean(number_);
+ case SMI_WITH_DOT:
case SMI:
return smi_ != 0;
case BOOLEAN:
@@ -195,6 +196,7 @@ void AstValue::Internalize(Isolate* isolate) {
case NUMBER:
value_ = isolate->factory()->NewNumber(number_, TENURED);
break;
+ case SMI_WITH_DOT:
case SMI:
value_ = handle(Smi::FromInt(smi_), isolate);
break;
« no previous file with comments | « src/ast/ast-value-factory.h ('k') | test/cctest/interpreter/bytecode_expectations/PrimitiveReturnStatements.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698