@ -40,20 +40,28 @@ public class VarExprent extends Exprent {
private boolean definition = false ;
private boolean definition = false ;
private final VarProcessor processor ;
private final VarProcessor processor ;
private final int visibleOffset ;
private final int visibleOffset ;
private final int bytecodeOffset ;
private int version = 0 ;
private int version = 0 ;
private boolean classDef = false ;
private boolean classDef = false ;
private boolean stack = false ;
private boolean stack = false ;
@Deprecated
public VarExprent ( int index , VarType varType , VarProcessor processor ) {
public VarExprent ( int index , VarType varType , VarProcessor processor ) {
this ( index , varType , processor , - 1 ) ;
this ( index , varType , processor , - 1 ) ;
}
}
@Deprecated
public VarExprent ( int index , VarType varType , VarProcessor processor , int visibleOffset ) {
public VarExprent ( int index , VarType varType , VarProcessor processor , int visibleOffset ) {
this ( index , varType , processor , visibleOffset , - 1 ) ;
}
public VarExprent ( int index , VarType varType , VarProcessor processor , int visibleOffset , int bytecodeOffset ) {
super ( EXPRENT_VAR ) ;
super ( EXPRENT_VAR ) ;
this . index = index ;
this . index = index ;
this . varType = varType ;
this . varType = varType ;
this . processor = processor ;
this . processor = processor ;
this . visibleOffset = visibleOffset ;
this . visibleOffset = visibleOffset ;
this . bytecodeOffset = bytecodeOffset ;
}
}
@Override
@Override
@ -73,7 +81,7 @@ public class VarExprent extends Exprent {
@Override
@Override
public Exprent copy ( ) {
public Exprent copy ( ) {
VarExprent var = new VarExprent ( index , getVarType ( ) , processor , visibleOffset ) ;
VarExprent var = new VarExprent ( index , getVarType ( ) , processor , visibleOffset , bytecodeOffset ) ;
var . setDefinition ( definition ) ;
var . setDefinition ( definition ) ;
var . setVersion ( version ) ;
var . setVersion ( version ) ;
var . setClassDef ( classDef ) ;
var . setClassDef ( classDef ) ;
@ -100,12 +108,12 @@ public class VarExprent extends Exprent {
}
}
if ( definition ) {
if ( definition ) {
if ( visibl eOffset ! = - 1 ) {
if ( bytecod eOffset ! = - 1 ) {
MethodWrapper method = ( MethodWrapper ) DecompilerContext . getProperty ( DecompilerContext . CURRENT_METHOD_WRAPPER ) ;
MethodWrapper method = ( MethodWrapper ) DecompilerContext . getProperty ( DecompilerContext . CURRENT_METHOD_WRAPPER ) ;
StructOriginalPcTableAttribute originalPcTable = method . methodStruct . getAttribute ( StructGeneralAttribute . ATTRIBUTE_ORIGINAL_PC_TABLE ) ;
StructOriginalPcTableAttribute originalPcTable = method . methodStruct . getAttribute ( StructGeneralAttribute . ATTRIBUTE_ORIGINAL_PC_TABLE ) ;
if ( originalPcTable ! = null & & originalPcTable . hasOriginalPc ( visibl eOffset) ) {
if ( originalPcTable ! = null & & originalPcTable . hasOriginalPc ( bytecod eOffset) ) {
int pc = originalPcTable . getOriginalPc ( visibl eOffset) ;
int pc = originalPcTable . getOriginalPc ( bytecod eOffset) ;
buffer . append ( '@' ) ;
buffer . append ( '@' ) ;
buffer . append ( DecompilerContext . getImportCollector ( ) . getShortName ( "dev.openrs2.deob.annotation.Pc" ) ) ;
buffer . append ( DecompilerContext . getImportCollector ( ) . getShortName ( "dev.openrs2.deob.annotation.Pc" ) ) ;
buffer . append ( '(' ) ;
buffer . append ( '(' ) ;