< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationResult.java

Print this page

        

@@ -20,17 +20,28 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 package jdk.vm.ci.code;
 
-import static java.util.Collections.*;
-import static jdk.vm.ci.meta.MetaUtil.*;
-
-import java.util.*;
-
-import jdk.vm.ci.meta.*;
-import jdk.vm.ci.meta.Assumptions.*;
+import static java.util.Collections.emptyList;
+import static java.util.Collections.unmodifiableList;
+import static jdk.vm.ci.meta.MetaUtil.identityHashCodeString;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+import jdk.vm.ci.meta.Assumptions.Assumption;
+import jdk.vm.ci.meta.InvokeTarget;
+import jdk.vm.ci.meta.JavaConstant;
+import jdk.vm.ci.meta.MetaUtil;
+import jdk.vm.ci.meta.ResolvedJavaMethod;
+import jdk.vm.ci.meta.VMConstant;
 
 /**
  * Represents the output from compiling a method, including the compiled machine code, associated
  * data and references, relocation information, deoptimization information, etc.
  */

@@ -126,12 +137,10 @@
     /**
      * Represents a meta space pointer access in the code.
      */
     public static final class MetaSpaceAccess extends Infopoint {
 
-        private static final long serialVersionUID = 1701958512608684706L;
-
         /**
          * Metaspace reference.
          */
         public final Object reference; // Object here is a HotSpotResolvedObjectType or a
                                        // HotSpotMetaSpaceConstant

@@ -294,10 +303,19 @@
                 DataSectionReference that = (DataSectionReference) obj;
                 return this.offset == that.offset;
             }
             return false;
         }
+
+        @Override
+        public String toString() {
+            if (initialized) {
+                return String.format("DataSection[0x%x]", offset);
+            } else {
+                return "DataSection[?]";
+            }
+        }
     }
 
     /**
      * Represents a code site that references some data. The associated data can be either a
      * {@link DataSectionReference reference} to the data section, or it may be an inlined

@@ -526,12 +544,10 @@
             }
             return false;
         }
     }
 
-    private int id = -1;
-
     /**
      * Specifies whether this compilation is a {@code +ImmutableCode} {@code +GeneratePIC}
      * compilation.
      */
     private final boolean isImmutablePIC;

@@ -610,11 +626,10 @@
         }
         if (obj != null && obj.getClass() == getClass()) {
             CompilationResult that = (CompilationResult) obj;
             // @formatter:off
             if (this.entryBCI == that.entryBCI &&
-                this.id == that.id &&
                 this.customStackAreaOffset == that.customStackAreaOffset &&
                 this.totalFrameSize == that.totalFrameSize &&
                 this.targetCodeSize == that.targetCodeSize &&
                 Objects.equals(this.name, that.name) &&
                 Objects.equals(this.annotations, that.annotations) &&

@@ -631,24 +646,10 @@
         }
         return false;
     }
 
     /**
-     * @return the compile id
-     */
-    public int getId() {
-        return id;
-    }
-
-    /**
-     * @param id the compile id to set
-     */
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    /**
      * @return true is this is a {@code +ImmutableCode} {@code +GeneratePIC} compilation, false
      *         otherwise.
      */
     public boolean isImmutablePIC() {
         return isImmutablePIC;
< prev index next >