Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/TruffleTypes.java @ 11466:4830676526e3
Truffle-DSL: added infrastructure to assert for DSL error messages.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 29 Aug 2013 17:39:55 +0200 |
parents | a0309f88306c |
children | 85b846b31690 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/TruffleTypes.java Thu Aug 29 14:28:43 2013 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/TruffleTypes.java Thu Aug 29 17:39:55 2013 +0200 @@ -30,6 +30,7 @@ import com.oracle.truffle.api.*; import com.oracle.truffle.api.CompilerDirectives.*; +import com.oracle.truffle.api.dsl.*; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.nodes.*; import com.oracle.truffle.api.nodes.Node.Child; @@ -56,6 +57,7 @@ private final TypeMirror compilerAsserts; private final DeclaredType slowPath; private final DeclaredType truffleOptions; + private final TypeElement expectError; private final List<String> errors = new ArrayList<>(); @@ -74,6 +76,11 @@ nodeInfoKind = getRequired(context, NodeInfo.Kind.class); slowPath = getRequired(context, SlowPath.class); truffleOptions = getRequired(context, TruffleOptions.class); + expectError = (TypeElement) getRequired(context, ExpectError.class).asElement(); + } + + public TypeElement getExpectError() { + return expectError; } public DeclaredType getNodeInfoAnnotation() {