changeset 14138:0b8f4e50e149

removed unnecessary cache in HotSpotResolvedJavaField
author Doug Simon <doug.simon@oracle.com>
date Tue, 11 Mar 2014 20:30:12 +0100
parents aa2920aa838d
children 0991bc235152
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java	Tue Mar 11 20:29:26 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java	Tue Mar 11 20:30:12 2014 +0100
@@ -51,13 +51,8 @@
     private final String name;
     private JavaType type;
     private final int offset;
-    private Constant constant;
 
     /**
-     * The {@linkplain HotSpotResolvedObjectType#getReflectionFieldModifiers() reflection} modifiers
-     * for this field plus the {@link #FIELD_INTERNAL_FLAG} if it applies.
-     */
-    /**
      * This value contains all flags as stored in the VM including internal ones.
      */
     private final int modifiers;
@@ -189,14 +184,12 @@
 
         if (receiver == null) {
             assert isStatic(modifiers);
-            if (constant == null) {
+            if (Modifier.isFinal(getModifiers())) {
                 if (holder.isInitialized() && !holder.getName().equals(SystemClassName) && isEmbeddable()) {
-                    if (Modifier.isFinal(getModifiers())) {
-                        constant = readValue(receiver);
-                    }
+                    return readValue(receiver);
+
                 }
             }
-            return constant;
         } else {
             /*
              * for non-static final fields, we must assume that they are only initialized if they