Search in sources :

Example 1 with NullLiteral

use of org.candle.decompiler.intermediate.expression.NullLiteral 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);
}
Also used : TypedExpression(org.candle.decompiler.intermediate.expression.TypedExpression) Expression(org.candle.decompiler.intermediate.expression.Expression) BooleanBranchIntermediate(org.candle.decompiler.intermediate.code.BooleanBranchIntermediate) NullLiteral(org.candle.decompiler.intermediate.expression.NullLiteral) MultiConditional(org.candle.decompiler.intermediate.expression.MultiConditional)

Example 2 with NullLiteral

use of org.candle.decompiler.intermediate.expression.NullLiteral in project candle-decompiler by bradsdavis.

the class MethodIntermediateVisitor method visitIFNULL.

@Override
public void visitIFNULL(IFNULL instruction) {
    Expression left = context.getExpressions().pop();
    Expression right = new NullLiteral(context.getCurrentInstruction());
    MultiConditional conditional = new MultiConditional(context.getCurrentInstruction(), left, right, OperationType.EQ);
    BooleanBranchIntermediate line = new BooleanBranchIntermediate(context.getCurrentInstruction(), conditional);
    context.pushIntermediateToInstruction(line);
}
Also used : TypedExpression(org.candle.decompiler.intermediate.expression.TypedExpression) Expression(org.candle.decompiler.intermediate.expression.Expression) BooleanBranchIntermediate(org.candle.decompiler.intermediate.code.BooleanBranchIntermediate) NullLiteral(org.candle.decompiler.intermediate.expression.NullLiteral) MultiConditional(org.candle.decompiler.intermediate.expression.MultiConditional)

Example 3 with NullLiteral

use of org.candle.decompiler.intermediate.expression.NullLiteral in project candle-decompiler by bradsdavis.

the class MethodIntermediateVisitor method visitACONST_NULL.

public void visitACONST_NULL(ACONST_NULL instruction) {
    // load from constant pool.
    NullLiteral cons = new NullLiteral(context.getCurrentInstruction());
    context.getExpressions().push(cons);
}
Also used : NullLiteral(org.candle.decompiler.intermediate.expression.NullLiteral)

Aggregations

NullLiteral (org.candle.decompiler.intermediate.expression.NullLiteral)3 BooleanBranchIntermediate (org.candle.decompiler.intermediate.code.BooleanBranchIntermediate)2 Expression (org.candle.decompiler.intermediate.expression.Expression)2 MultiConditional (org.candle.decompiler.intermediate.expression.MultiConditional)2 TypedExpression (org.candle.decompiler.intermediate.expression.TypedExpression)2