()
| 41 | } |
| 42 | |
| 43 | public String instrs() { |
| 44 | StringBuilder buf = new StringBuilder(); |
| 45 | int ip = 0; |
| 46 | while ( ip < code.codeSize ) { |
| 47 | if ( ip>0 ) buf.append(", "); |
| 48 | int opcode = code.instrs[ip]; |
| 49 | Bytecode.Instruction I = Bytecode.instructions[opcode]; |
| 50 | buf.append(I.name); |
| 51 | ip++; |
| 52 | for (int opnd = 0; opnd < I.nopnds; opnd++) { |
| 53 | buf.append(' '); |
| 54 | buf.append(getShort(code.instrs, ip)); |
| 55 | ip += Bytecode.OPND_SIZE_IN_BYTES; |
| 56 | } |
| 57 | } |
| 58 | return buf.toString(); |
| 59 | } |
| 60 | |
| 61 | |
| 62 | public String disassemble() { |