Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeChildData.java @ 13528:5a0c694ef735
Truffle-DSL: Removed API classes NodeId, NodeContainer and SpecializationListener.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 07 Jan 2014 18:52:32 +0100 |
parents | 25ecb47a6d0e |
children | 8db6e76cb658 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeChildData.java Tue Jan 07 12:22:47 2014 +0100 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeChildData.java Tue Jan 07 18:52:32 2014 +0100 @@ -45,24 +45,20 @@ } } - private final NodeData parent; + private NodeData parentNode; private final Element sourceElement; private final AnnotationMirror sourceAnnotationMirror; - private final String name; private final TypeMirror type; private final TypeMirror originalType; private final Element accessElement; - private final Cardinality cardinality; private List<NodeChildData> executeWith = Collections.emptyList(); - private NodeData nodeData; + private NodeData childNode; - public NodeChildData(NodeData parent, Element sourceElement, AnnotationMirror sourceMirror, String name, TypeMirror nodeType, TypeMirror originalNodeType, Element accessElement, - Cardinality cardinality) { - this.parent = parent; + public NodeChildData(Element sourceElement, AnnotationMirror sourceMirror, String name, TypeMirror nodeType, TypeMirror originalNodeType, Element accessElement, Cardinality cardinality) { this.sourceElement = sourceElement; this.sourceAnnotationMirror = sourceMirror; this.name = name; @@ -72,6 +68,10 @@ this.cardinality = cardinality; } + void setParentNode(NodeData parentNode) { + this.parentNode = parentNode; + } + public List<NodeChildData> getExecuteWith() { return executeWith; } @@ -81,12 +81,12 @@ } public boolean needsImplicitCast(ProcessorContext context) { - if (!parent.needsRewrites(context)) { + if (!parentNode.needsRewrites(context)) { return false; } boolean used = false; - for (NodeExecutionData execution : parent.getChildExecutions()) { + for (NodeExecutionData execution : parentNode.getChildExecutions()) { if (execution.getChild() == this) { used = true; break; @@ -100,7 +100,7 @@ } public ExecutableTypeData findExecutableType(ProcessorContext context, TypeData targetType) { - ExecutableTypeData executableType = nodeData.findExecutableType(targetType, getExecuteWith().size()); + ExecutableTypeData executableType = childNode.findExecutableType(targetType, getExecuteWith().size()); if (executableType == null) { executableType = findAnyGenericExecutableType(context); } @@ -108,15 +108,15 @@ } public List<ExecutableTypeData> findGenericExecutableTypes(ProcessorContext context) { - return nodeData.findGenericExecutableTypes(context, getExecuteWith().size()); + return childNode.findGenericExecutableTypes(context, getExecuteWith().size()); } public ExecutableTypeData findAnyGenericExecutableType(ProcessorContext context) { - return nodeData.findAnyGenericExecutableType(context, getExecuteWith().size()); + return childNode.findAnyGenericExecutableType(context, getExecuteWith().size()); } public List<ExecutableTypeData> findExecutableTypes() { - return nodeData.getExecutableTypes(getExecuteWith().size()); + return childNode.getExecutableTypes(getExecuteWith().size()); } public TypeMirror getOriginalType() { @@ -134,7 +134,7 @@ } void setNode(NodeData nodeData) { - this.nodeData = nodeData; + this.childNode = nodeData; if (nodeData != null) { getMessages().addAll(nodeData.collectMessages()); } @@ -153,7 +153,7 @@ } public NodeData getNodeData() { - return nodeData; + return childNode; } public String getName() {