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

Side by Side 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 unified diff | Download patch
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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 args[0] = function; 894 args[0] = function;
895 args[1] = Int32Constant(argc); 895 args[1] = Int32Constant(argc);
896 args[2] = receiver; 896 args[2] = receiver;
897 args[3] = arg1; 897 args[3] = arg1;
898 args[4] = arg2; 898 args[4] = arg2;
899 args[5] = context; 899 args[5] = context;
900 900
901 return CallStubN(callable.descriptor(), argc + 1, target, args, result_size); 901 return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
902 } 902 }
903 903
904 Node* CodeAssembler::CallJS(Callable const& callable, Node* context,
905 Node* function, Node* receiver, Node* arg1,
906 Node* arg2, Node* arg3, size_t result_size) {
907 const int argc = 3;
908 Node* target = HeapConstant(callable.code());
909
910 Node** args = zone()->NewArray<Node*>(argc + 4);
911 args[0] = function;
912 args[1] = Int32Constant(argc);
913 args[2] = receiver;
914 args[3] = arg1;
915 args[4] = arg2;
916 args[5] = arg3;
917 args[6] = context;
918
919 return CallStubN(callable.descriptor(), argc + 1, target, args, result_size);
920 }
921
904 Node* CodeAssembler::CallCFunction2(MachineType return_type, 922 Node* CodeAssembler::CallCFunction2(MachineType return_type,
905 MachineType arg0_type, 923 MachineType arg0_type,
906 MachineType arg1_type, Node* function, 924 MachineType arg1_type, Node* function,
907 Node* arg0, Node* arg1) { 925 Node* arg0, Node* arg1) {
908 return raw_assembler_->CallCFunction2(return_type, arg0_type, arg1_type, 926 return raw_assembler_->CallCFunction2(return_type, arg0_type, arg1_type,
909 function, arg0, arg1); 927 function, arg0, arg1);
910 } 928 }
911 929
912 void CodeAssembler::Goto(CodeAssembler::Label* label) { 930 void CodeAssembler::Goto(CodeAssembler::Label* label) {
913 label->MergeVariables(); 931 label->MergeVariables();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1140 }
1123 } 1141 }
1124 } 1142 }
1125 1143
1126 bound_ = true; 1144 bound_ = true;
1127 } 1145 }
1128 1146
1129 } // namespace compiler 1147 } // namespace compiler
1130 } // namespace internal 1148 } // namespace internal
1131 } // namespace v8 1149 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698