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

Unified Diff: src/builtins.cc

Issue 1827523005: [turbofan] Reduce boilerplate around HeapNumber allocation in stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 75edac5844d24335921bd0c9c78f0f921e3aab9a..ffad7b26487f1ff4017f697b2c8c0685ff6f4c92 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -2098,11 +2098,7 @@ void Builtins::Generate_MathSqrt(compiler::CodeStubAssembler* assembler) {
{
Node* x = var_fsqrt_x.value();
Node* value = assembler->Float64Sqrt(x);
- Node* result = assembler->Allocate(HeapNumber::kSize,
- compiler::CodeStubAssembler::kNone);
- assembler->StoreMapNoWriteBarrier(result,
- assembler->HeapNumberMapConstant());
- assembler->StoreHeapNumberValue(result, value);
+ Node* result = assembler->AllocateHeapNumberWithValue(value);
assembler->Return(result);
}
}
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698