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

Unified Diff: src/code-stubs.cc

Issue 1828253002: [builtins] Provide Math.floor as TurboFan builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Address feedback. Created 4 years, 9 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.cc ('k') | src/compiler/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index a100823eec42b8161743d1bbb32f2b62b1e2a681..847a645587d2c43eea09939a6273aca6217537a2 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -859,8 +859,7 @@ void AddStub::GenerateAssembly(compiler::CodeStubAssembler* assembler) const {
Node* lhs_value = var_fadd_lhs.value();
Node* rhs_value = var_fadd_rhs.value();
Node* value = assembler->Float64Add(lhs_value, rhs_value);
- // TODO(bmeurer): Introduce a ChangeFloat64ToTagged.
- Node* result = assembler->AllocateHeapNumberWithValue(value);
+ Node* result = assembler->ChangeFloat64ToTagged(value);
assembler->Return(result);
}
}
@@ -1027,8 +1026,7 @@ void SubtractStub::GenerateAssembly(
Node* lhs_value = var_fsub_lhs.value();
Node* rhs_value = var_fsub_rhs.value();
Node* value = assembler->Float64Sub(lhs_value, rhs_value);
- // TODO(bmeurer): Introduce a ChangeFloat64ToTagged.
- Node* result = assembler->AllocateHeapNumberWithValue(value);
+ Node* result = assembler->ChangeFloat64ToTagged(value);
assembler->Return(result);
}
}
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698