Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/MessageContainer.java @ 8310:89006c76f737
Final fields of base node can be optionally passed to builtin specialization method. And a few fixes.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 15 Mar 2013 21:18:33 +0100 |
parents | 4dc7034317ec |
children | 88e3893dc0a8 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/MessageContainer.java Thu Mar 14 13:13:59 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/MessageContainer.java Fri Mar 15 21:18:33 2013 +0100 @@ -67,7 +67,8 @@ } private void emitDefault(TypeElement baseType, Log log, Message message) { - if (Utils.typeEquals(baseType.asType(), Utils.findRootEnclosingType(getMessageElement()).asType()) && this == message.getOriginalContainer()) { + TypeElement rootEnclosing = Utils.findRootEnclosingType(getMessageElement()); + if (rootEnclosing != null && Utils.typeEquals(baseType.asType(), rootEnclosing.asType()) && this == message.getOriginalContainer()) { log.message(message.getKind(), getMessageElement(), getMessageAnnotation(), getMessageAnnotationValue(), message.getText()); } else { MessageContainer original = message.getOriginalContainer();