Index: src/compiler/interpreter-assembler.cc |
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc |
index 8794bfb52a42255943a90722b505bdd018007c9e..0c086c5c6e9282ecfd2b24c330131ad3a1f0ccd7 100644 |
--- a/src/compiler/interpreter-assembler.cc |
+++ b/src/compiler/interpreter-assembler.cc |
@@ -311,6 +311,26 @@ Node* InterpreterAssembler::LoadTypeFeedbackVector() { |
} |
+Node* InterpreterAssembler::CallConstruct(Node* original_constructor, |
+ Node* constructor, Node* first_arg, |
+ Node* arg_count) { |
+ Callable callable = CodeFactory::InterpreterPushArgsAndConstruct(isolate()); |
+ CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
+ isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags); |
+ |
+ Node* code_target = HeapConstant(callable.code()); |
+ |
+ Node** args = zone()->NewArray<Node*>(5); |
+ args[0] = arg_count; |
+ args[1] = original_constructor; |
+ args[2] = constructor; |
+ args[3] = first_arg; |
+ args[4] = ContextTaggedPointer(); |
+ |
+ return CallN(descriptor, code_target, args); |
+} |
+ |
+ |
Node* InterpreterAssembler::CallN(CallDescriptor* descriptor, Node* code_target, |
Node** args) { |
Node* stack_pointer_before_call = nullptr; |