use of org.candle.decompiler.intermediate.expression.Expression in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitIFNONNULL.
@Override
public void visitIFNONNULL(IFNONNULL instruction) {
Expression left = context.getExpressions().pop();
Expression right = new NullLiteral(context.getCurrentInstruction());
MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.NE);
BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
context.pushIntermediateToInstruction(line);
}
use of org.candle.decompiler.intermediate.expression.Expression in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitDUP2_X2.
public void visitDUP2_X2(DUP2_X2 instruction) {
Expression one = context.getExpressions().pop();
Expression two = context.getExpressions().pop();
Expression three = context.getExpressions().pop();
Expression four = context.getExpressions().pop();
//push on 1, 2
context.getExpressions().push(two);
context.getExpressions().push(one);
//push on 1, 2, 3, 4
context.getExpressions().push(four);
context.getExpressions().push(three);
context.getExpressions().push(two);
context.getExpressions().push(one);
}
use of org.candle.decompiler.intermediate.expression.Expression in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitPUTFIELD.
public void visitPUTFIELD(PUTFIELD instruction) {
ConstantPoolGen cpg = context.getMethodGen().getConstantPool();
String fieldName = instruction.getFieldName(cpg);
Expression right = context.getExpressions().pop();
Expression left = context.getExpressions().pop();
FieldAccess fieldRef = new FieldAccess(context.getCurrentInstruction(), left, fieldName);
Assignment assignment = new Assignment(context.getCurrentInstruction(), fieldRef, right);
StatementIntermediate complete = new StatementIntermediate(context.getCurrentInstruction(), assignment);
context.pushIntermediateToInstruction(complete);
}
use of org.candle.decompiler.intermediate.expression.Expression in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method handleSwitch.
public void handleSwitch() {
Expression switchVal = context.getExpressions().pop();
Switch switchExpression = new Switch(context.getCurrentInstruction(), switchVal);
MultiBranchIntermediate mbi = new MultiBranchIntermediate(context.getCurrentInstruction(), switchExpression);
context.pushIntermediateToInstruction(mbi);
}
use of org.candle.decompiler.intermediate.expression.Expression in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method processComparator.
protected void processComparator() {
Expression left = context.getExpressions().pop();
Expression right = context.getExpressions().pop();
MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.EQ);
BooleanBranchIntermediate line = new BooleanBranchIntermediate(this.context.getCurrentInstruction(), conditional);
context.pushIntermediateToInstruction(line);
}
Aggregations