hotspot/src/share/vm/oops/fieldInfo.hpp
changeset 16370 4b75aa6388ab
parent 15193 8e6b5694267f
child 19770 7cb9f982ea81
equal deleted inserted replaced
16369:f7869f84081e 16370:4b75aa6388ab
   106     switch(lo & FIELDINFO_TAG_MASK) {
   106     switch(lo & FIELDINFO_TAG_MASK) {
   107       case FIELDINFO_TAG_OFFSET:
   107       case FIELDINFO_TAG_OFFSET:
   108         return build_int_from_shorts(_shorts[low_packed_offset], _shorts[high_packed_offset]) >> FIELDINFO_TAG_SIZE;
   108         return build_int_from_shorts(_shorts[low_packed_offset], _shorts[high_packed_offset]) >> FIELDINFO_TAG_SIZE;
   109 #ifndef PRODUCT
   109 #ifndef PRODUCT
   110       case FIELDINFO_TAG_TYPE_PLAIN:
   110       case FIELDINFO_TAG_TYPE_PLAIN:
   111         ShouldNotReachHere2("Asking offset for the plain type field");
   111         fatal("Asking offset for the plain type field");
   112       case FIELDINFO_TAG_TYPE_CONTENDED:
   112       case FIELDINFO_TAG_TYPE_CONTENDED:
   113         ShouldNotReachHere2("Asking offset for the contended type field");
   113         fatal("Asking offset for the contended type field");
   114       case FIELDINFO_TAG_BLANK:
   114       case FIELDINFO_TAG_BLANK:
   115         ShouldNotReachHere2("Asking offset for the blank field");
   115         fatal("Asking offset for the blank field");
   116 #endif
   116 #endif
   117     }
   117     }
   118     ShouldNotReachHere();
   118     ShouldNotReachHere();
   119     return 0;
   119     return 0;
   120   }
   120   }
   126         return false;
   126         return false;
   127       case FIELDINFO_TAG_TYPE_CONTENDED:
   127       case FIELDINFO_TAG_TYPE_CONTENDED:
   128         return true;
   128         return true;
   129 #ifndef PRODUCT
   129 #ifndef PRODUCT
   130       case FIELDINFO_TAG_OFFSET:
   130       case FIELDINFO_TAG_OFFSET:
   131         ShouldNotReachHere2("Asking contended flag for the field with offset");
   131         fatal("Asking contended flag for the field with offset");
   132       case FIELDINFO_TAG_BLANK:
   132       case FIELDINFO_TAG_BLANK:
   133         ShouldNotReachHere2("Asking contended flag for the blank field");
   133         fatal("Asking contended flag for the blank field");
   134 #endif
   134 #endif
   135     }
   135     }
   136     ShouldNotReachHere();
   136     ShouldNotReachHere();
   137     return false;
   137     return false;
   138   }
   138   }
   144         return 0;
   144         return 0;
   145       case FIELDINFO_TAG_TYPE_CONTENDED:
   145       case FIELDINFO_TAG_TYPE_CONTENDED:
   146         return _shorts[high_packed_offset];
   146         return _shorts[high_packed_offset];
   147 #ifndef PRODUCT
   147 #ifndef PRODUCT
   148       case FIELDINFO_TAG_OFFSET:
   148       case FIELDINFO_TAG_OFFSET:
   149         ShouldNotReachHere2("Asking the contended group for the field with offset");
   149         fatal("Asking the contended group for the field with offset");
   150       case FIELDINFO_TAG_BLANK:
   150       case FIELDINFO_TAG_BLANK:
   151         ShouldNotReachHere2("Asking the contended group for the blank field");
   151         fatal("Asking the contended group for the blank field");
   152 #endif
   152 #endif
   153     }
   153     }
   154     ShouldNotReachHere();
   154     ShouldNotReachHere();
   155     return 0;
   155     return 0;
   156  }
   156  }
   161       case FIELDINFO_TAG_TYPE_PLAIN:
   161       case FIELDINFO_TAG_TYPE_PLAIN:
   162       case FIELDINFO_TAG_TYPE_CONTENDED:
   162       case FIELDINFO_TAG_TYPE_CONTENDED:
   163         return (lo >> FIELDINFO_TAG_SIZE);
   163         return (lo >> FIELDINFO_TAG_SIZE);
   164 #ifndef PRODUCT
   164 #ifndef PRODUCT
   165       case FIELDINFO_TAG_OFFSET:
   165       case FIELDINFO_TAG_OFFSET:
   166         ShouldNotReachHere2("Asking the field type for field with offset");
   166         fatal("Asking the field type for field with offset");
   167       case FIELDINFO_TAG_BLANK:
   167       case FIELDINFO_TAG_BLANK:
   168         ShouldNotReachHere2("Asking the field type for the blank field");
   168         fatal("Asking the field type for the blank field");
   169 #endif
   169 #endif
   170     }
   170     }
   171     ShouldNotReachHere();
   171     ShouldNotReachHere();
   172     return 0;
   172     return 0;
   173   }
   173   }
   209         return;
   209         return;
   210 #ifndef PRODUCT
   210 #ifndef PRODUCT
   211       case FIELDINFO_TAG_TYPE_PLAIN:
   211       case FIELDINFO_TAG_TYPE_PLAIN:
   212       case FIELDINFO_TAG_TYPE_CONTENDED:
   212       case FIELDINFO_TAG_TYPE_CONTENDED:
   213       case FIELDINFO_TAG_OFFSET:
   213       case FIELDINFO_TAG_OFFSET:
   214         ShouldNotReachHere2("Setting the field type with overwriting");
   214         fatal("Setting the field type with overwriting");
   215 #endif
   215 #endif
   216     }
   216     }
   217     ShouldNotReachHere();
   217     ShouldNotReachHere();
   218   }
   218   }
   219 
   219 
   224         _shorts[low_packed_offset] |= FIELDINFO_TAG_TYPE_CONTENDED;
   224         _shorts[low_packed_offset] |= FIELDINFO_TAG_TYPE_CONTENDED;
   225         _shorts[high_packed_offset] = val;
   225         _shorts[high_packed_offset] = val;
   226         return;
   226         return;
   227 #ifndef PRODUCT
   227 #ifndef PRODUCT
   228       case FIELDINFO_TAG_TYPE_CONTENDED:
   228       case FIELDINFO_TAG_TYPE_CONTENDED:
   229         ShouldNotReachHere2("Overwriting contended group");
   229         fatal("Overwriting contended group");
   230       case FIELDINFO_TAG_BLANK:
   230       case FIELDINFO_TAG_BLANK:
   231         ShouldNotReachHere2("Setting contended group for the blank field");
   231         fatal("Setting contended group for the blank field");
   232       case FIELDINFO_TAG_OFFSET:
   232       case FIELDINFO_TAG_OFFSET:
   233         ShouldNotReachHere2("Setting contended group for field with offset");
   233         fatal("Setting contended group for field with offset");
   234 #endif
   234 #endif
   235     }
   235     }
   236     ShouldNotReachHere();
   236     ShouldNotReachHere();
   237   }
   237   }
   238 
   238