Mercurial > hg > truffle
changeset 5791:506e76281145
(symptomatic) fix for NPE in InliningUtil
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Sat, 07 Jul 2012 12:53:00 +0200 |
parents | 7e397af98eab |
children | fa6ed51ac198 6a725f3c4bb0 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java Fri Jul 06 17:34:21 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java Sat Jul 07 12:53:00 2012 +0200 @@ -372,14 +372,14 @@ */ FixedNode current = returnMerge; int opportunities = 0; - while (current instanceof FixedWithNextNode) { - current = ((FixedWithNextNode) current).next(); + do { if (current instanceof InvokeNode && ((InvokeNode) current).callTarget().receiver() == originalReceiver) { opportunities++; } else if (current.inputs().contains(originalReceiver)) { opportunities++; } - } + current = ((FixedWithNextNode) current).next(); + } while (current instanceof FixedWithNextNode); if (opportunities > 0) { metricInliningTailDuplication.increment(); Debug.log("MultiTypeGuardInlineInfo starting tail duplication (%d opportunities)", opportunities);