# HG changeset patch # User Thomas Wuerthinger # Date 1379464912 -7200 # Node ID 56e59e384dc1eb3424c1ffc514dfd31793106a44 # Parent 7f8c80e317505e2a2ad67356eb2c46c206f406df# Parent 8d0303d8dbde4aaad943784e079ed14cd96d68dd Merge. diff -r 7f8c80e31750 -r 56e59e384dc1 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java --- 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 hints) { super(hints); diff -r 7f8c80e31750 -r 56e59e384dc1 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java --- 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,