Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeFieldData.java @ 8252:0905d796944a
Refactored codegen error model to make error redirection a lot easier.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Mar 2013 19:58:28 +0100 |
parents | cb70ed101b5f |
children | 89006c76f737 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeFieldData.java Wed Mar 13 11:32:43 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeFieldData.java Wed Mar 13 19:58:28 2013 +0100 @@ -25,7 +25,9 @@ import javax.lang.model.element.*; import javax.lang.model.type.*; -public class NodeFieldData { +import com.oracle.truffle.codegen.processor.template.*; + +public class NodeFieldData extends MessageContainer { public enum FieldKind { CHILD, CHILDREN @@ -43,11 +45,10 @@ private final ExecutionKind executionKind; private NodeData nodeData; - public NodeFieldData(NodeData typeNodeData, VariableElement fieldElement, Element accessElement, AnnotationMirror childAnnotationMirror, FieldKind fieldKind, ExecutionKind executionKind) { + public NodeFieldData(VariableElement fieldElement, Element accessElement, AnnotationMirror childAnnotationMirror, FieldKind fieldKind, ExecutionKind executionKind) { this.fieldElement = fieldElement; this.accessElement = accessElement; this.childAnnotationMirror = childAnnotationMirror; - this.nodeData = typeNodeData; this.fieldKind = fieldKind; this.executionKind = executionKind; } @@ -61,12 +62,18 @@ this.nodeData = field.nodeData; } + @Override + public Element getMessageElement() { + return fieldElement; + } + public boolean isShortCircuit() { return executionKind == ExecutionKind.SHORT_CIRCUIT; } void setNode(NodeData nodeData) { this.nodeData = nodeData; + getMessages().addAll(nodeData.collectMessages()); } public VariableElement getFieldElement() {