diff graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java @ 4441:4e3aaf14cbc6

fixed graal to hotspot
author Christian Haeubl <christian.haeubl@oracle.com>
date Mon, 23 Jan 2012 13:22:43 -0800
parents aaac4894175c
children c0430421d43d
line wrap: on
line diff
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java	Fri Jan 20 18:24:17 2012 -0800
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiTypeProfile.java	Mon Jan 23 13:22:43 2012 -0800
@@ -29,33 +29,33 @@
  * the supplied values may vary, but a runtime that provides this information should be aware that it will be used to
  * guide performance-critical decisions like speculative inlining, etc.
  */
-public class RiTypeProfile implements Serializable {
-
+public final class RiTypeProfile implements Serializable {
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = -6877016333706838441L;
 
-    /**
-     * How often the instruction was executed, which may be used to judge the maturity of this profile.
-     */
-    public int count;
+    private RiResolvedType[] types;
+    private double[] probabilities;
+
+    public RiTypeProfile(RiResolvedType[] types, double[] probabilites) {
+        this.types = types;
+        this.probabilities = probabilites;
+    }
 
     /**
-     * An estimation of how many different receiver types were encountered. This may or may not be the same as
-     * probabilities.length/types.length, as the runtime may store probabilities for a limited number of receivers.
+     * The estimated probabilities of the different receivers. This array needs to have the same length as
+     * {@link RiTypeProfile#types}.
      */
-    public int morphism;
+    public double[] getProbabilities() {
+        return probabilities;
+    }
 
     /**
      * A list of receivers for which the runtime has recorded probability information. This array needs to have the same
      * length as {@link RiTypeProfile#probabilities}.
      */
-    public RiResolvedType[] types;
-
-    /**
-     * The estimated probabilities of the different receivers. This array needs to have the same length as
-     * {@link RiTypeProfile#types}.
-     */
-    public float[] probabilities;
+    public RiResolvedType[] getTypes() {
+        return types;
+    }
 }