Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: src/compiler/interpreter-assembler.cc

Issue 1362383002: [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index 1f5c0a26a5c8f16560cb124e384563c800972c92..4b5f392b6b31d0a66a344d3ce06d2de6aeceb63e 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -269,7 +269,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);
@@ -320,6 +320,24 @@ Node* InterpreterAssembler::CallIC(CallInterfaceDescriptor descriptor,
}
+Node* InterpreterAssembler::CallRuntime(Node* function_id, Node* first_arg,
+ Node* arg_count) {
+ Callable builtin = CodeFactory::InterpreterCEntry(isolate());
+ CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
+ isolate(), zone(), builtin.descriptor(), 0, CallDescriptor::kNoFlags);
+
+ Node* code_target = HeapConstant(builtin.code());
+
+ Node** args = zone()->NewArray<Node*>(4);
+ args[0] = arg_count;
+ args[1] = first_arg;
+ args[2] = function_id;
+ 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,

Powered by Google App Engine
This is Rietveld 408576698