< prev index next >

hotspot/src/share/vm/oops/fieldInfo.hpp

Print this page




 182       return lookup_symbol(index);
 183     }
 184     return cp->symbol_at(index);
 185   }
 186 
 187   Symbol* signature(const constantPoolHandle& cp) const {
 188     int index = signature_index();
 189     if (is_internal()) {
 190       return lookup_symbol(index);
 191     }
 192     return cp->symbol_at(index);
 193   }
 194 
 195   void set_access_flags(u2 val)                  { _shorts[access_flags_offset] = val;             }
 196   void set_offset(u4 val)                        {
 197     val = val << FIELDINFO_TAG_SIZE; // make room for tag
 198     _shorts[low_packed_offset] = extract_low_short_from_int(val) | FIELDINFO_TAG_OFFSET;
 199     _shorts[high_packed_offset] = extract_high_short_from_int(val);
 200   }
 201 









 202   void set_allocation_type(int type) {
 203     u2 lo = _shorts[low_packed_offset];
 204     switch(lo & FIELDINFO_TAG_MASK) {
 205       case FIELDINFO_TAG_BLANK:
 206         _shorts[low_packed_offset] = ((type << FIELDINFO_TAG_SIZE)) & 0xFFFF;
 207         _shorts[low_packed_offset] &= ~FIELDINFO_TAG_MASK;
 208         _shorts[low_packed_offset] |= FIELDINFO_TAG_TYPE_PLAIN;
 209         return;
 210 #ifndef PRODUCT
 211       case FIELDINFO_TAG_TYPE_PLAIN:
 212       case FIELDINFO_TAG_TYPE_CONTENDED:
 213       case FIELDINFO_TAG_OFFSET:
 214         fatal("Setting the field type with overwriting");
 215 #endif
 216     }
 217     ShouldNotReachHere();
 218   }
 219 
 220   void set_contended_group(u2 val) {
 221     u2 lo = _shorts[low_packed_offset];




 182       return lookup_symbol(index);
 183     }
 184     return cp->symbol_at(index);
 185   }
 186 
 187   Symbol* signature(const constantPoolHandle& cp) const {
 188     int index = signature_index();
 189     if (is_internal()) {
 190       return lookup_symbol(index);
 191     }
 192     return cp->symbol_at(index);
 193   }
 194 
 195   void set_access_flags(u2 val)                  { _shorts[access_flags_offset] = val;             }
 196   void set_offset(u4 val)                        {
 197     val = val << FIELDINFO_TAG_SIZE; // make room for tag
 198     _shorts[low_packed_offset] = extract_low_short_from_int(val) | FIELDINFO_TAG_OFFSET;
 199     _shorts[high_packed_offset] = extract_high_short_from_int(val);
 200   }
 201 
 202   // Values types may be coerced to a allocation different type
 203   void coerce_allocation_type(int from, int type) {
 204     assert(allocation_type() == from, "Unexpected from state from: %d type: %d", from, allocation_type());
 205     u2 lo = _shorts[low_packed_offset];
 206     _shorts[low_packed_offset] = ((type << FIELDINFO_TAG_SIZE)) & 0xFFFF;
 207     _shorts[low_packed_offset] &= ~FIELDINFO_TAG_MASK;
 208     _shorts[low_packed_offset] |= FIELDINFO_TAG_TYPE_PLAIN;
 209   }
 210 
 211   void set_allocation_type(int type) {
 212     u2 lo = _shorts[low_packed_offset];
 213     switch(lo & FIELDINFO_TAG_MASK) {
 214       case FIELDINFO_TAG_BLANK:
 215         _shorts[low_packed_offset] = ((type << FIELDINFO_TAG_SIZE)) & 0xFFFF;
 216         _shorts[low_packed_offset] &= ~FIELDINFO_TAG_MASK;
 217         _shorts[low_packed_offset] |= FIELDINFO_TAG_TYPE_PLAIN;
 218         return;
 219 #ifndef PRODUCT
 220       case FIELDINFO_TAG_TYPE_PLAIN:
 221       case FIELDINFO_TAG_TYPE_CONTENDED:
 222       case FIELDINFO_TAG_OFFSET:
 223         fatal("Setting the field type with overwriting");
 224 #endif
 225     }
 226     ShouldNotReachHere();
 227   }
 228 
 229   void set_contended_group(u2 val) {
 230     u2 lo = _shorts[low_packed_offset];


< prev index next >