| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "src/assembler.h" | |
| 6 #include "src/code-stubs.h" | |
| 7 #include "src/compiler/linkage.h" | |
| 8 #include "src/compiler/linkage-impl.h" | |
| 9 #include "src/zone.h" | |
| 10 | |
| 11 namespace v8 { | |
| 12 namespace internal { | |
| 13 namespace compiler { | |
| 14 | |
| 15 struct ArmLinkageHelperTraits { | |
| 16 static Register ReturnValueReg() { return r0; } | |
| 17 static Register ReturnValue2Reg() { return r1; } | |
| 18 static Register JSCallFunctionReg() { return r1; } | |
| 19 static Register ContextReg() { return cp; } | |
| 20 static Register InterpreterBytecodeOffsetReg() { | |
| 21 return kInterpreterBytecodeOffsetRegister; | |
| 22 } | |
| 23 static Register InterpreterBytecodeArrayReg() { | |
| 24 return kInterpreterBytecodeArrayRegister; | |
| 25 } | |
| 26 static Register InterpreterDispatchTableReg() { | |
| 27 return kInterpreterDispatchTableRegister; | |
| 28 } | |
| 29 static Register RuntimeCallFunctionReg() { return r1; } | |
| 30 static Register RuntimeCallArgCountReg() { return r0; } | |
| 31 }; | |
| 32 | |
| 33 | |
| 34 typedef LinkageHelper<ArmLinkageHelperTraits> LH; | |
| 35 | |
| 36 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, | |
| 37 int parameter_count, | |
| 38 CallDescriptor::Flags flags) { | |
| 39 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags); | |
| 40 } | |
| 41 | |
| 42 | |
| 43 CallDescriptor* Linkage::GetRuntimeCallDescriptor( | |
| 44 Zone* zone, Runtime::FunctionId function, int parameter_count, | |
| 45 Operator::Properties properties) { | |
| 46 return LH::GetRuntimeCallDescriptor(zone, function, parameter_count, | |
| 47 properties); | |
| 48 } | |
| 49 | |
| 50 | |
| 51 CallDescriptor* Linkage::GetStubCallDescriptor( | |
| 52 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, | |
| 53 int stack_parameter_count, CallDescriptor::Flags flags, | |
| 54 Operator::Properties properties, MachineType return_type) { | |
| 55 return LH::GetStubCallDescriptor(isolate, zone, descriptor, | |
| 56 stack_parameter_count, flags, properties, | |
| 57 return_type); | |
| 58 } | |
| 59 | |
| 60 | |
| 61 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { | |
| 62 return LH::GetInterpreterDispatchDescriptor(zone); | |
| 63 } | |
| 64 | |
| 65 } // namespace compiler | |
| 66 } // namespace internal | |
| 67 } // namespace v8 | |
| OLD | NEW |