< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordOperationPlugin.java

Print this page

        

@@ -266,10 +266,13 @@
                     return;
             }
         }
 
         Word.Operation operation = BridgeMethodUtils.getAnnotation(Word.Operation.class, wordMethod);
+        if (operation == null) {
+            throw bailout(b, "Cannot call method on a word value: " + wordMethod.format("%H.%n(%p)"));
+        }
         switch (operation.opcode()) {
             case NODE_CLASS:
                 assert args.length == 2;
                 ValueNode left = args[0];
                 ValueNode right = operation.rightOperandIsInt() ? toUnsigned(b, args[1], JavaKind.Int) : fromSigned(b, args[1]);
< prev index next >