120 public:
121 JsrSet(Arena* arena, int default_len = 4);
122
123 // Copy this JsrSet.
124 void copy_into(JsrSet* jsrs);
125
126 // Is this JsrSet compatible with some other JsrSet?
127 bool is_compatible_with(JsrSet* other);
128
129 // Apply the effect of a single bytecode to the JsrSet.
130 void apply_control(ciTypeFlow* analyzer,
131 ciBytecodeStream* str,
132 StateVector* state);
133
134 // What is the cardinality of this set?
135 int size() const { return _set->length(); }
136
137 void print_on(outputStream* st) const PRODUCT_RETURN;
138 };
139
140 class LocalSet VALUE_OBJ_CLASS_SPEC {
141 private:
142 enum Constants { max = 63 };
143 uint64_t _bits;
144 public:
145 LocalSet() : _bits(0) {}
146 void add(uint32_t i) { if (i < (uint32_t)max) _bits |= (1LL << i); }
147 void add(LocalSet* ls) { _bits |= ls->_bits; }
148 bool test(uint32_t i) const { return i < (uint32_t)max ? (_bits>>i)&1U : true; }
149 void clear() { _bits = 0; }
150 void print_on(outputStream* st, int limit) const PRODUCT_RETURN;
151 };
152
153 // Used as a combined index for locals and temps
154 enum Cell {
155 Cell_0, Cell_max = INT_MAX
156 };
157
158 // A StateVector summarizes the type information at some
159 // point in the program
160 class StateVector : public ResourceObj {
|
120 public:
121 JsrSet(Arena* arena, int default_len = 4);
122
123 // Copy this JsrSet.
124 void copy_into(JsrSet* jsrs);
125
126 // Is this JsrSet compatible with some other JsrSet?
127 bool is_compatible_with(JsrSet* other);
128
129 // Apply the effect of a single bytecode to the JsrSet.
130 void apply_control(ciTypeFlow* analyzer,
131 ciBytecodeStream* str,
132 StateVector* state);
133
134 // What is the cardinality of this set?
135 int size() const { return _set->length(); }
136
137 void print_on(outputStream* st) const PRODUCT_RETURN;
138 };
139
140 class LocalSet {
141 private:
142 enum Constants { max = 63 };
143 uint64_t _bits;
144 public:
145 LocalSet() : _bits(0) {}
146 void add(uint32_t i) { if (i < (uint32_t)max) _bits |= (1LL << i); }
147 void add(LocalSet* ls) { _bits |= ls->_bits; }
148 bool test(uint32_t i) const { return i < (uint32_t)max ? (_bits>>i)&1U : true; }
149 void clear() { _bits = 0; }
150 void print_on(outputStream* st, int limit) const PRODUCT_RETURN;
151 };
152
153 // Used as a combined index for locals and temps
154 enum Cell {
155 Cell_0, Cell_max = INT_MAX
156 };
157
158 // A StateVector summarizes the type information at some
159 // point in the program
160 class StateVector : public ResourceObj {
|