| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |