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_MACHINE_TYPE_H_ | 5 #ifndef V8_COMPILER_MACHINE_TYPE_H_ |
6 #define V8_COMPILER_MACHINE_TYPE_H_ | 6 #define V8_COMPILER_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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 | 107 |
108 // Gets the element size in bytes of the machine type. | 108 // Gets the element size in bytes of the machine type. |
109 inline int ElementSizeOf(MachineType machine_type) { | 109 inline int ElementSizeOf(MachineType machine_type) { |
110 const int shift = ElementSizeLog2Of(machine_type); | 110 const int shift = ElementSizeLog2Of(machine_type); |
111 DCHECK_NE(-1, shift); | 111 DCHECK_NE(-1, shift); |
112 return 1 << shift; | 112 return 1 << shift; |
113 } | 113 } |
114 | 114 |
115 typedef Signature<MachineType> MachineSignature; | 115 typedef Signature<MachineType> MachineSignature; |
| 116 |
116 } // namespace compiler | 117 } // namespace compiler |
117 } // namespace internal | 118 } // namespace internal |
118 } // namespace v8 | 119 } // namespace v8 |
119 | 120 |
120 #endif // V8_COMPILER_MACHINE_TYPE_H_ | 121 #endif // V8_COMPILER_MACHINE_TYPE_H_ |
OLD | NEW |