Index: src/compiler/linkage.cc |
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc |
index 3f5182561baab530101cf430e2219994288bff14..3496fa2deb829090c94ac2ee5119c30246595675 100644 |
--- a/src/compiler/linkage.cc |
+++ b/src/compiler/linkage.cc |
@@ -404,6 +404,35 @@ CallDescriptor* Linkage::GetStubCallDescriptor( |
descriptor.DebugName(isolate)); |
} |
+// static |
+CallDescriptor* Linkage::GetAllocateCallDescriptor(Zone* zone) { |
+ LocationSignature::Builder locations(zone, 1, 1); |
+ MachineSignature::Builder types(zone, 1, 1); |
+ |
+ locations.AddParam(regloc(kAllocateSizeRegister)); |
+ types.AddParam(MachineType::Int32()); |
+ |
+ locations.AddReturn(regloc(kReturnRegister0)); |
+ types.AddReturn(MachineType::AnyTagged()); |
+ |
+ // The target for allocate calls is a code object. |
+ MachineType target_type = MachineType::AnyTagged(); |
+ LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); |
+ return new (zone) CallDescriptor( // -- |
+ CallDescriptor::kCallCodeObject, // kind |
+ target_type, // target MachineType |
+ target_loc, // target location |
+ types.Build(), // machine_sig |
+ locations.Build(), // location_sig |
+ 0, // stack_parameter_count |
+ Operator::kNoThrow, // properties |
+ kNoCalleeSaved, // callee-saved registers |
+ kNoCalleeSaved, // callee-saved fp |
+ CallDescriptor::kCanUseRoots, // flags |
+ "Allocate"); |
+} |
+ |
+// static |
CallDescriptor* Linkage::GetBytecodeDispatchCallDescriptor( |
Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, |
int stack_parameter_count) { |