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

Unified Diff: src/compiler/code-assembler.h

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: Make gcmole happy Created 3 years, 12 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
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/compiler/code-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-assembler.h
diff --git a/src/compiler/code-assembler.h b/src/compiler/code-assembler.h
index 25ec83c23d1c583bc0341035e7d58097eb5aa084..25b1fab4a736a55f55d97ca1b3fe4df9b2de576b 100644
--- a/src/compiler/code-assembler.h
+++ b/src/compiler/code-assembler.h
@@ -352,6 +352,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,
@@ -469,6 +481,7 @@ class V8_EXPORT_PRIVATE CodeAssemblerState {
~CodeAssemblerState();
const char* name() const { return name_; }
+ int parameter_count() const;
private:
friend class CodeAssembler;
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698