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

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

Issue 2433923003: [regexp] Add fast-path for global, callable replace (Closed)
Patch Set: Rebase Created 4 years, 2 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/compiler/code-assembler.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-assembler.cc
diff --git a/src/compiler/code-assembler.cc b/src/compiler/code-assembler.cc
index 5f86a5ef55771e3e0875f4f82fa689e6fe5e1415..f9117557fbaea15ffdfe629b76dfd6d0709b319c 100644
--- a/src/compiler/code-assembler.cc
+++ b/src/compiler/code-assembler.cc
@@ -930,6 +930,24 @@ Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
}
+Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
+ Node* function, Node* receiver, Node* arg1,
+ Node* arg2, Node* arg3, size_t result_size) {
+ const int argc = 3;
+ Node* target = HeapConstant(callable.code());
+
+ Node** args = zone()->NewArray<Node*>(argc + 4);
+ args[0] = function;
+ args[1] = Int32Constant(argc);
+ args[2] = receiver;
+ args[3] = arg1;
+ args[4] = arg2;
+ args[5] = arg3;
+ args[6] = context;
+
+ return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
+}
+
Node* CodeAssembler::CallCFunction2(MachineType return_type,
MachineType arg0_type,
MachineType arg1_type, Node* function,
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698