| 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_MACHINE_TYPE_H_ | 5 #ifndef V8_MACHINE_TYPE_H_ |
| 6 #define V8_MACHINE_TYPE_H_ | 6 #define V8_MACHINE_TYPE_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 V8_INLINE size_t hash_value(MachineRepresentation rep) { | 212 V8_INLINE size_t hash_value(MachineRepresentation rep) { |
| 213 return static_cast<size_t>(rep); | 213 return static_cast<size_t>(rep); |
| 214 } | 214 } |
| 215 | 215 |
| 216 V8_INLINE size_t hash_value(MachineType type) { | 216 V8_INLINE size_t hash_value(MachineType type) { |
| 217 return static_cast<size_t>(type.representation()) + | 217 return static_cast<size_t>(type.representation()) + |
| 218 static_cast<size_t>(type.semantic()) * 16; | 218 static_cast<size_t>(type.semantic()) * 16; |
| 219 } | 219 } |
| 220 | 220 |
| 221 std::ostream& operator<<(std::ostream& os, MachineRepresentation rep); | 221 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
| 222 MachineRepresentation rep); |
| 222 std::ostream& operator<<(std::ostream& os, MachineSemantic type); | 223 std::ostream& operator<<(std::ostream& os, MachineSemantic type); |
| 223 std::ostream& operator<<(std::ostream& os, MachineType type); | 224 std::ostream& operator<<(std::ostream& os, MachineType type); |
| 224 | 225 |
| 225 inline bool IsFloatingPoint(MachineRepresentation rep) { | 226 inline bool IsFloatingPoint(MachineRepresentation rep) { |
| 226 return rep == MachineRepresentation::kFloat32 || | 227 return rep == MachineRepresentation::kFloat32 || |
| 227 rep == MachineRepresentation::kFloat64 || | 228 rep == MachineRepresentation::kFloat64 || |
| 228 rep == MachineRepresentation::kSimd128; | 229 rep == MachineRepresentation::kSimd128; |
| 229 } | 230 } |
| 230 | 231 |
| 231 inline bool CanBeTaggedPointer(MachineRepresentation rep) { | 232 inline bool CanBeTaggedPointer(MachineRepresentation rep) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 UNREACHABLE(); | 264 UNREACHABLE(); |
| 264 return -1; | 265 return -1; |
| 265 } | 266 } |
| 266 | 267 |
| 267 typedef Signature<MachineType> MachineSignature; | 268 typedef Signature<MachineType> MachineSignature; |
| 268 | 269 |
| 269 } // namespace internal | 270 } // namespace internal |
| 270 } // namespace v8 | 271 } // namespace v8 |
| 271 | 272 |
| 272 #endif // V8_MACHINE_TYPE_H_ | 273 #endif // V8_MACHINE_TYPE_H_ |
| OLD | NEW |