Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: test/cctest/compiler/call-tester.h

Issue 1111733002: [clang] Use -Wshorten-64-to-32 to enable warnings about 64bit to 32bit truncations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Win warnings. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/utils.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
132 #if !V8_TARGET_ARCH_32_BIT
133
131 // Additional template specialization required for mips64 to sign-extend 134 // Additional template specialization required for mips64 to sign-extend
132 // parameters defined by calling convention. 135 // parameters defined by calling convention.
133 template <> 136 template <>
134 struct ParameterTraits<int32_t> { 137 struct ParameterTraits<int32_t> {
135 static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); } 138 static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); }
136 }; 139 };
137 140
138 template <> 141 template <>
139 struct ParameterTraits<uint32_t> { 142 struct ParameterTraits<uint32_t> {
140 static int64_t Cast(uint32_t r) { 143 static int64_t Cast(uint32_t r) {
141 return static_cast<int64_t>(static_cast<int32_t>(r)); 144 return static_cast<int64_t>(static_cast<int32_t>(r));
142 } 145 }
143 }; 146 };
144 147
148 #endif // !V8_TARGET_ARCH_64_BIT
149
150
145 class CallHelper { 151 class CallHelper {
146 public: 152 public:
147 explicit CallHelper(Isolate* isolate, MachineSignature* machine_sig) 153 explicit CallHelper(Isolate* isolate, MachineSignature* machine_sig)
148 : machine_sig_(machine_sig), isolate_(isolate) { 154 : machine_sig_(machine_sig), isolate_(isolate) {
149 USE(isolate_); 155 USE(isolate_);
150 } 156 }
151 virtual ~CallHelper() {} 157 virtual ~CallHelper() {}
152 158
153 static MachineSignature* MakeMachineSignature( 159 static MachineSignature* MakeMachineSignature(
154 Zone* zone, MachineType return_type, MachineType p0 = kMachNone, 160 Zone* zone, MachineType return_type, MachineType p0 = kMachNone,
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 442
437 private: 443 private:
438 CallHelper* helper() { return static_cast<C*>(this); } 444 CallHelper* helper() { return static_cast<C*>(this); }
439 }; 445 };
440 446
441 } // namespace compiler 447 } // namespace compiler
442 } // namespace internal 448 } // namespace internal
443 } // namespace v8 449 } // namespace v8
444 450
445 #endif // V8_CCTEST_COMPILER_CALL_TESTER_H_ 451 #endif // V8_CCTEST_COMPILER_CALL_TESTER_H_
OLDNEW
« no previous file with comments | « src/utils.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698