| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/raw-machine-assembler.h" | 5 #include "src/compiler/raw-machine-assembler.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler/pipeline.h" | 8 #include "src/compiler/pipeline.h" |
| 9 #include "src/compiler/scheduler.h" | 9 #include "src/compiler/scheduler.h" |
| 10 | 10 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode()); | 194 Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode()); |
| 195 Node* ref = AddNode( | 195 Node* ref = AddNode( |
| 196 common()->ExternalConstant(ExternalReference(function, isolate()))); | 196 common()->ExternalConstant(ExternalReference(function, isolate()))); |
| 197 Node* arity = Int32Constant(2); | 197 Node* arity = Int32Constant(2); |
| 198 | 198 |
| 199 return AddNode(common()->Call(descriptor), centry, arg1, arg2, ref, arity, | 199 return AddNode(common()->Call(descriptor), centry, arg1, arg2, ref, arity, |
| 200 context, graph()->start(), graph()->start()); | 200 context, graph()->start(), graph()->start()); |
| 201 } | 201 } |
| 202 | 202 |
| 203 | 203 |
| 204 Node* RawMachineAssembler::CallRuntime4(Runtime::FunctionId function, |
| 205 Node* arg1, Node* arg2, Node* arg3, |
| 206 Node* arg4, Node* context) { |
| 207 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( |
| 208 zone(), function, 4, Operator::kNoProperties, false); |
| 209 |
| 210 Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode()); |
| 211 Node* ref = AddNode( |
| 212 common()->ExternalConstant(ExternalReference(function, isolate()))); |
| 213 Node* arity = Int32Constant(4); |
| 214 |
| 215 return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, arg4, |
| 216 ref, arity, context, graph()->start(), graph()->start()); |
| 217 } |
| 218 |
| 219 |
| 204 Node* RawMachineAssembler::CallCFunction0(MachineType return_type, | 220 Node* RawMachineAssembler::CallCFunction0(MachineType return_type, |
| 205 Node* function) { | 221 Node* function) { |
| 206 MachineSignature::Builder builder(zone(), 1, 0); | 222 MachineSignature::Builder builder(zone(), 1, 0); |
| 207 builder.AddReturn(return_type); | 223 builder.AddReturn(return_type); |
| 208 const CallDescriptor* descriptor = | 224 const CallDescriptor* descriptor = |
| 209 Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); | 225 Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); |
| 210 | 226 |
| 211 return AddNode(common()->Call(descriptor), function, graph()->start(), | 227 return AddNode(common()->Call(descriptor), function, graph()->start(), |
| 212 graph()->start()); | 228 graph()->start()); |
| 213 } | 229 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, | 331 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, |
| 316 Node** inputs) { | 332 Node** inputs) { |
| 317 // The raw machine assembler nodes do not have effect and control inputs, | 333 // The raw machine assembler nodes do not have effect and control inputs, |
| 318 // so we disable checking input counts here. | 334 // so we disable checking input counts here. |
| 319 return graph()->NewNodeUnchecked(op, input_count, inputs); | 335 return graph()->NewNodeUnchecked(op, input_count, inputs); |
| 320 } | 336 } |
| 321 | 337 |
| 322 } // namespace compiler | 338 } // namespace compiler |
| 323 } // namespace internal | 339 } // namespace internal |
| 324 } // namespace v8 | 340 } // namespace v8 |
| OLD | NEW |