CodeDisassembler cd = new CodeDisassembler(defineMethod); cd.disassemble(this, paramVars, returnLocation); returnLocation.setLocation();
if (compatibleType(type, local.getType())) { return local; for (int i=locals.size(); --i>=0; ) { local = locals.get(i); if (compatibleType(type, local.getType())) { return local;
error(opcode, "Unknown opcode: " + (opcode & 0xff)); break; case Opcode.IF_ICMPGT: case Opcode.IF_ICMPLE: labelKey = mAddress + readShort(); mLabels.put(labelKey, (Object) labelKey); break; labelKey = mAddress + readInt(); mLabels.put(labelKey, (Object) labelKey); break; labelKey = opcodeAddress + readInt(); mLabels.put(labelKey, (Object) labelKey); int lowValue = readInt(); int highValue = readInt(); int caseCount = highValue - lowValue + 1; labelKey = opcodeAddress + readInt(); mLabels.put(labelKey, (Object) labelKey); int caseCount = readInt(); labelKey = opcodeAddress + readInt(); mLabels.put(labelKey, (Object) labelKey);
gatherLabels(); if (!compatibleType(paramTypes[i], paramVar.getType())) { throw new IllegalArgumentException ("Method parameter type is not compatible with given type: " locateLabel(); error(opcode, "Unknown opcode: " + (opcode & 0xff)); break; switch (opcode) { case Opcode.LDC: index = readUnsignedByte(); break; case Opcode.LDC_W: case Opcode.LDC2_W: index = readUnsignedShort(); break; default: ci = mCp.getConstant(index); } catch (IndexOutOfBoundsException e) { error(opcode, "Undefined constant at index: " + index); break; assembler.loadConstant(((ConstantClassInfo)ci).getType()); } else { error(opcode, "Invalid constant type for load: " + ci);
/** * Disassemble the MethodInfo into the given assembler. * * @see CodeAssemblerPrinter */ public void disassemble(CodeAssembler assembler) { disassemble(assembler, null, null); }
private void locateLabel() { int labelKey = mAddress; Object labelValue = mLabels.get(labelKey); if (labelValue != null) { if (labelValue instanceof Label) { ((Label)labelValue).setLocation(); } else { labelValue = mAssembler.createLabel().setLocation(); mLabels.put(labelKey, labelValue); } } List<ExceptionHandler> handlers = mCatchLocations.get(labelKey); if (handlers != null) { for (int i=0; i<handlers.size(); i++) { ExceptionHandler handler = handlers.get(i); Label start = getLabel(handler.getStartLocation().getLocation()); Label end = getLabel(handler.getEndLocation().getLocation()); String catchClassName; if (handler.getCatchType() == null) { catchClassName = null; } else { catchClassName = handler.getCatchType().getType().getFullName(); } mAssembler.exceptionHandler(start, end, catchClassName); } } }
gatherLabels(); if (!compatibleType(paramTypes[i], paramVar.getType())) { throw new IllegalArgumentException ("Method parameter type is not compatible with given type: " locateLabel(); error(opcode, "Unknown opcode: " + (opcode & 0xff)); break; switch (opcode) { case Opcode.LDC: index = readUnsignedByte(); break; case Opcode.LDC_W: case Opcode.LDC2_W: index = readUnsignedShort(); break; default: ci = mCp.getConstant(index); } catch (IndexOutOfBoundsException e) { error(opcode, "Undefined constant at index: " + index); break; assembler.loadConstant(((ConstantClassInfo)ci).getType()); } else { error(opcode, "Invalid constant type for load: " + ci);
/** * Disassemble the MethodInfo into the given assembler. * * @see CodeAssemblerPrinter */ public void disassemble(CodeAssembler assembler) { disassemble(assembler, null, null); }
private void locateLabel() { int labelKey = mAddress; Object labelValue = mLabels.get(labelKey); if (labelValue != null) { if (labelValue instanceof Label) { ((Label)labelValue).setLocation(); } else { labelValue = mAssembler.createLabel().setLocation(); mLabels.put(labelKey, labelValue); } } List<ExceptionHandler> handlers = mCatchLocations.get(labelKey); if (handlers != null) { for (int i=0; i<handlers.size(); i++) { ExceptionHandler handler = handlers.get(i); Label start = getLabel(handler.getStartLocation().getLocation()); Label end = getLabel(handler.getEndLocation().getLocation()); String catchClassName; if (handler.getCatchType() == null) { catchClassName = null; } else { catchClassName = handler.getCatchType().getType().getFullName(); } mAssembler.exceptionHandler(start, end, catchClassName); } } }
String indentStr = generateIndent(mIndent); new CodeDisassembler(mi).disassemble (new CodeAssemblerPrinter(paramTypes, isStatic, mOut, indentStr, ";", "b."));
error(opcode, "Unknown opcode: " + (opcode & 0xff)); break; case Opcode.IF_ICMPGT: case Opcode.IF_ICMPLE: labelKey = mAddress + readShort(); mLabels.put(labelKey, (Object) labelKey); break; labelKey = mAddress + readInt(); mLabels.put(labelKey, (Object) labelKey); break; labelKey = opcodeAddress + readInt(); mLabels.put(labelKey, (Object) labelKey); int lowValue = readInt(); int highValue = readInt(); int caseCount = highValue - lowValue + 1; labelKey = opcodeAddress + readInt(); mLabels.put(labelKey, (Object) labelKey); int caseCount = readInt(); labelKey = opcodeAddress + readInt(); mLabels.put(labelKey, (Object) labelKey);
if (compatibleType(type, local.getType())) { return local; for (int i=locals.size(); --i>=0; ) { local = locals.get(i); if (compatibleType(type, local.getType())) { return local;
CodeDisassembler cd = new CodeDisassembler(defineMethod); cd.disassemble(this, paramVars, returnLocation); returnLocation.setLocation();
clinit = cf.addInitializer(); } else { dis = new CodeDisassembler(clinit); b.returnVoid(); } else { dis.disassemble(b);
String indentStr = generateIndent(mIndent); new CodeDisassembler(mi).disassemble (new CodeAssemblerPrinter(paramTypes, isStatic, mOut, indentStr, ";", "b."));
CodeDisassembler dis = new CodeDisassembler(mi); CodeBuilder b = new CodeBuilder(mi); Label tryEnd = b.createLabel(); dis.disassemble(b, null, tryEnd);