public void dump() { BytecodeDisassembler dis = new BytecodeDisassembler(this); System.out.println(name+":"); System.out.println(dis.disassemble()); System.out.println("Strings:"); System.out.println(dis.strings()); System.out.println("Bytecode to template map:"); System.out.println(dis.sourceMap()); }
public String disassemble() { StringBuilder buf = new StringBuilder(); int i=0; while (i<code.codeSize) { i = disassembleInstruction(buf, i); buf.append('\n'); } return buf.toString(); }
public String instrs() { BytecodeDisassembler dis = new BytecodeDisassembler(this); return dis.instrs(); }
protected void trace(ST self, int ip) { StringBuilder tr = new StringBuilder(); BytecodeDisassembler dis = new BytecodeDisassembler(self.impl); StringBuilder buf = new StringBuilder(); dis.disassembleInstruction(buf,ip); String name = self.impl.name+":"; if ( self.impl.name==ST.UNKNOWN_NAME ) name = ""; tr.append(String.format("%-40s",name+buf)); tr.append("\tstack=["); for (int i = 0; i <= sp; i++) { Object o = operands[i]; printForTrace(tr,o); } tr.append(" ], calls="); tr.append(getEnclosingInstanceStackString(currentScope)); tr.append(", sp="+sp+", nw="+ nwline); String s = tr.toString(); if ( debug ) executeTrace.add(s); if ( trace ) System.out.println(s); }
int opnd = getShort(code.instrs, ip); ip += Bytecode.OPND_SIZE_IN_BYTES; switch ( I.type[i] ) { case STRING : operands.add(showConstPoolOperand(opnd)); break; case ADDR :
public String instrs() { StringBuilder buf = new StringBuilder(); int ip=0; while (ip<code.codeSize) { if ( ip>0 ) buf.append(", "); int opcode = code.instrs[ip]; Bytecode.Instruction I = Bytecode.instructions[opcode]; buf.append(I.name); ip++; for (int opnd=0; opnd<I.nopnds; opnd++) { buf.append(' '); buf.append(getShort(code.instrs, ip)); ip += Bytecode.OPND_SIZE_IN_BYTES; } } return buf.toString(); }
protected void trace(InstanceScope scope, int ip) { final ST self = scope.st; StringBuilder tr = new StringBuilder(); BytecodeDisassembler dis = new BytecodeDisassembler(self.impl); StringBuilder buf = new StringBuilder(); dis.disassembleInstruction(buf,ip); String name = self.impl.name+":"; if ( Misc.referenceEquals(self.impl.name, ST.UNKNOWN_NAME) ) name = ""; tr.append(String.format("%-40s",name+buf)); tr.append("\tstack=["); for (int i = 0; i <= sp; i++) { Object o = operands[i]; printForTrace(tr,scope,o); } tr.append(" ], calls="); tr.append(getEnclosingInstanceStackString(scope)); tr.append(", sp="+sp+", nw="+ nwline); String s = tr.toString(); if ( debug ) executeTrace.add(s); if ( trace ) System.out.println(s); }
int opnd = getShort(code.instrs, ip); ip += Bytecode.OPND_SIZE_IN_BYTES; switch ( I.type[i] ) { case STRING : operands.add(showConstPoolOperand(opnd)); break; case ADDR :
public String instrs() { StringBuilder buf = new StringBuilder(); int ip=0; while (ip<code.codeSize) { if ( ip>0 ) buf.append(", "); int opcode = code.instrs[ip]; Bytecode.Instruction I = Bytecode.instructions[opcode]; buf.append(I.name); ip++; for (int opnd=0; opnd<I.nopnds; opnd++) { buf.append(' '); buf.append(getShort(code.instrs, ip)); ip += Bytecode.OPND_SIZE_IN_BYTES; } } return buf.toString(); }
public void dump() { BytecodeDisassembler dis = new BytecodeDisassembler(this); System.out.println(name+":"); System.out.println(dis.disassemble()); System.out.println("Strings:"); System.out.println(dis.strings()); System.out.println("Bytecode to template map:"); System.out.println(dis.sourceMap()); }
public String instrs() { BytecodeDisassembler dis = new BytecodeDisassembler(this); return dis.instrs(); }
protected void trace(InstanceScope scope, int ip) { final ST self = scope.st; StringBuilder tr = new StringBuilder(); BytecodeDisassembler dis = new BytecodeDisassembler(self.impl); StringBuilder buf = new StringBuilder(); dis.disassembleInstruction(buf,ip); String name = self.impl.name+":"; if ( Misc.referenceEquals(self.impl.name, ST.UNKNOWN_NAME) ) name = ""; tr.append(String.format("%-40s",name+buf)); tr.append("\tstack=["); for (int i = 0; i <= sp; i++) { Object o = operands[i]; printForTrace(tr,scope,o); } tr.append(" ], calls="); tr.append(getEnclosingInstanceStackString(scope)); tr.append(", sp="+sp+", nw="+ nwline); String s = tr.toString(); if ( debug ) executeTrace.add(s); if ( trace ) System.out.println(s); }
int opnd = getShort(code.instrs, ip); ip += Bytecode.OPND_SIZE_IN_BYTES; switch ( I.type[i] ) { case STRING : operands.add(showConstPoolOperand(opnd)); break; case ADDR :
public String instrs() { StringBuilder buf = new StringBuilder(); int ip=0; while (ip<code.codeSize) { if ( ip>0 ) buf.append(", "); int opcode = code.instrs[ip]; Bytecode.Instruction I = Bytecode.instructions[opcode]; buf.append(I.name); ip++; for (int opnd=0; opnd<I.nopnds; opnd++) { buf.append(' '); buf.append(getShort(code.instrs, ip)); ip += Bytecode.OPND_SIZE_IN_BYTES; } } return buf.toString(); }
public String disassemble() { StringBuilder buf = new StringBuilder(); int i=0; while (i<code.codeSize) { i = disassembleInstruction(buf, i); buf.append('\n'); } return buf.toString(); }
public void dump() { BytecodeDisassembler dis = new BytecodeDisassembler(this); System.out.println(name+":"); System.out.println(dis.disassemble()); System.out.println("Strings:"); System.out.println(dis.strings()); System.out.println("Bytecode to template map:"); System.out.println(dis.sourceMap()); }
public String instrs() { BytecodeDisassembler dis = new BytecodeDisassembler(this); return dis.instrs(); }
protected void trace(InstanceScope scope, int ip) { final ST self = scope.st; StringBuilder tr = new StringBuilder(); BytecodeDisassembler dis = new BytecodeDisassembler(self.impl); StringBuilder buf = new StringBuilder(); dis.disassembleInstruction(buf,ip); String name = self.impl.name+":"; if ( Misc.referenceEquals(self.impl.name, ST.UNKNOWN_NAME) ) name = ""; tr.append(String.format("%-40s",name+buf)); tr.append("\tstack=["); for (int i = 0; i <= sp; i++) { Object o = operands[i]; printForTrace(tr,scope,o); } tr.append(" ], calls="); tr.append(getEnclosingInstanceStackString(scope)); tr.append(", sp="+sp+", nw="+ nwline); String s = tr.toString(); if ( debug ) executeTrace.add(s); if ( trace ) System.out.println(s); }
int opnd = getShort(code.instrs, ip); ip += Bytecode.OPND_SIZE_IN_BYTES; switch ( I.type[i] ) { case STRING : operands.add(showConstPoolOperand(opnd)); break; case ADDR :
public String instrs() { StringBuilder buf = new StringBuilder(); int ip=0; while (ip<code.codeSize) { if ( ip>0 ) buf.append(", "); int opcode = code.instrs[ip]; Bytecode.Instruction I = Bytecode.instructions[opcode]; buf.append(I.name); ip++; for (int opnd=0; opnd<I.nopnds; opnd++) { buf.append(' '); buf.append(getShort(code.instrs, ip)); ip += Bytecode.OPND_SIZE_IN_BYTES; } } return buf.toString(); }