Index: test/unittests/compiler/raw-machine-assembler.cc |
diff --git a/test/unittests/compiler/raw-machine-assembler.cc b/test/unittests/compiler/raw-machine-assembler.cc |
index 20948108aaa4dd17073bd52f4f6a0e5884a7a9a3..5bae30e63e2bd3a16a42d469cc49233e44fd73e8 100644 |
--- a/test/unittests/compiler/raw-machine-assembler.cc |
+++ b/test/unittests/compiler/raw-machine-assembler.cc |
@@ -144,6 +144,52 @@ Node* RawMachineAssembler::CallRuntime1(Runtime::FunctionId function, |
} |
+Node* RawMachineAssembler::CallCFunction0(MachineType return_type, |
+ Node* function) { |
+ MachineSignature::Builder builder(zone(), 1, 0); |
+ builder.AddReturn(return_type); |
+ const CallDescriptor* descriptor = |
+ Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); |
+ |
+ Node* call = graph()->NewNode(common()->Call(descriptor), function); |
+ schedule()->AddNode(CurrentBlock(), call); |
+ return call; |
+} |
+ |
+ |
+Node* RawMachineAssembler::CallCFunction1(MachineType return_type, |
+ MachineType arg0_type, Node* function, |
+ Node* arg0) { |
+ MachineSignature::Builder builder(zone(), 1, 1); |
+ builder.AddReturn(return_type); |
+ builder.AddParam(arg0_type); |
+ const CallDescriptor* descriptor = |
+ Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); |
+ |
+ Node* call = graph()->NewNode(common()->Call(descriptor), function, arg0); |
+ schedule()->AddNode(CurrentBlock(), call); |
+ return call; |
+} |
+ |
+ |
+Node* RawMachineAssembler::CallCFunction2(MachineType return_type, |
+ MachineType arg0_type, |
+ MachineType arg1_type, Node* function, |
+ Node* arg0, Node* arg1) { |
+ MachineSignature::Builder builder(zone(), 1, 2); |
+ builder.AddReturn(return_type); |
+ builder.AddParam(arg0_type); |
+ builder.AddParam(arg1_type); |
+ const CallDescriptor* descriptor = |
+ Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); |
+ |
+ Node* call = |
+ graph()->NewNode(common()->Call(descriptor), function, arg0, arg1); |
+ schedule()->AddNode(CurrentBlock(), call); |
+ return call; |
+} |
+ |
+ |
void RawMachineAssembler::Bind(Label* label) { |
DCHECK(current_block_ == NULL); |
DCHECK(!label->bound_); |