1 /*
2 * MIT License
3 * Copyright (c) 2006-2025 JMockit developers
4 * See LICENSE file for full license text.
5 */
6 package mockit.asm.controlFlow;
7
8 public interface FrameTypeMask {
9 /**
10 * Mask to get the dimension of a frame type. This dimension is a signed integer between -8 and 7.
11 */
12 int DIM = 0xF0000000;
13
14 /**
15 * Constant to be added to a type to get a type with one more dimension.
16 */
17 int ARRAY_OF = 0x10000000;
18
19 /**
20 * Constant to be added to a type to get a type with one less dimension.
21 */
22 int ELEMENT_OF = 0xF0000000;
23
24 /**
25 * Mask to get the kind of a frame type.
26 *
27 * @see #BASE
28 * @see #LOCAL
29 * @see #STACK
30 */
31 int KIND = 0xF000000;
32
33 /**
34 * Flag used for LOCAL and STACK types. Indicates that if this type happens to be a long or double type (during the
35 * computations of input frames), then it must be set to TOP because the second word of this value has been reused
36 * to store other data in the basic block. Hence the first word no longer stores a valid long or double value.
37 */
38 int TOP_IF_LONG_OR_DOUBLE = 0x800000;
39
40 /**
41 * Mask to get the value of a frame type.
42 */
43 int VALUE = 0x7FFFFF;
44
45 /**
46 * Mask to get the kind of base types.
47 */
48 int BASE_KIND = 0xFF00000;
49
50 /**
51 * Mask to get the value of base types.
52 */
53 int BASE_VALUE = 0xFFFFF;
54
55 /**
56 * Kind of the types that are not relative to an input stack map frame.
57 */
58 int BASE = 0x1000000;
59
60 /**
61 * Base kind of the base reference types. The BASE_VALUE of such types is an index into the type table.
62 */
63 int OBJECT = BASE | 0x700000;
64
65 /**
66 * Base kind of the uninitialized base types. The BASE_VALUE of such types is an index into the type table (the Item
67 * at that index contains both an instruction offset and an internal class name).
68 */
69 int UNINITIALIZED = BASE | 0x800000;
70
71 /**
72 * Kind of the types that are relative to the local variable types of an input stack map frame. The value of such
73 * types is a local variable index.
74 */
75 int LOCAL = 0x2000000;
76
77 /**
78 * Kind of the types that are relative to the stack of an input stack map frame. The value of such types is a
79 * position relatively to the top of this stack.
80 */
81 int STACK = 0x3000000;
82
83 /**
84 * The TOP type. This is a BASE type.
85 */
86 int TOP = BASE;
87
88 /**
89 * The BOOLEAN type. This is a BASE type mainly used for array types.
90 */
91 int BOOLEAN = BASE | 9;
92
93 /**
94 * The BYTE type. This is a BASE type mainly used for array types.
95 */
96 int BYTE = BASE | 10;
97
98 /**
99 * The CHAR type. This is a BASE type mainly used for array types.
100 */
101 int CHAR = BASE | 11;
102
103 /**
104 * The SHORT type. This is a BASE type mainly used for array types.
105 */
106 int SHORT = BASE | 12;
107
108 /**
109 * The INTEGER type. This is a BASE type.
110 */
111 int INTEGER = BASE | 1;
112
113 /**
114 * The FLOAT type. This is a BASE type.
115 */
116 int FLOAT = BASE | 2;
117
118 /**
119 * The DOUBLE type. This is a BASE type.
120 */
121 int DOUBLE = BASE | 3;
122
123 /**
124 * The LONG type. This is a BASE type.
125 */
126 int LONG = BASE | 4;
127
128 /**
129 * The NULL type. This is a BASE type.
130 */
131 int NULL = BASE | 5;
132
133 /**
134 * The UNINITIALIZED_THIS type. This is a BASE type.
135 */
136 int UNINITIALIZED_THIS = BASE | 6;
137 }