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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 args[0] = function; 923 args[0] = function;
924 args[1] = Int32Constant(argc); 924 args[1] = Int32Constant(argc);
925 args[2] = receiver; 925 args[2] = receiver;
926 args[3] = arg1; 926 args[3] = arg1;
927 args[4] = arg2; 927 args[4] = arg2;
928 args[5] = context; 928 args[5] = context;
929 929
930 return CallStubN(callable.descriptor(), argc + 1, target, args, result_size); 930 return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
931 } 931 }
932 932
933 Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
934 Node* function, Node* receiver, Node* arg1,
935 Node* arg2, Node* arg3, size_t result_size) {
936 const int argc = 3;
937 Node* target = HeapConstant(callable.code());
938
939 Node** args = zone()->NewArray<Node*>(argc + 4);
940 args[0] = function;
941 args[1] = Int32Constant(argc);
942 args[2] = receiver;
943 args[3] = arg1;
944 args[4] = arg2;
945 args[5] = arg3;
946 args[6] = context;
947
948 return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
949 }
950
933 Node* CodeAssembler::CallCFunction2(MachineType return_type, 951 Node* CodeAssembler::CallCFunction2(MachineType return_type,
934 MachineType arg0_type, 952 MachineType arg0_type,
935 MachineType arg1_type, Node* function, 953 MachineType arg1_type, Node* function,
936 Node* arg0, Node* arg1) { 954 Node* arg0, Node* arg1) {
937 return raw_assembler_->CallCFunction2(return_type, arg0_type, arg1_type, 955 return raw_assembler_->CallCFunction2(return_type, arg0_type, arg1_type,
938 function, arg0, arg1); 956 function, arg0, arg1);
939 } 957 }
940 958
941 void CodeAssembler::Goto(CodeAssembler::Label* label) { 959 void CodeAssembler::Goto(CodeAssembler::Label* label) {
942 label->MergeVariables(); 960 label->MergeVariables();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 } 1169 }
1152 } 1170 }
1153 } 1171 }
1154 1172
1155 bound_ = true; 1173 bound_ = true;
1156 } 1174 }
1157 1175
1158 } // namespace compiler 1176 } // namespace compiler
1159 } // namespace internal 1177 } // namespace internal
1160 } // namespace v8 1178 } // namespace v8
OLDNEW
« 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