Issue #45 Unicode character cannot save

Code formatting
This commit is contained in:
Jindra Pet��k
2013-03-30 16:43:26 +01:00
parent d3bd9b641d
commit be106cc34b
772 changed files with 84378 additions and 84353 deletions
@@ -25,32 +25,32 @@ import java.util.List;
*/
public class CodeStats {
public int maxstack = 0;
public int maxscope = 0;
public int maxlocal = 0;
public boolean has_set_dxns = false;
public boolean has_activation = false;
public InstructionStats instructionStats[];
public int maxstack = 0;
public int maxscope = 0;
public int maxlocal = 0;
public boolean has_set_dxns = false;
public boolean has_activation = false;
public InstructionStats instructionStats[];
public String toString(ABC abc, List<String> fullyQualifiedNames) {
String ret = "Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal + "\r\n";
int i = 0;
int ms = 0;
for (InstructionStats stats : instructionStats) {
int deltastack = stats.ins.definition.getStackDelta(stats.ins, abc);
if (stats.stackpos > ms) {
ms = stats.stackpos;
}
ret += "" + i + ":" + stats.stackpos + (deltastack >= 0 ? "+" + deltastack : deltastack) + "," + stats.scopepos + " " + stats.ins.toString(abc.constants, fullyQualifiedNames) + "\r\n";
i++;
}
return ret;
}
public String toString(ABC abc, List<String> fullyQualifiedNames) {
String ret = "Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal + "\r\n";
int i = 0;
int ms = 0;
for (InstructionStats stats : instructionStats) {
int deltastack = stats.ins.definition.getStackDelta(stats.ins, abc);
if (stats.stackpos > ms) {
ms = stats.stackpos;
}
ret += "" + i + ":" + stats.stackpos + (deltastack >= 0 ? "+" + deltastack : deltastack) + "," + stats.scopepos + " " + stats.ins.toString(abc.constants, fullyQualifiedNames) + "\r\n";
i++;
}
return ret;
}
public CodeStats(AVM2Code code) {
instructionStats = new InstructionStats[code.code.size()];
for (int i = 0; i < code.code.size(); i++) {
instructionStats[i] = new InstructionStats(code.code.get(i));
}
}
public CodeStats(AVM2Code code) {
instructionStats = new InstructionStats[code.code.size()];
for (int i = 0; i < code.code.size(); i++) {
instructionStats[i] = new InstructionStats(code.code.get(i));
}
}
}