| 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_CCTEST_COMPILER_CALL_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_CALL_TESTER_H_ | 
| 6 #define V8_CCTEST_COMPILER_CALL_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_CALL_TESTER_H_ | 
| 7 | 7 | 
| 8 #include "src/v8.h" | 8 #include "src/v8.h" | 
| 9 | 9 | 
| 10 #include "src/simulator.h" | 10 #include "src/simulator.h" | 
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 121 template <> | 121 template <> | 
| 122 struct ParameterTraits<int*> { | 122 struct ParameterTraits<int*> { | 
| 123   static uintptr_t Cast(int* r) { return reinterpret_cast<uintptr_t>(r); } | 123   static uintptr_t Cast(int* r) { return reinterpret_cast<uintptr_t>(r); } | 
| 124 }; | 124 }; | 
| 125 | 125 | 
| 126 template <typename T> | 126 template <typename T> | 
| 127 struct ParameterTraits<T*> { | 127 struct ParameterTraits<T*> { | 
| 128   static uintptr_t Cast(void* r) { return reinterpret_cast<uintptr_t>(r); } | 128   static uintptr_t Cast(void* r) { return reinterpret_cast<uintptr_t>(r); } | 
| 129 }; | 129 }; | 
| 130 | 130 | 
| 131 #if V8_TARGET_ARCH_MIPS64 |  | 
| 132 // Additional template specialization required for mips64 to sign-extend | 131 // Additional template specialization required for mips64 to sign-extend | 
| 133 // parameters defined by calling convention. | 132 // parameters defined by calling convention. | 
| 134 template <> | 133 template <> | 
| 135 struct ParameterTraits<int32_t> { | 134 struct ParameterTraits<int32_t> { | 
| 136   static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); } | 135   static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); } | 
| 137 }; | 136 }; | 
| 138 | 137 | 
| 139 template <> | 138 template <> | 
| 140 struct ParameterTraits<uint32_t> { | 139 struct ParameterTraits<uint32_t> { | 
| 141   static int64_t Cast(uint32_t r) { | 140   static int64_t Cast(uint32_t r) { | 
| 142     return static_cast<int64_t>(static_cast<int32_t>(r)); | 141     return static_cast<int64_t>(static_cast<int32_t>(r)); | 
| 143   } | 142   } | 
| 144 }; | 143 }; | 
| 145 #endif |  | 
| 146 | 144 | 
| 147 class CallHelper { | 145 class CallHelper { | 
| 148  public: | 146  public: | 
| 149   explicit CallHelper(Isolate* isolate, MachineSignature* machine_sig) | 147   explicit CallHelper(Isolate* isolate, MachineSignature* machine_sig) | 
| 150       : machine_sig_(machine_sig), isolate_(isolate) { | 148       : machine_sig_(machine_sig), isolate_(isolate) { | 
| 151     USE(isolate_); | 149     USE(isolate_); | 
| 152   } | 150   } | 
| 153   virtual ~CallHelper() {} | 151   virtual ~CallHelper() {} | 
| 154 | 152 | 
| 155   static MachineSignature* MakeMachineSignature( | 153   static MachineSignature* MakeMachineSignature( | 
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 438 | 436 | 
| 439  private: | 437  private: | 
| 440   CallHelper* helper() { return static_cast<C*>(this); } | 438   CallHelper* helper() { return static_cast<C*>(this); } | 
| 441 }; | 439 }; | 
| 442 | 440 | 
| 443 }  // namespace compiler | 441 }  // namespace compiler | 
| 444 }  // namespace internal | 442 }  // namespace internal | 
| 445 }  // namespace v8 | 443 }  // namespace v8 | 
| 446 | 444 | 
| 447 #endif  // V8_CCTEST_COMPILER_CALL_TESTER_H_ | 445 #endif  // V8_CCTEST_COMPILER_CALL_TESTER_H_ | 
| OLD | NEW | 
|---|