Index: src/compiler/interpreter-assembler.cc |
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc |
index c73b628bb193e326544e8d4fad5c3b5ce8db968d..ca6c6134ed26f840742982aa633ecfce58befafc 100644 |
--- a/src/compiler/interpreter-assembler.cc |
+++ b/src/compiler/interpreter-assembler.cc |
@@ -299,7 +299,7 @@ Node* InterpreterAssembler::LoadTypeFeedbackVector() { |
Node* InterpreterAssembler::CallJS(Node* function, Node* first_arg, |
Node* arg_count) { |
- Callable builtin = CodeFactory::PushArgsAndCall(isolate()); |
+ Callable builtin = CodeFactory::InterpreterPushArgsAndCall(isolate()); |
CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
isolate(), zone(), builtin.descriptor(), 0, CallDescriptor::kNoFlags); |
@@ -350,6 +350,33 @@ Node* InterpreterAssembler::CallIC(CallInterfaceDescriptor descriptor, |
} |
+Node* InterpreterAssembler::CallRuntime(Node* function_id, Node* first_arg, |
+ Node* arg_count) { |
+ Callable builtin = CodeFactory::InterpreterCEntry(isolate()); |
Michael Starzinger
2015/09/29 08:28:34
nit: This is no longer a "builtin", should we just
rmcilroy
2015/10/01 17:02:44
Done.
|
+ CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
+ isolate(), zone(), builtin.descriptor(), 0, CallDescriptor::kNoFlags); |
+ |
+ Node* code_target = HeapConstant(builtin.code()); |
+ |
+ // Get the function entry from the function id. |
+ Node* function_table = raw_assembler_->ExternalConstant( |
+ ExternalReference::runtime_function_table_address(isolate())); |
+ Node* function_offset = raw_assembler_->Int32Mul( |
+ function_id, Int32Constant(sizeof(Runtime::Function))); |
+ Node* function = IntPtrAdd(function_table, function_offset); |
+ Node* function_entry = raw_assembler_->Load( |
+ kMachPtr, function, Int32Constant(offsetof(Runtime::Function, entry))); |
+ |
+ Node** args = zone()->NewArray<Node*>(4); |
+ args[0] = arg_count; |
+ args[1] = first_arg; |
+ args[2] = function_entry; |
+ args[3] = ContextTaggedPointer(); |
+ |
+ return raw_assembler_->CallN(descriptor, code_target, args); |
+} |
+ |
+ |
Node* InterpreterAssembler::CallRuntime(Runtime::FunctionId function_id, |
Node* arg1) { |
return raw_assembler_->CallRuntime1(function_id, arg1, |