Mercurial > hg > truffle
changeset 9350:e7c396ce0f3d
better error message for incorrect usage of @NodeIntrinsic
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 26 Apr 2013 22:56:18 +0200 |
parents | 430707bc6f58 |
children | 4bf3af9abdfb |
files | graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPhase.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPhase.java Fri Apr 26 22:20:20 2013 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPhase.java Fri Apr 26 22:56:18 2013 +0200 @@ -22,6 +22,8 @@ */ package com.oracle.graal.replacements; +import static com.oracle.graal.api.meta.MetaUtil.*; + import java.lang.reflect.*; import java.util.*; @@ -178,7 +180,8 @@ } else { result = runtime.lookupJavaType(intrinsic.value()); } - assert runtime.lookupJavaType(ValueNode.class).isAssignableFrom(result); + assert runtime.lookupJavaType(ValueNode.class).isAssignableFrom(result) : "Node intrinsic class " + toJavaName(result, false) + " derived from @" + NodeIntrinsic.class.getSimpleName() + + " annotation on " + format("%H.%n(%p)", target) + " is not a subclass of " + ValueNode.class; return result; }