public void visitFrame( final int type, final int nLocal, final Object[] local, final int nStack, final Object[] stack) { mv.visitFrame(type, nLocal, local, nStack, stack); }
final Object[] stack) { if (mv != null) { mv.visitFrame(type, numLocal, local, numStack, stack);
Object[] stack) { if (mv != null) { mv.visitFrame(type, nLocal, local, nStack, stack);
@Override public void visitFrame(final int type, final int nLocal, final Object[] local, final int nStack, final Object[] stack) { p.visitFrame(type, nLocal, local, nStack, stack); super.visitFrame(type, nLocal, local, nStack, stack); }
/** * Makes the given visitor visit this stack map frame. * * @param mv * a method visitor. */ @Override public void accept(final MethodVisitor mv) { switch (type) { case Opcodes.F_NEW: case Opcodes.F_FULL: mv.visitFrame(type, local.size(), asArray(local), stack.size(), asArray(stack)); break; case Opcodes.F_APPEND: mv.visitFrame(type, local.size(), asArray(local), 0, null); break; case Opcodes.F_CHOP: mv.visitFrame(type, local.size(), null, 0, null); break; case Opcodes.F_SAME: mv.visitFrame(type, 0, null, 0, null); break; case Opcodes.F_SAME1: mv.visitFrame(type, 0, null, 1, asArray(stack)); break; } }
@Override public void visitFrame(final int type, final int nLocal, final Object[] local, final int nStack, final Object[] stack) { if (type != Opcodes.F_NEW) { // uncompressed frame throw new IllegalStateException( "ClassReader.accept() should be called with EXPAND_FRAMES flag"); } if (mv != null) { mv.visitFrame(type, nLocal, local, nStack, stack); } if (this.locals != null) { this.locals.clear(); this.stack.clear(); } else { this.locals = new ArrayList<Object>(); this.stack = new ArrayList<Object>(); } visitFrameTypes(nLocal, local, this.locals); visitFrameTypes(nStack, stack, this.stack); maxStack = Math.max(maxStack, this.stack.size()); }
@Override public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) { super.visitFrame(type, nLocal, remapEntries(nLocal, local), nStack, remapEntries(nStack, stack)); }
@Override public void end(final String name) { HashMap<?, ?> typeLists = (HashMap<?, ?>) pop(); ArrayList<?> locals = (ArrayList<?>) typeLists.get("local"); int nLocal = locals.size(); Object[] local = locals.toArray(); ArrayList<?> stacks = (ArrayList<?>) typeLists.get("stack"); int nStack = stacks.size(); Object[] stack = stacks.toArray(); String count = (String) pop(); String type = (String) pop(); if ("NEW".equals(type)) { getCodeVisitor() .visitFrame(F_NEW, nLocal, local, nStack, stack); } else if ("FULL".equals(type)) { getCodeVisitor().visitFrame(F_FULL, nLocal, local, nStack, stack); } else if ("APPEND".equals(type)) { getCodeVisitor().visitFrame(F_APPEND, nLocal, local, 0, null); } else if ("CHOP".equals(type)) { getCodeVisitor().visitFrame(F_CHOP, Integer.parseInt(count), null, 0, null); } else if ("SAME".equals(type)) { getCodeVisitor().visitFrame(F_SAME, 0, null, 0, null); } else if ("SAME1".equals(type)) { getCodeVisitor().visitFrame(F_SAME1, 0, null, nStack, stack); } } }
mv.visitFrame(type, nLocal, local, nStack, stack);
"Expanded and compressed frames must not be mixed."); super.visitFrame(type, nLocal, local, nStack, stack);
mv.visitFrame(type, number, newLocals, nStack, stack);
mv.visitFrame(Opcodes.F_NEW, frameLocalCount, frameLocal, mv.visitFrame(frameMode, frameLocalDiff, frameLocal,
methodVisitor.visitFrame(Opcodes.F_NEW, maxLocals, null, 0, null); methodVisitor.visitFrame( Opcodes.F_NEW, context.currentFrameLocalCount, context.currentFrameStackTypes); } else { methodVisitor.visitFrame( context.currentFrameType, context.currentFrameLocalCountDelta, methodVisitor.visitFrame(Constants.F_INSERT, 0, null, 0, null);
mv.visitFrame(Opcodes.F_NEW, maxLocals, null, 0, null); mv.visitFrame(Opcodes.F_NEW, frame.localCount, frame.local, frame.stackCount, frame.stack); } else { mv.visitFrame(frame.mode, frame.localDiff, frame.local, frame.stackCount, frame.stack); mv.visitFrame(ClassWriter.F_INSERT, 0, null, 0, null); insertFrame = false;