< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package jdk.vm.ci.hotspot;
  24 
  25 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
  26 import static jdk.vm.ci.hotspot.HotSpotVMConfig.config;
  27 
  28 import java.lang.annotation.Annotation;
  29 import java.lang.reflect.Field;
  30 
  31 import jdk.vm.ci.common.JVMCIError;

  32 import jdk.vm.ci.meta.JavaType;
  33 import jdk.vm.ci.meta.LocationIdentity;
  34 import jdk.vm.ci.meta.MetaAccessProvider;
  35 import jdk.vm.ci.meta.ModifiersProvider;
  36 import jdk.vm.ci.meta.ResolvedJavaField;
  37 import jdk.vm.ci.meta.ResolvedJavaType;
  38 
  39 /**
  40  * Represents a field in a HotSpot type.
  41  */
  42 class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField, HotSpotProxified {
  43 
  44     /**
  45      * Mark well-known stable fields as such.
  46      */
  47     private static final boolean ImplicitStableValues = HotSpotJVMCIRuntime.getBooleanProperty("ImplicitStableValues", true);
  48 
  49     private final HotSpotResolvedObjectTypeImpl holder;
  50     private final String name;
  51     private JavaType type;
  52     private final int offset;
  53 
  54     /**
  55      * This value contains all flags as stored in the VM including internal ones.
  56      */
  57     private final int modifiers;
  58     private final LocationIdentity locationIdentity = new FieldLocationIdentity(this);
  59 
  60     public static class FieldLocationIdentity extends LocationIdentity {
  61         HotSpotResolvedJavaField inner;
  62 
  63         public FieldLocationIdentity(HotSpotResolvedJavaFieldImpl inner) {
  64             this.inner = inner;
  65         }
  66 
  67         @Override




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package jdk.vm.ci.hotspot;
  24 
  25 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
  26 import static jdk.vm.ci.hotspot.HotSpotVMConfig.config;
  27 
  28 import java.lang.annotation.Annotation;
  29 import java.lang.reflect.Field;
  30 
  31 import jdk.vm.ci.common.JVMCIError;
  32 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
  33 import jdk.vm.ci.meta.JavaType;
  34 import jdk.vm.ci.meta.LocationIdentity;
  35 import jdk.vm.ci.meta.MetaAccessProvider;
  36 import jdk.vm.ci.meta.ModifiersProvider;
  37 import jdk.vm.ci.meta.ResolvedJavaField;
  38 import jdk.vm.ci.meta.ResolvedJavaType;
  39 
  40 /**
  41  * Represents a field in a HotSpot type.
  42  */
  43 class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField, HotSpotProxified {
  44 
  45     /**
  46      * Mark well-known stable fields as such.
  47      */
  48     private static final boolean ImplicitStableValues = Option.ImplicitStableValues.getBoolean();
  49 
  50     private final HotSpotResolvedObjectTypeImpl holder;
  51     private final String name;
  52     private JavaType type;
  53     private final int offset;
  54 
  55     /**
  56      * This value contains all flags as stored in the VM including internal ones.
  57      */
  58     private final int modifiers;
  59     private final LocationIdentity locationIdentity = new FieldLocationIdentity(this);
  60 
  61     public static class FieldLocationIdentity extends LocationIdentity {
  62         HotSpotResolvedJavaField inner;
  63 
  64         public FieldLocationIdentity(HotSpotResolvedJavaFieldImpl inner) {
  65             this.inner = inner;
  66         }
  67 
  68         @Override


< prev index next >