MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / IntegerAddition

Class IntegerAddition

src/main/java/wyil/lang/WyilFile.java:3755–3786  ·  view source on GitHub ↗

Represents an integer addition expression of the form " e1 + e2 " where e1 and e2 are the operand expressions . @author David J. Pearce

Source from the content-addressed store, hash-verified

3753 *
3754 */
3755 public static class IntegerAddition extends AbstractExpr implements BinaryOperator {
3756 public IntegerAddition(Type type, Expr lhs, Expr rhs) {
3757 super(EXPR_integeraddition, type, lhs, rhs);
3758 }
3759
3760 @Override
3761 public Expr getFirstOperand() {
3762 return (Expr) super.get(1);
3763 }
3764
3765 @Override
3766 public Expr getSecondOperand() {
3767 return (Expr) super.get(2);
3768 }
3769
3770 @Override
3771 public Expr clone(Syntactic.Item[] operands) {
3772 return new IntegerAddition((Type) operands[0], (Expr) operands[1], (Expr) operands[2]);
3773 }
3774
3775 @Override
3776 public String toString() {
3777 return " + ";
3778 }
3779
3780 public static final Descriptor DESCRIPTOR_0 = new Descriptor(Operands.THREE, Data.ZERO, "EXPR_integeraddition") {
3781 @Override
3782 public Syntactic.Item construct(int opcode, Syntactic.Item[] operands, byte[] data) {
3783 return new IntegerAddition((Type) operands[0], (Expr) operands[1], (Expr) operands[2]);
3784 }
3785 };
3786 }
3787
3788 /**
3789 * Represents an integer <i>subtraction expression</i> of the form

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected