changeset 11697:56e59e384dc1

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 18 Sep 2013 02:41:52 +0200
parents 7f8c80e31750 (current diff) 8d0303d8dbde (diff)
children 4eec2ac671c2
files
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java	Wed Sep 18 02:41:41 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java	Wed Sep 18 02:41:52 2013 +0200
@@ -407,7 +407,7 @@
         }
     }
 
-    private static final class GreedyInliningPolicy extends AbstractInliningPolicy {
+    public static class GreedyInliningPolicy extends AbstractInliningPolicy {
 
         public GreedyInliningPolicy(Map<Invoke, Double> hints) {
             super(hints);
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java	Wed Sep 18 02:41:41 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java	Wed Sep 18 02:41:52 2013 +0200
@@ -350,10 +350,11 @@
      * Represents an inlining opportunity where the compiler can statically determine a monomorphic
      * target method and therefore is able to determine the called method exactly.
      */
-    private static class ExactInlineInfo extends AbstractInlineInfo {
+    public static class ExactInlineInfo extends AbstractInlineInfo {
 
         protected final ResolvedJavaMethod concrete;
         private Inlineable inlineableElement;
+        private boolean suppressNullCheck;
 
         public ExactInlineInfo(Invoke invoke, ResolvedJavaMethod concrete) {
             super(invoke);
@@ -361,9 +362,13 @@
             assert concrete != null;
         }
 
+        public void suppressNullCheck() {
+            suppressNullCheck = true;
+        }
+
         @Override
         public void inline(MetaAccessProvider runtime, Assumptions assumptions, Replacements replacements) {
-            inline(invoke, concrete, inlineableElement, assumptions, true);
+            inline(invoke, concrete, inlineableElement, assumptions, !suppressNullCheck);
         }
 
         @Override
@@ -1020,7 +1025,7 @@
 
     /**
      * Determines if inlining is possible at the given invoke node.
-     * 
+     *
      * @param invoke the invoke that should be inlined
      * @return an instance of InlineInfo, or null if no inlining is possible at the given invoke
      */
@@ -1282,7 +1287,7 @@
 
     /**
      * Performs an actual inlining, thereby replacing the given invoke with the given inlineGraph.
-     * 
+     *
      * @param invoke the invoke that will be replaced
      * @param inlineGraph the graph that the invoke will be replaced with
      * @param receiverNullCheck true if a null check needs to be generated for non-static inlinings,