Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/ir/ShiftOp.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 | 092e628ddd5d |
children | 14708c03abba |
comparison
equal
deleted
inserted
replaced
2821:015be60afcf3 | 2827:bd17ac598c6e |
---|---|
23 package com.sun.c1x.ir; | 23 package com.sun.c1x.ir; |
24 | 24 |
25 import com.oracle.graal.graph.*; | 25 import com.oracle.graal.graph.*; |
26 import com.sun.c1x.debug.*; | 26 import com.sun.c1x.debug.*; |
27 import com.sun.cri.bytecode.*; | 27 import com.sun.cri.bytecode.*; |
28 import com.sun.cri.ci.*; | |
28 | 29 |
29 /** | 30 /** |
30 * The {@code ShiftOp} class represents shift operations. | 31 * The {@code ShiftOp} class represents shift operations. |
31 */ | 32 */ |
32 public final class ShiftOp extends Op2 { | 33 public final class ShiftOp extends Op2 { |
42 */ | 43 */ |
43 public ShiftOp(int opcode, Value x, Value y, Graph graph) { | 44 public ShiftOp(int opcode, Value x, Value y, Graph graph) { |
44 super(x.kind, opcode, x, y, INPUT_COUNT, SUCCESSOR_COUNT, graph); | 45 super(x.kind, opcode, x, y, INPUT_COUNT, SUCCESSOR_COUNT, graph); |
45 } | 46 } |
46 | 47 |
48 private ShiftOp(CiKind kind, int opcode, Graph graph) { | |
49 super(kind, opcode, null, null, INPUT_COUNT, SUCCESSOR_COUNT, graph); | |
50 } | |
51 | |
47 @Override | 52 @Override |
48 public void accept(ValueVisitor v) { | 53 public void accept(ValueVisitor v) { |
49 v.visitShiftOp(this); | 54 v.visitShiftOp(this); |
50 } | 55 } |
51 | 56 |
52 @Override | 57 @Override |
53 public void print(LogStream out) { | 58 public void print(LogStream out) { |
54 out.print(x()).print(' ').print(Bytecodes.operator(opcode)).print(' ').print(y()); | 59 out.print(x()).print(' ').print(Bytecodes.operator(opcode)).print(' ').print(y()); |
55 } | 60 } |
61 | |
62 @Override | |
63 public Node copy(Graph into) { | |
64 ShiftOp x = new ShiftOp(kind, opcode, into); | |
65 x.setNonNull(isNonNull()); | |
66 return x; | |
67 } | |
56 } | 68 } |