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

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

Issue 2433923003: [regexp] Add fast-path for global, callable replace (Closed)
Patch Set: Re-add asserts and COW array usage 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
Index: src/compiler/code-assembler.cc
diff --git a/src/compiler/code-assembler.cc b/src/compiler/code-assembler.cc
index 26407bd15bfec380a029fa94443d0572cf35adb4..14622ae5a37e73da57e504d7545561a8a666cb03 100644
--- a/src/compiler/code-assembler.cc
+++ b/src/compiler/code-assembler.cc
@@ -901,6 +901,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,

Powered by Google App Engine
This is Rietveld 408576698