| 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 #ifndef V8_COMPILER_C_SIGNATURE_H_ | 5 #ifndef V8_COMPILER_C_SIGNATURE_H_ |
| 6 #define V8_COMPILER_C_SIGNATURE_H_ | 6 #define V8_COMPILER_C_SIGNATURE_H_ |
| 7 | 7 |
| 8 #include "src/compiler/machine-type.h" | 8 #include "src/compiler/machine-type.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 MachineTypeForC<P5>()}; | 62 MachineTypeForC<P5>()}; |
| 63 for (int p = kMax - 1; p >= 0; p--) { | 63 for (int p = kMax - 1; p >= 0; p--) { |
| 64 if (p < static_cast<int>(parameter_count())) { | 64 if (p < static_cast<int>(parameter_count())) { |
| 65 CHECK_EQ(GetParam(p), params[p]); | 65 CHECK_EQ(GetParam(p), params[p]); |
| 66 } else { | 66 } else { |
| 67 CHECK_EQ(kMachNone, params[p]); | 67 CHECK_EQ(kMachNone, params[p]); |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 static CSignature* FromMachine(Zone* zone, MachineSignature* msig) { |
| 73 return reinterpret_cast<CSignature*>(msig); |
| 74 } |
| 75 |
| 72 static CSignature* New(Zone* zone, MachineType ret, | 76 static CSignature* New(Zone* zone, MachineType ret, |
| 73 MachineType p1 = kMachNone, MachineType p2 = kMachNone, | 77 MachineType p1 = kMachNone, MachineType p2 = kMachNone, |
| 74 MachineType p3 = kMachNone, MachineType p4 = kMachNone, | 78 MachineType p3 = kMachNone, MachineType p4 = kMachNone, |
| 75 MachineType p5 = kMachNone) { | 79 MachineType p5 = kMachNone) { |
| 76 MachineType* buffer = zone->NewArray<MachineType>(6); | 80 MachineType* buffer = zone->NewArray<MachineType>(6); |
| 77 int pos = 0; | 81 int pos = 0; |
| 78 size_t return_count = 0; | 82 size_t return_count = 0; |
| 79 if (ret != kMachNone) { | 83 if (ret != kMachNone) { |
| 80 buffer[pos++] = ret; | 84 buffer[pos++] = ret; |
| 81 return_count++; | 85 return_count++; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 typedef CSignature2<int32_t, int32_t, int32_t> CSignature_i_ii; | 157 typedef CSignature2<int32_t, int32_t, int32_t> CSignature_i_ii; |
| 154 typedef CSignature2<uint32_t, uint32_t, uint32_t> CSignature_u_uu; | 158 typedef CSignature2<uint32_t, uint32_t, uint32_t> CSignature_u_uu; |
| 155 typedef CSignature2<float, float, float> CSignature_f_ff; | 159 typedef CSignature2<float, float, float> CSignature_f_ff; |
| 156 typedef CSignature2<double, double, double> CSignature_d_dd; | 160 typedef CSignature2<double, double, double> CSignature_d_dd; |
| 157 typedef CSignature2<Object*, Object*, Object*> CSignature_o_oo; | 161 typedef CSignature2<Object*, Object*, Object*> CSignature_o_oo; |
| 158 } | 162 } |
| 159 } | 163 } |
| 160 } // namespace v8::internal::compiler | 164 } // namespace v8::internal::compiler |
| 161 | 165 |
| 162 #endif // V8_COMPILER_C_SIGNATURE_H_ | 166 #endif // V8_COMPILER_C_SIGNATURE_H_ |
| OLD | NEW |