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); |
} |