< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -41,11 +41,10 @@
 
     private final ResolvedJavaType type;
     private JavaValue[] values;
     private JavaKind[] slotKinds;
     private final int id;
-    private boolean isAutoBox;
 
     /**
      * Creates a new {@link VirtualObject} for the given type, with the given fields. If
      * {@code type} is an instance class then {@code values} provides the values for the fields
      * returned by {@link ResolvedJavaType#getInstanceFields(boolean) getInstanceFields(true)}. If

@@ -57,37 +56,16 @@
      * @param id a unique id that identifies the object within the debug information for one
      *            position in the compiled code.
      * @return a new {@link VirtualObject} instance.
      */
     public static VirtualObject get(ResolvedJavaType type, int id) {
-        return new VirtualObject(type, id, false);
+        return new VirtualObject(type, id);
     }
 
-    /**
-     * Creates a new {@link VirtualObject} for the given type, with the given fields. If
-     * {@code type} is an instance class then {@code values} provides the values for the fields
-     * returned by {@link ResolvedJavaType#getInstanceFields(boolean) getInstanceFields(true)}. If
-     * {@code type} is an array then the length of the values array determines the reallocated array
-     * length.
-     *
-     * @param type the type of the object whose allocation was removed during compilation. This can
-     *            be either an instance of an array type.
-     * @param id a unique id that identifies the object within the debug information for one
-     *            position in the compiled code.
-     * @param isAutoBox a flag that tells the runtime that the object may be a boxed primitive and
-     *            that it possibly needs to be obtained for the box cache instead of creating
-     *            a new instance.
-     * @return a new {@link VirtualObject} instance.
-     */
-    public static VirtualObject get(ResolvedJavaType type, int id, boolean isAutoBox) {
-        return new VirtualObject(type, id, isAutoBox);
-    }
-
-    private VirtualObject(ResolvedJavaType type, int id, boolean isAutoBox) {
+    private VirtualObject(ResolvedJavaType type, int id) {
         this.type = type;
         this.id = id;
-        this.isAutoBox = isAutoBox;
     }
 
     private static StringBuilder appendValue(StringBuilder buf, JavaValue value, Set<VirtualObject> visited) {
         if (value instanceof VirtualObject) {
             VirtualObject vo = (VirtualObject) value;

@@ -164,27 +142,10 @@
     public int getId() {
         return id;
     }
 
     /**
-     * Returns true if the object is a box. For boxes the deoptimization would check if the value of
-     * the box is in the cache range and try to return a cached object.
-     */
-    public boolean isAutoBox() {
-      return isAutoBox;
-    }
-
-    /**
-     * Sets the value of the box flag.
-     * @param isAutoBox a flag that tells the runtime that the object may be a boxed primitive and that
-     *            it possibly needs to be obtained for the box cache instead of creating a new instance.
-     */
-    public void setIsAutoBox(boolean isAutoBox) {
-      this.isAutoBox = isAutoBox;
-    }
-
-    /**
      * Overwrites the current set of values with a new one.
      *
      * @param values an array containing all the values to be stored into the object when it is
      *            recreated.
      * @param slotKinds an array containing the Java kinds of the values. This must have the same
< prev index next >