# HG changeset patch # User Christian Haeubl # Date 1328764415 28800 # Node ID 6c6cb7be1324dbba0c747cccf366e272e8332acc # Parent fc78ad20ec384e32d5d0469795e0d535affd3759 bugfix diff -r fc78ad20ec38 -r 6c6cb7be1324 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java Wed Feb 08 20:30:47 2012 -0800 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java Wed Feb 08 21:13:35 2012 -0800 @@ -542,7 +542,7 @@ if (GraalOptions.InlineMonomorphicCalls) { RiResolvedType type = types[0]; RiResolvedMethod concrete = type.resolveMethodImpl(callTarget.targetMethod()); - if (concrete != null && checkTargetConditions(concrete)) { + if (checkTargetConditions(concrete)) { double weight = callback == null ? 0 : callback.inliningWeight(parent, concrete, invoke); return new TypeGuardInlineInfo(invoke, weight, level, concrete, type); } @@ -580,7 +580,7 @@ double totalWeight = 0; boolean canInline = true; for (RiResolvedMethod concrete: concreteMethods) { - if (concrete == null || !checkTargetConditions(concrete)) { + if (!checkTargetConditions(concrete)) { canInline = false; break; } @@ -637,6 +637,10 @@ } private static boolean checkTargetConditions(RiMethod method) { + if (method == null) { + Debug.log("method not resolved"); + return false; + } if (!(method instanceof RiResolvedMethod)) { Debug.log("not inlining %s because it is unresolved", method.toString()); return false;