< prev index next >

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

Print this page

        

@@ -51,19 +51,10 @@
         } else {
             return new HotSpotObjectConstantImpl(object, compressed);
         }
     }
 
-    static JavaConstant forStableArray(Object object, int stableDimension, boolean isDefaultStable) {
-        if (object == null) {
-            return JavaConstant.NULL_POINTER;
-        } else {
-            assert object.getClass().isArray();
-            return new HotSpotObjectConstantImpl(object, false, stableDimension, isDefaultStable);
-        }
-    }
-
     public static JavaConstant forBoxedValue(JavaKind kind, Object value) {
         if (kind == JavaKind.Object) {
             return HotSpotObjectConstantImpl.forObject(value);
         } else {
             return JavaConstant.forBoxedPrimitive(value);

@@ -80,26 +71,15 @@
         }
     }
 
     private final Object object;
     private final boolean compressed;
-    private final byte stableDimension;
-    private final boolean isDefaultStable;
 
-    private HotSpotObjectConstantImpl(Object object, boolean compressed, int stableDimension, boolean isDefaultStable) {
+    private HotSpotObjectConstantImpl(Object object, boolean compressed) {
         this.object = object;
         this.compressed = compressed;
-        this.stableDimension = (byte) stableDimension;
-        this.isDefaultStable = isDefaultStable;
         assert object != null;
-        assert stableDimension == 0 || (object != null && object.getClass().isArray());
-        assert stableDimension >= 0 && stableDimension <= 255;
-        assert !isDefaultStable || stableDimension > 0;
-    }
-
-    private HotSpotObjectConstantImpl(Object object, boolean compressed) {
-        this(object, compressed, 0, false);
     }
 
     @Override
     public JavaKind getJavaKind() {
         return JavaKind.Object;

@@ -116,16 +96,16 @@
         return compressed;
     }
 
     public JavaConstant compress() {
         assert !compressed;
-        return new HotSpotObjectConstantImpl(object, true, stableDimension, isDefaultStable);
+        return new HotSpotObjectConstantImpl(object, true);
     }
 
     public JavaConstant uncompress() {
         assert compressed;
-        return new HotSpotObjectConstantImpl(object, false, stableDimension, isDefaultStable);
+        return new HotSpotObjectConstantImpl(object, false);
     }
 
     public HotSpotResolvedObjectType getType() {
         return fromObjectClass(object.getClass());
     }

@@ -246,11 +226,11 @@
     public boolean equals(Object o) {
         if (o == this) {
             return true;
         } else if (o instanceof HotSpotObjectConstantImpl) {
             HotSpotObjectConstantImpl other = (HotSpotObjectConstantImpl) o;
-            return object == other.object && compressed == other.compressed && stableDimension == other.stableDimension && isDefaultStable == other.isDefaultStable;
+            return object == other.object && compressed == other.compressed;
         }
         return false;
     }
 
     @Override

@@ -264,21 +244,6 @@
 
     @Override
     public String toString() {
         return (compressed ? "NarrowOop" : getJavaKind().getJavaName()) + "[" + JavaKind.Object.format(object) + "]";
     }
-
-    /**
-     * Number of stable dimensions if this constant is a stable array.
-     */
-    public int getStableDimension() {
-        return stableDimension & 0xff;
-    }
-
-    /**
-     * Returns {@code true} if this is a stable array constant and its elements should be considered
-     * as stable regardless of whether they are default values.
-     */
-    public boolean isDefaultStable() {
-        return isDefaultStable;
-    }
 }
< prev index next >