diff graal/GraalGraph/src/com/oracle/graal/graph/Node.java @ 2616:3558ca7088c0

FrameState and Graphviz changes: * removed popx, pushx methods from GraphBuilder * FrameState subclass of Value * added String shortName() to Node * added GraphvizPrinter option to use short names * small hack in GraphvizPrinter: omit FrameState->Local connections * added GraalGraphviz to implicit classpatch (read from GRAAL env var)
author Lukas Stadler <lukas.stadler@jku.at>
date Mon, 09 May 2011 17:00:25 +0200
parents 06b2eac2f5d3
children 6ab73784566a
line wrap: on
line diff
--- a/graal/GraalGraph/src/com/oracle/graal/graph/Node.java	Mon May 09 14:11:13 2011 +0200
+++ b/graal/GraalGraph/src/com/oracle/graal/graph/Node.java	Mon May 09 17:00:25 2011 +0200
@@ -75,6 +75,10 @@
         return graph;
     }
 
+    public String shortName() {
+        return getClass().getSimpleName();
+    }
+
     public void replace(Node other) {
         assert !isDeleted() && !other.isDeleted();
         assert other == null || other.graph == graph;
@@ -161,8 +165,7 @@
         }
 
         public Node set(int index, Node node) {
-            // TODO: re-enable after Value class layout changes
-//            assert node == Null || node.graph == self().graph;
+            assert node == Null || node.graph == self().graph;
             Node old = nodes[index];
 
             if (old != node) {
@@ -188,6 +191,13 @@
             return old;
         }
 
+        public void setAll(NodeArray other) {
+            assert size() == other.size();
+            for (int i = 0; i < other.size(); i++) {
+                set(i, other.get(i));
+            }
+        }
+
         public Node get(int index) {
             return nodes[index];
         }