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

Unified Diff: src/factory.cc

Issue 838263006: [turbofan] Make Factory::NewNumber() always return the minus_zero_value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | test/unittests/factory-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 96883052dad1a9105cd23dd0e641952821fbc730..320e14ff07bcb0d8ca96caaad01bc48165c31ab4 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1018,7 +1018,7 @@ Handle<Object> Factory::NewNumber(double value,
// We need to distinguish the minus zero value and this cannot be
// done after conversion to int. Doing this by comparing bit
// patterns is faster than using fpclassify() et al.
- if (IsMinusZero(value)) return NewHeapNumber(-0.0, IMMUTABLE, pretenure);
+ if (IsMinusZero(value)) return minus_zero_value();
int int_value = FastD2IChecked(value);
if (value == int_value && Smi::IsValid(int_value)) {
« no previous file with comments | « no previous file | test/unittests/factory-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698