diff graal/GraalCompiler/src/com/sun/c1x/ir/StoreIndexed.java @ 2827:bd17ac598c6e

Graph cloning, initial version (not completely working)
author Lukas Stadler <lukas.stadler@jku.at>
date Mon, 30 May 2011 18:46:57 +0200
parents 569228710be8
children 14708c03abba
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/StoreIndexed.java	Mon May 30 17:05:06 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/StoreIndexed.java	Mon May 30 18:46:57 2011 +0200
@@ -62,13 +62,13 @@
      * @param array the instruction producing the array
      * @param index the instruction producing the index
      * @param length the instruction producing the length
-     * @param elementType the element type
+     * @param elementKind the element type
      * @param value the value to store into the array
      * @param stateAfter the state after executing this instruction
      * @param graph
      */
-    public StoreIndexed(Value array, Value index, Value length, CiKind elementType, Value value, Graph graph) {
-        super(CiKind.Void, array, index, length, elementType, INPUT_COUNT, SUCCESSOR_COUNT, graph);
+    public StoreIndexed(Value array, Value index, Value length, CiKind elementKind, Value value, Graph graph) {
+        super(CiKind.Void, array, index, length, elementKind, INPUT_COUNT, SUCCESSOR_COUNT, graph);
         setValue(value);
     }
 
@@ -81,4 +81,11 @@
     public void print(LogStream out) {
         out.print(array()).print('[').print(index()).print("] := ").print(value()).print(" (").print(kind.typeChar).print(')');
     }
+
+    @Override
+    public Node copy(Graph into) {
+        StoreIndexed x = new StoreIndexed(null, null, null, elementKind(), null, into);
+        x.setNonNull(isNonNull());
+        return x;
+    }
 }