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

Unified Diff: src/compiler/code-stub-assembler.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 | « src/compiler/code-stub-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-stub-assembler.cc
diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc
index 89a21d7245599417da3315fd2bc97503aea650f3..0d9168c605d43cd8f6baae80691d8ee5bd444484 100644
--- a/src/compiler/code-stub-assembler.cc
+++ b/src/compiler/code-stub-assembler.cc
@@ -438,6 +438,18 @@ Node* CodeStubAssembler::Allocate(int size_in_bytes, AllocationFlags flags) {
limit_address);
}
+Node* CodeStubAssembler::AllocateHeapNumber() {
+ Node* result = Allocate(HeapNumber::kSize, kNone);
+ StoreMapNoWriteBarrier(result, HeapNumberMapConstant());
+ return result;
+}
+
+Node* CodeStubAssembler::AllocateHeapNumberWithValue(Node* value) {
+ Node* result = AllocateHeapNumber();
+ StoreHeapNumberValue(result, value);
+ return result;
+}
+
Node* CodeStubAssembler::Load(MachineType rep, Node* base) {
return raw_assembler_->Load(rep, base);
}
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698