comparison 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
comparison
equal deleted inserted replaced
2821:015be60afcf3 2827:bd17ac598c6e
60 /** 60 /**
61 * Creates a new StoreIndexed instruction. 61 * Creates a new StoreIndexed instruction.
62 * @param array the instruction producing the array 62 * @param array the instruction producing the array
63 * @param index the instruction producing the index 63 * @param index the instruction producing the index
64 * @param length the instruction producing the length 64 * @param length the instruction producing the length
65 * @param elementType the element type 65 * @param elementKind the element type
66 * @param value the value to store into the array 66 * @param value the value to store into the array
67 * @param stateAfter the state after executing this instruction 67 * @param stateAfter the state after executing this instruction
68 * @param graph 68 * @param graph
69 */ 69 */
70 public StoreIndexed(Value array, Value index, Value length, CiKind elementType, Value value, Graph graph) { 70 public StoreIndexed(Value array, Value index, Value length, CiKind elementKind, Value value, Graph graph) {
71 super(CiKind.Void, array, index, length, elementType, INPUT_COUNT, SUCCESSOR_COUNT, graph); 71 super(CiKind.Void, array, index, length, elementKind, INPUT_COUNT, SUCCESSOR_COUNT, graph);
72 setValue(value); 72 setValue(value);
73 } 73 }
74 74
75 @Override 75 @Override
76 public void accept(ValueVisitor v) { 76 public void accept(ValueVisitor v) {
79 79
80 @Override 80 @Override
81 public void print(LogStream out) { 81 public void print(LogStream out) {
82 out.print(array()).print('[').print(index()).print("] := ").print(value()).print(" (").print(kind.typeChar).print(')'); 82 out.print(array()).print('[').print(index()).print("] := ").print(value()).print(" (").print(kind.typeChar).print(')');
83 } 83 }
84
85 @Override
86 public Node copy(Graph into) {
87 StoreIndexed x = new StoreIndexed(null, null, null, elementKind(), null, into);
88 x.setNonNull(isNonNull());
89 return x;
90 }
84 } 91 }