use of org.candle.decompiler.intermediate.expression.Resolved in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitICONST.
public void visitICONST(ICONST instruction) {
LOG.debug("Loading: " + instruction.getValue().toString());
Resolved cons = new Resolved(context.getCurrentInstruction(), Type.INT, instruction.getValue().toString());
context.getExpressions().push(cons);
}
use of org.candle.decompiler.intermediate.expression.Resolved in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitIFLT.
//Process all single-value conditionals.
@Override
public void visitIFLT(IFLT instruction) {
Expression left = context.getExpressions().pop();
//TODO: this should probably be resolved to it's left expression value for the resovled value.
Expression right = new Resolved(context.getCurrentInstruction(), null, "0");
processMultiConditionalStatement(OperationType.LESS, left, right);
}
use of org.candle.decompiler.intermediate.expression.Resolved in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitFCONST.
public void visitFCONST(FCONST instruction) {
Resolved cons = new Resolved(context.getCurrentInstruction(), Type.FLOAT, instruction.getValue().toString());
context.getExpressions().push(cons);
}
use of org.candle.decompiler.intermediate.expression.Resolved in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitDCONST.
public void visitDCONST(DCONST instruction) {
Resolved cons = new Resolved(context.getCurrentInstruction(), Type.DOUBLE, instruction.getValue().toString());
context.getExpressions().push(cons);
}
use of org.candle.decompiler.intermediate.expression.Resolved in project candle-decompiler by bradsdavis.
the class MethodIntermediateVisitor method visitGETSTATIC.
public void visitGETSTATIC(GETSTATIC instruction) {
LOG.debug("Getting static..");
MethodGen mg = context.getMethodGen();
ConstantPoolGen cpg = mg.getConstantPool();
String referencedClassName = instruction.getReferenceType(cpg).toString();
String thisClassName = context.getJavaClass().getClassName();
String resolved = null;
if (StringUtils.equals(referencedClassName, thisClassName)) {
resolved = instruction.getFieldName(cpg);
} else {
resolved = referencedClassName + "." + instruction.getFieldName(cpg);
}
Resolved cons = new Resolved(context.getCurrentInstruction(), instruction.getType(cpg), resolved);
context.getExpressions().push(cons);
}
Aggregations