| Index: src/compiler/code-assembler.h
|
| diff --git a/src/compiler/code-assembler.h b/src/compiler/code-assembler.h
|
| index 98192330b62f238cfb9a1692d37204f1fee69bc6..63cb6b22fd8fd5de2717c476b378e51935280220 100644
|
| --- a/src/compiler/code-assembler.h
|
| +++ b/src/compiler/code-assembler.h
|
| @@ -350,6 +350,18 @@ class V8_EXPORT_PRIVATE CodeAssembler {
|
| return CallStub(callable, context, function, arity, receiver, args...);
|
| }
|
|
|
| + template <class... TArgs>
|
| + Node* ConstructJS(Callable const& callable, Node* context, Node* new_target,
|
| + TArgs... args) {
|
| + int argc = static_cast<int>(sizeof...(args));
|
| + Node* arity = Int32Constant(argc);
|
| + Node* receiver = LoadRoot(Heap::kUndefinedValueRootIndex);
|
| +
|
| + // Construct(target, new_target, arity, receiver, arguments...)
|
| + return CallStub(callable, context, new_target, new_target, arity, receiver,
|
| + args...);
|
| + }
|
| +
|
| // Call to a C function with two arguments.
|
| Node* CallCFunction2(MachineType return_type, MachineType arg0_type,
|
| MachineType arg1_type, Node* function, Node* arg0,
|
| @@ -462,6 +474,7 @@ class V8_EXPORT_PRIVATE CodeAssemblerState {
|
| ~CodeAssemblerState();
|
|
|
| const char* name() const { return name_; }
|
| + int parameter_count() const;
|
|
|
| private:
|
| friend class CodeAssembler;
|
|
|