|
|
@ -20,15 +20,20 @@ |
|
|
|
package jode.expr; |
|
|
|
package jode.expr; |
|
|
|
import jode.GlobalOptions; |
|
|
|
import jode.GlobalOptions; |
|
|
|
import jode.type.Type; |
|
|
|
import jode.type.Type; |
|
|
|
|
|
|
|
import jode.decompiler.CodeAnalyzer; |
|
|
|
|
|
|
|
import jode.decompiler.ClassAnalyzer; |
|
|
|
import jode.decompiler.LocalInfo; |
|
|
|
import jode.decompiler.LocalInfo; |
|
|
|
import jode.decompiler.TabbedPrintWriter; |
|
|
|
import jode.decompiler.TabbedPrintWriter; |
|
|
|
|
|
|
|
|
|
|
|
public class LocalLoadOperator extends NoArgOperator |
|
|
|
public class LocalLoadOperator extends NoArgOperator |
|
|
|
implements LocalVarOperator { |
|
|
|
implements LocalVarOperator { |
|
|
|
|
|
|
|
CodeAnalyzer codeAnalyzer; |
|
|
|
LocalInfo local; |
|
|
|
LocalInfo local; |
|
|
|
|
|
|
|
|
|
|
|
public LocalLoadOperator(Type type, LocalInfo local) { |
|
|
|
public LocalLoadOperator(Type type, CodeAnalyzer codeAnalyzer, |
|
|
|
|
|
|
|
LocalInfo local) { |
|
|
|
super(type); |
|
|
|
super(type); |
|
|
|
|
|
|
|
this.codeAnalyzer = codeAnalyzer; |
|
|
|
this.local = local; |
|
|
|
this.local = local; |
|
|
|
local.setType(type); |
|
|
|
local.setType(type); |
|
|
|
local.setOperator(this); |
|
|
|
local.setOperator(this); |
|
|
@ -87,6 +92,16 @@ public class LocalLoadOperator extends NoArgOperator |
|
|
|
((LocalLoadOperator) o).local.getSlot() == local.getSlot()); |
|
|
|
((LocalLoadOperator) o).local.getSlot() == local.getSlot()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Expression simplify() { |
|
|
|
|
|
|
|
if (local.getName().equals("this") && codeAnalyzer != null) |
|
|
|
|
|
|
|
return new ThisOperator(codeAnalyzer.getClazz(), true).simplify(); |
|
|
|
|
|
|
|
if (local.getName().equals("this$-1") && codeAnalyzer != null) |
|
|
|
|
|
|
|
return new ThisOperator |
|
|
|
|
|
|
|
(((ClassAnalyzer)codeAnalyzer.getClassAnalyzer().getParent()) |
|
|
|
|
|
|
|
.getClazz()).simplify(); |
|
|
|
|
|
|
|
return super.simplify(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void dumpExpression(TabbedPrintWriter writer, |
|
|
|
public void dumpExpression(TabbedPrintWriter writer, |
|
|
|
Expression[] operands) |
|
|
|
Expression[] operands) |
|
|
|
throws java.io.IOException { |
|
|
|
throws java.io.IOException { |
|
|
|