Mercurial > hg > truffle
changeset 7545:b30b33d9da80
sanity checks for SnippetInstaller.installSubstitutions()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 24 Jan 2013 08:16:41 +0100 |
parents | 5d9c23b8dbb8 |
children | 727e869891fc |
files | graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetInstaller.java |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetInstaller.java Wed Jan 23 22:39:57 2013 +0100 +++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetInstaller.java Thu Jan 24 08:16:41 2013 +0100 @@ -105,6 +105,8 @@ public void installSubstitutions(Class<?> substitutions) { assert owner == Thread.currentThread() : "substitution installation must be single threaded"; ClassSubstitution classSubstitution = substitutions.getAnnotation(ClassSubstitution.class); + assert classSubstitution != null; + assert !SnippetsInterface.class.isAssignableFrom(substitutions); for (Method substituteMethod : substitutions.getDeclaredMethods()) { MethodSubstitution methodSubstitution = substituteMethod.getAnnotation(MethodSubstitution.class); MacroSubstitution macroSubstitution = substituteMethod.getAnnotation(MacroSubstitution.class);