diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeData.java @ 13535:e8ef44830b50

Truffle-DSL: fixed bugs due to previous cleanup. addtional cleanup.
author Christian Humer <christian.humer@gmail.com>
date Tue, 07 Jan 2014 22:06:37 +0100
parents 5a0c694ef735
children 64dcb92ee75a
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeData.java	Tue Jan 07 20:21:17 2014 +0100
+++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeData.java	Tue Jan 07 22:06:37 2014 +0100
@@ -28,6 +28,7 @@
 import javax.lang.model.type.*;
 
 import com.oracle.truffle.dsl.processor.*;
+import com.oracle.truffle.dsl.processor.node.NodeChildData.*;
 import com.oracle.truffle.dsl.processor.template.*;
 import com.oracle.truffle.dsl.processor.typesystem.*;
 
@@ -51,6 +52,8 @@
     private final List<CreateCastData> casts = new ArrayList<>();
     private Map<Integer, List<ExecutableTypeData>> executableTypes;
 
+    private final NodeExecutionData thisExecution;
+
     private int polymorphicDepth = -1;
 
     public NodeData(TypeElement type, String shortName, TypeSystemData typeSystem, List<NodeChildData> children, List<NodeExecutionData> executions, List<NodeFieldData> fields,
@@ -64,7 +67,8 @@
         this.childExecutions = executions;
         this.assumptions = assumptions;
         this.polymorphicDepth = polymorphicDepth;
-
+        this.thisExecution = new NodeExecutionData(new NodeChildData(null, null, "this", getNodeType(), getNodeType(), null, Cardinality.ONE), -1, false);
+        this.thisExecution.getChild().setNode(this);
         if (children != null) {
             for (NodeChildData child : children) {
                 child.setParentNode(this);
@@ -76,6 +80,10 @@
         this(type, null, null, null, null, null, null, -1);
     }
 
+    public NodeExecutionData getThisExecution() {
+        return thisExecution;
+    }
+
     public void addEnclosedNode(NodeData node) {
         this.enclosingNodes.add(node);
         node.declaringNode = this;