1 | // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file |
2 | // for details. All rights reserved. Use of this source code is governed by a |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #ifndef RUNTIME_VM_CONSTANTS_BASE_H_ |
6 | #define RUNTIME_VM_CONSTANTS_BASE_H_ |
7 | |
8 | namespace dart { |
9 | |
10 | // Alignment strategies for how to align values. |
11 | enum AlignmentStrategy { |
12 | // Align to the size of the value. |
13 | kAlignedToValueSize, |
14 | // Align to the size of the value, but align 8 byte-sized values to 4 bytes. |
15 | // Both double and int64. |
16 | kAlignedToValueSizeBut8AlignedTo4, |
17 | // Align to the architecture size. |
18 | kAlignedToWordSize, |
19 | // Align to the architecture size, but align 8 byte-sized values to 8 bytes. |
20 | // Both double and int64. |
21 | kAlignedToWordSizeBut8AlignedTo8, |
22 | }; |
23 | |
24 | // Minimum size strategies for how to store values. |
25 | enum ExtensionStrategy { |
26 | // Values can have arbitrary small size with the upper bits undefined. |
27 | kNotExtended, |
28 | // Values smaller than 4 bytes are passed around zero- or signextended to |
29 | // 4 bytes. |
30 | kExtendedTo4, |
31 | }; |
32 | |
33 | } // namespace dart |
34 | |
35 | #endif // RUNTIME_VM_CONSTANTS_BASE_H_ |
36 | |