Mercurial > hg > truffle
changeset 20865:9c8743f5ff53
InvocationPlugins can only be applied for direct invokes
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 09 Apr 2015 10:26:28 +0200 |
parents | 43659a795e37 |
children | 56ff43bb250a |
files | graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64MathIntrinsicNode.java graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64MathSubstitutions.java |
diffstat | 1 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Thu Apr 09 09:52:33 2015 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Thu Apr 09 10:26:28 2015 +0200 @@ -1128,15 +1128,17 @@ return; } - if (tryInvocationPlugin(args, targetMethod, resultType)) { - if (TraceParserPlugins.getValue()) { - traceWithContext("used invocation plugin for %s", targetMethod.format("%h.%n(%p)")); + if (invokeKind.isDirect()) { + if (tryInvocationPlugin(args, targetMethod, resultType)) { + if (TraceParserPlugins.getValue()) { + traceWithContext("used invocation plugin for %s", targetMethod.format("%h.%n(%p)")); + } + return; } - return; - } - if (tryInline(args, targetMethod, invokeKind, returnType)) { - return; + if (tryInline(args, targetMethod, returnType)) { + return; + } } } finally { currentInvokeReturnType = null; @@ -1249,10 +1251,10 @@ return plugin != null && plugin.apply(this, targetMethod, args); } - private boolean tryInline(ValueNode[] args, ResolvedJavaMethod targetMethod, InvokeKind invokeKind, JavaType returnType) { + private boolean tryInline(ValueNode[] args, ResolvedJavaMethod targetMethod, JavaType returnType) { InlineInvokePlugin plugin = graphBuilderConfig.getPlugins().getInlineInvokePlugin(); boolean canBeInlined = parsingReplacement() || targetMethod.canBeInlined(); - if (plugin == null || !invokeKind.isDirect() || !canBeInlined) { + if (plugin == null || !canBeInlined) { return false; } InlineInfo inlineInfo = plugin.getInlineInfo(this, targetMethod, args, returnType);