AS3: Automatic Calculating Body parameters (Experimental)

This commit is contained in:
Jindra Pet��k
2011-07-30 10:22:40 +02:00
parent 66449bfc6c
commit 97a4a2c961
6 changed files with 111 additions and 12 deletions
@@ -2319,12 +2319,22 @@ public HashMap<Integer,String> getLocalRegNamesFromDebug(ABC abc){
return true;
}
public CodeStats getStats(ABC abc)
public CodeStats getStats(ABC abc,MethodBody body)
{
CodeStats stats=new CodeStats(this);
if(!walkCode(stats,0,0,0,abc)){
return null;
}
for(ABCException ex:body.exceptions){
try {
int exStart=adr2pos(ex.start);
if(!walkCode(stats, adr2pos(ex.target), stats.instructionStats[exStart].stackpos, stats.instructionStats[exStart].scopepos, abc)){
return null;
}
} catch (ConvertException ex1) {
}
}
return stats;
}
}