Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/ir/Arithmetic.java @ 2876:7d7cf33f8466
Subclasses for arithmetic
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 22:51:22 +0200 |
parents | c6bdec623ef9 |
children |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Arithmetic.java Tue Jun 07 19:06:20 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Arithmetic.java Tue Jun 07 22:51:22 2011 +0200 @@ -30,12 +30,11 @@ /** * The {@code ArithmeticOp} class represents arithmetic operations such as addition, subtraction, etc. */ -public final class Arithmetic extends Binary { +public abstract class Arithmetic extends Binary { private static final int INPUT_COUNT = 0; private static final int SUCCESSOR_COUNT = 0; - private final boolean canTrap; private final boolean isStrictFP; /** @@ -47,10 +46,9 @@ * @param isStrictFP indicates this operation has strict rounding semantics * @param stateBefore the state for instructions that may trap */ - public Arithmetic(int opcode, CiKind kind, Value x, Value y, boolean isStrictFP, boolean canTrap, Graph graph) { + public Arithmetic(CiKind kind, int opcode, Value x, Value y, boolean isStrictFP, Graph graph) { super(kind, opcode, x, y, INPUT_COUNT, SUCCESSOR_COUNT, graph); this.isStrictFP = isStrictFP; - this.canTrap = canTrap; } /** @@ -72,17 +70,9 @@ @Override public void print(LogStream out) { - out.print(x()).print(' ').print(Bytecodes.operator(opcode)).print(' ').print(y()); + out.print(x()).print(' ').print(this.shortName()).print(' ').print(y()); } @Override - public String shortName() { - return Bytecodes.operator(opcode); - } - - @Override - public Node copy(Graph into) { - Arithmetic x = new Arithmetic(opcode, kind, null, null, isStrictFP, canTrap, into); - return x; - } + public abstract String shortName(); }