Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 2c4445f59ddf22316137d67c95693bdd3bb1e411..48282ade7763ae63949ab9fef29a39814db53d80 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -462,6 +462,31 @@ Handle<Code> TurboFanCodeStub::GenerateCode() { |
return assembler.GenerateCode(); |
} |
+void AllocateHeapNumberStub::GenerateAssembly( |
+ compiler::CodeStubAssembler* assembler) const { |
+ compiler::Node* result = assembler->Allocate( |
+ HeapNumber::kSize, compiler::CodeStubAssembler::kNone); |
+ compiler::Node* map_offset = |
+ assembler->IntPtrConstant(HeapObject::kMapOffset - kHeapObjectTag); |
+ compiler::Node* map = assembler->IntPtrAdd(result, map_offset); |
+ assembler->StoreNoWriteBarrier( |
+ MachineRepresentation::kTagged, map, |
+ assembler->HeapConstant(isolate()->factory()->heap_number_map())); |
+ assembler->Return(result); |
+} |
+ |
+void AllocateMutableHeapNumberStub::GenerateAssembly( |
+ compiler::CodeStubAssembler* assembler) const { |
+ compiler::Node* result = assembler->Allocate( |
+ HeapNumber::kSize, compiler::CodeStubAssembler::kNone); |
+ compiler::Node* map_offset = |
+ assembler->IntPtrConstant(HeapObject::kMapOffset - kHeapObjectTag); |
+ compiler::Node* map = assembler->IntPtrAdd(result, map_offset); |
+ assembler->StoreNoWriteBarrier( |
+ MachineRepresentation::kTagged, map, |
+ assembler->HeapConstant(isolate()->factory()->mutable_heap_number_map())); |
+ assembler->Return(result); |
+} |
void StringLengthStub::GenerateAssembly( |
compiler::CodeStubAssembler* assembler) const { |