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