mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 01:41:17 +00:00
Initial version based on previous work. (Version alpha 7)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2010. JPEXS
|
||||
*/
|
||||
|
||||
package com.jpexs.asdec.abc.avm2.treemodel;
|
||||
|
||||
import com.jpexs.asdec.abc.avm2.ConstantPool;
|
||||
import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.asdec.abc.avm2.instructions.InstructionDefinition;
|
||||
|
||||
|
||||
public class LocalRegTreeItem extends TreeItem {
|
||||
public int regIndex;
|
||||
public TreeItem computedValue;
|
||||
|
||||
public LocalRegTreeItem(AVM2Instruction instruction, int regIndex, TreeItem computedValue) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.regIndex = regIndex;
|
||||
if (computedValue == null) {
|
||||
computedValue = new UndefinedTreeItem(instruction);
|
||||
}
|
||||
this.computedValue = computedValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(ConstantPool constants) {
|
||||
return hilight(InstructionDefinition.localRegName(regIndex));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFalse() {
|
||||
return computedValue.isFalse();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTrue() {
|
||||
return computedValue.isTrue();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user