# HG changeset patch # User Miguel Garcia # Date 1400760901 -7200 # Node ID 3e55e9614af7d0dfc15ee01b968d0c4516dbcbec # Parent ebe257551ffd46b2aa896744ea5a7462e2071f21 [inlining] check maxMethodPerInlining after discarding methods below threshold diff -r ebe257551ffd -r 3e55e9614af7 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java Thu May 22 11:18:11 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java Thu May 22 14:15:01 2014 +0200 @@ -264,11 +264,6 @@ } } - if (concreteMethods.size() > maxMethodPerInlining) { - InliningUtil.logNotInlinedInvoke(invoke, inliningDepth(), targetMethod, "polymorphic call with more than %d target methods", maxMethodPerInlining); - return null; - } - // Clear methods that fall below the threshold. if (notRecordedTypeProbability > 0) { ArrayList newConcreteMethods = new ArrayList<>(); @@ -291,6 +286,11 @@ concreteMethodsProbabilities = newConcreteMethodsProbabilities; } + if (concreteMethods.size() > maxMethodPerInlining) { + InliningUtil.logNotInlinedInvoke(invoke, inliningDepth(), targetMethod, "polymorphic call with more than %d target methods", maxMethodPerInlining); + return null; + } + // Clean out types whose methods are no longer available. ArrayList usedTypes = new ArrayList<>(); ArrayList typesToConcretes = new ArrayList<>();