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

Unified Diff: src/builtins/builtins-number.cc

Issue 2451973003: [builtins] Don't canonicalize results of Math double operations. (Closed)
Patch Set: Same for the number builtins. Created 4 years, 2 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/builtins/builtins-math.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-number.cc
diff --git a/src/builtins/builtins-number.cc b/src/builtins/builtins-number.cc
index 34c9d0a7f3d5542432810c98ac47ac846350672b..3e2bc556b6896c2d2dca7ab9a97e1e4ad21edbbc 100644
--- a/src/builtins/builtins-number.cc
+++ b/src/builtins/builtins-number.cc
@@ -935,7 +935,7 @@ void Builtins::Generate_Add(CodeStubAssembler* assembler) {
Node* lhs_value = var_fadd_lhs.value();
Node* rhs_value = var_fadd_rhs.value();
Node* value = assembler->Float64Add(lhs_value, rhs_value);
- Node* result = assembler->ChangeFloat64ToTagged(value);
+ Node* result = assembler->AllocateHeapNumberWithValue(value);
var_result.Bind(result);
assembler->Goto(&end);
}
@@ -1114,7 +1114,7 @@ void Builtins::Generate_Subtract(CodeStubAssembler* assembler) {
Node* lhs_value = var_fsub_lhs.value();
Node* rhs_value = var_fsub_rhs.value();
Node* value = assembler->Float64Sub(lhs_value, rhs_value);
- var_result.Bind(assembler->ChangeFloat64ToTagged(value));
+ var_result.Bind(assembler->AllocateHeapNumberWithValue(value));
assembler->Goto(&end);
}
assembler->Bind(&end);
@@ -1266,7 +1266,7 @@ void Builtins::Generate_Multiply(CodeStubAssembler* assembler) {
{
Node* value =
assembler->Float64Mul(var_lhs_float64.value(), var_rhs_float64.value());
- Node* result = assembler->ChangeFloat64ToTagged(value);
+ Node* result = assembler->AllocateHeapNumberWithValue(value);
var_result.Bind(result);
assembler->Goto(&return_result);
}
@@ -1486,7 +1486,7 @@ void Builtins::Generate_Divide(CodeStubAssembler* assembler) {
{
Node* value = assembler->Float64Div(var_dividend_float64.value(),
var_divisor_float64.value());
- var_result.Bind(assembler->ChangeFloat64ToTagged(value));
+ var_result.Bind(assembler->AllocateHeapNumberWithValue(value));
assembler->Goto(&end);
}
assembler->Bind(&end);
@@ -1644,7 +1644,7 @@ void Builtins::Generate_Modulus(CodeStubAssembler* assembler) {
{
Node* value = assembler->Float64Mod(var_dividend_float64.value(),
var_divisor_float64.value());
- var_result.Bind(assembler->ChangeFloat64ToTagged(value));
+ var_result.Bind(assembler->AllocateHeapNumberWithValue(value));
assembler->Goto(&return_result);
}
« no previous file with comments | « src/builtins/builtins-math.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698