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

Side by Side Diff: src/machine-type.h

Issue 2669113003: Removes uint8_t from MachineRepresentation and MachineSemantic enums. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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_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"
11 #include "src/globals.h" 11 #include "src/globals.h"
12 #include "src/signature.h" 12 #include "src/signature.h"
13 #include "src/zone/zone.h" 13 #include "src/zone/zone.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 enum class MachineRepresentation : uint8_t { 18 enum class MachineRepresentation {
19 kNone, 19 kNone,
20 kBit, 20 kBit,
21 kWord8, 21 kWord8,
22 kWord16, 22 kWord16,
23 kWord32, 23 kWord32,
24 kWord64, 24 kWord64,
25 kTaggedSigned, 25 kTaggedSigned,
26 kTaggedPointer, 26 kTaggedPointer,
27 kTagged, 27 kTagged,
28 // FP representations must be last, and in order of increasing size. 28 // FP representations must be last, and in order of increasing size.
29 kFloat32, 29 kFloat32,
30 kFloat64, 30 kFloat64,
31 kSimd128, 31 kSimd128,
32 kFirstFPRepresentation = kFloat32, 32 kFirstFPRepresentation = kFloat32,
33 kLastRepresentation = kSimd128 33 kLastRepresentation = kSimd128
34 }; 34 };
35 35
36 static_assert(static_cast<int>(MachineRepresentation::kLastRepresentation) < 36 static_assert(static_cast<int>(MachineRepresentation::kLastRepresentation) <
37 kIntSize * kBitsPerByte, 37 kIntSize * kBitsPerByte,
38 "Bit masks of MachineRepresentation should fit in an int"); 38 "Bit masks of MachineRepresentation should fit in an int");
39 39
40 const char* MachineReprToString(MachineRepresentation); 40 const char* MachineReprToString(MachineRepresentation);
41 41
42 enum class MachineSemantic : uint8_t { 42 enum class MachineSemantic {
43 kNone, 43 kNone,
44 kBool, 44 kBool,
45 kInt32, 45 kInt32,
46 kUint32, 46 kUint32,
47 kInt64, 47 kInt64,
48 kUint64, 48 kUint64,
49 kNumber, 49 kNumber,
50 kAny 50 kAny
51 }; 51 };
52 52
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 UNREACHABLE(); 276 UNREACHABLE();
277 return -1; 277 return -1;
278 } 278 }
279 279
280 typedef Signature<MachineType> MachineSignature; 280 typedef Signature<MachineType> MachineSignature;
281 281
282 } // namespace internal 282 } // namespace internal
283 } // namespace v8 283 } // namespace v8
284 284
285 #endif // V8_MACHINE_TYPE_H_ 285 #endif // V8_MACHINE_TYPE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698