| 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/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
| 10 #include "src/compiler/scheduler.h" | 10 #include "src/compiler/scheduler.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); | 177 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); |
| 178 Node* ref = AddNode( | 178 Node* ref = AddNode( |
| 179 common()->ExternalConstant(ExternalReference(function, isolate()))); | 179 common()->ExternalConstant(ExternalReference(function, isolate()))); |
| 180 Node* arity = Int32Constant(2); | 180 Node* arity = Int32Constant(2); |
| 181 | 181 |
| 182 return AddNode(common()->Call(descriptor), centry, arg1, arg2, ref, arity, | 182 return AddNode(common()->Call(descriptor), centry, arg1, arg2, ref, arity, |
| 183 context); | 183 context); |
| 184 } | 184 } |
| 185 | 185 |
| 186 Node* RawMachineAssembler::CallRuntime3(Runtime::FunctionId function, |
| 187 Node* arg1, Node* arg2, Node* arg3, |
| 188 Node* context) { |
| 189 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( |
| 190 zone(), function, 3, Operator::kNoProperties, CallDescriptor::kNoFlags); |
| 191 int return_count = static_cast<int>(descriptor->ReturnCount()); |
| 192 |
| 193 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); |
| 194 Node* ref = AddNode( |
| 195 common()->ExternalConstant(ExternalReference(function, isolate()))); |
| 196 Node* arity = Int32Constant(3); |
| 197 |
| 198 return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, ref, |
| 199 arity, context); |
| 200 } |
| 186 | 201 |
| 187 Node* RawMachineAssembler::CallRuntime4(Runtime::FunctionId function, | 202 Node* RawMachineAssembler::CallRuntime4(Runtime::FunctionId function, |
| 188 Node* arg1, Node* arg2, Node* arg3, | 203 Node* arg1, Node* arg2, Node* arg3, |
| 189 Node* arg4, Node* context) { | 204 Node* arg4, Node* context) { |
| 190 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( | 205 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( |
| 191 zone(), function, 4, Operator::kNoProperties, CallDescriptor::kNoFlags); | 206 zone(), function, 4, Operator::kNoProperties, CallDescriptor::kNoFlags); |
| 192 int return_count = static_cast<int>(descriptor->ReturnCount()); | 207 int return_count = static_cast<int>(descriptor->ReturnCount()); |
| 193 | 208 |
| 194 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); | 209 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); |
| 195 Node* ref = AddNode( | 210 Node* ref = AddNode( |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 390 |
| 376 RawMachineLabel::RawMachineLabel() | 391 RawMachineLabel::RawMachineLabel() |
| 377 : block_(nullptr), used_(false), bound_(false) {} | 392 : block_(nullptr), used_(false), bound_(false) {} |
| 378 | 393 |
| 379 | 394 |
| 380 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 395 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } |
| 381 | 396 |
| 382 } // namespace compiler | 397 } // namespace compiler |
| 383 } // namespace internal | 398 } // namespace internal |
| 384 } // namespace v8 | 399 } // namespace v8 |
| OLD | NEW |