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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/linkage-impl.h" | 10 #include "src/compiler/linkage-impl.h" |
11 #include "src/zone.h" | 11 #include "src/zone.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 namespace compiler { | 15 namespace compiler { |
16 | 16 |
17 #ifndef _WIN64 | |
18 | |
19 #ifdef _WIN64 | 17 #ifdef _WIN64 |
20 const bool kWin64 = true; | 18 const bool kWin64 = true; |
21 #else | 19 #else |
22 const bool kWin64 = false; | 20 const bool kWin64 = false; |
23 #endif | 21 #endif |
24 | 22 |
25 struct LinkageHelperTraits { | 23 struct LinkageHelperTraits { |
26 static Register ReturnValueReg() { return rax; } | 24 static Register ReturnValueReg() { return rax; } |
27 static Register ReturnValue2Reg() { return rdx; } | 25 static Register ReturnValue2Reg() { return rdx; } |
28 static Register JSCallFunctionReg() { return rdi; } | 26 static Register JSCallFunctionReg() { return rdi; } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 70 } |
73 | 71 |
74 | 72 |
75 CallDescriptor* Linkage::GetSimplifiedCDescriptor( | 73 CallDescriptor* Linkage::GetSimplifiedCDescriptor( |
76 Zone* zone, int num_params, MachineRepresentation return_type, | 74 Zone* zone, int num_params, MachineRepresentation return_type, |
77 const MachineRepresentation* param_types) { | 75 const MachineRepresentation* param_types) { |
78 return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>( | 76 return LinkageHelper::GetSimplifiedCDescriptor<LinkageHelperTraits>( |
79 zone, num_params, return_type, param_types); | 77 zone, num_params, return_type, param_types); |
80 } | 78 } |
81 | 79 |
82 #endif | |
83 } | 80 } |
84 } | 81 } |
85 } // namespace v8::internal::compiler | 82 } // namespace v8::internal::compiler |
OLD | NEW |