Mercurial > hg > graal-compiler
changeset 21155:754f2b20d8bc graal-0.7
Skip invokes with a placeholder framestate in MethodCallTargetNode.simplify
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Wed, 29 Apr 2015 17:28:50 +0200 |
parents | 271eee87201c |
children | 060e6f7ac89e |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java Wed Apr 29 15:27:00 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java Wed Apr 29 17:28:50 2015 +0200 @@ -22,6 +22,7 @@ */ package com.oracle.graal.nodes.java; +import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.api.meta.Assumptions.AssumptionResult; import com.oracle.graal.compiler.common.type.*; @@ -149,6 +150,11 @@ @Override public void simplify(SimplifierTool tool) { // attempt to devirtualize the call + if (invoke().getContextMethod() == null) { + // avoid invokes that have placeholder bcis: they do not have a valid contextType + assert (invoke().stateAfter() != null && BytecodeFrame.isPlaceholderBci(invoke().stateAfter().bci)) || BytecodeFrame.isPlaceholderBci(invoke().stateDuring().bci); + return; + } ResolvedJavaType contextType = (invoke().stateAfter() == null && invoke().stateDuring() == null) ? null : invoke().getContextType(); ResolvedJavaMethod specialCallTarget = findSpecialCallTarget(invokeKind, receiver(), targetMethod, contextType); if (specialCallTarget != null) {