changeset 20039:c38296febf23

don't process Word operations unless parsing a snippet or intrinsic
author Doug Simon <doug.simon@oracle.com>
date Thu, 26 Mar 2015 11:39:07 +0100
parents bbf53b35292e
children f137f1974f60
files graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultGenericInvocationPlugin.java graal/com.oracle.graal.word/src/com/oracle/graal/word/WordTypes.java
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultGenericInvocationPlugin.java	Thu Mar 26 11:38:27 2015 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultGenericInvocationPlugin.java	Thu Mar 26 11:39:07 2015 +0100
@@ -50,7 +50,7 @@
     }
 
     public boolean apply(GraphBuilderContext b, ResolvedJavaMethod method, ValueNode[] args) {
-        if (wordOperationPlugin.apply(b, method, args)) {
+        if (b.parsingReplacement() && wordOperationPlugin.apply(b, method, args)) {
             return true;
         } else if (b.parsingReplacement()) {
             NodeIntrinsic intrinsic = nodeIntrinsification.getIntrinsic(method);
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/WordTypes.java	Thu Mar 26 11:38:27 2015 +0100
+++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/WordTypes.java	Thu Mar 26 11:39:07 2015 +0100
@@ -91,6 +91,7 @@
             assert wordImplType.isLinked();
             wordMethod = wordImplType.resolveConcreteMethod(targetMethod, callingContextType);
         }
+        assert wordMethod != null : targetMethod;
         assert wordMethod.getAnnotation(Operation.class) != null : wordMethod;
         return wordMethod;
     }