/** * Merges all types on the stack and local variable table of this frame with that of the specified * type. * * @param frame the frame to merge with * @return true if any changes to this frame where made by this merge */ public boolean merge(Frame frame) { boolean changed = false; // Local variable table for (int i = 0; i < locals.length; i++) { if (locals[i] != null) { Type prev = locals[i]; Type merged = prev.merge(frame.locals[i]); // always replace the instance in case a multi-interface type changes to a normal Type locals[i] = merged; if (! merged.equals(prev) || merged.popChanged()) { changed = true; } } else if (frame.locals[i] != null) { locals[i] = frame.locals[i]; changed = true; } } changed |= mergeStack(frame); return changed; }
changed = true; } else { changed = old.mergeStack(frame);
/** * Merges all types on the stack and local variable table of this frame with that of the specified * type. * * @param frame the frame to merge with * @return true if any changes to this frame where made by this merge */ public boolean merge(Frame frame) { boolean changed = false; // Local variable table for (int i = 0; i < locals.length; i++) { if (locals[i] != null) { Type prev = locals[i]; Type merged = prev.merge(frame.locals[i]); // always replace the instance in case a multi-interface type changes to a normal Type locals[i] = merged; if (! merged.equals(prev) || merged.popChanged()) { changed = true; } } else if (frame.locals[i] != null) { locals[i] = frame.locals[i]; changed = true; } } changed |= mergeStack(frame); return changed; }
private void mergeRet(IntQueue queue, CodeIterator iter, int pos, Frame frame, Subroutine subroutine) throws BadBytecode { if (subroutine == null) throw new BadBytecode("Ret on no subroutine! [pos = " + pos + "]"); for (int caller:subroutine.callers()) { int returnLoc = getNext(iter, caller, pos); boolean changed = false; Frame old = frames[returnLoc]; if (old == null) { old = frames[returnLoc] = frame.copyStack(); changed = true; } else { changed = old.mergeStack(frame); } for (int index:subroutine.accessed()) { Type oldType = old.getLocal(index); Type newType = frame.getLocal(index); if (oldType != newType) { old.setLocal(index, newType); changed = true; } } if (! old.isRetMerged()) { old.setRetMerged(true); changed = true; } if (changed && old.isJsrMerged()) queue.add(returnLoc); } }
/** * Merges all types on the stack and local variable table of this frame with that of the specified * type. * * @param frame the frame to merge with * @return true if any changes to this frame where made by this merge */ public boolean merge(Frame frame) { boolean changed = false; // Local variable table for (int i = 0; i < locals.length; i++) { if (locals[i] != null) { Type prev = locals[i]; Type merged = prev.merge(frame.locals[i]); // always replace the instance in case a multi-interface type changes to a normal Type locals[i] = merged; if (! merged.equals(prev) || merged.popChanged()) { changed = true; } } else if (frame.locals[i] != null) { locals[i] = frame.locals[i]; changed = true; } } changed |= mergeStack(frame); return changed; }
/** * Merges all types on the stack and local variable table of this frame with that of the specified * type. * * @param frame the frame to merge with * @return true if any changes to this frame where made by this merge */ public boolean merge(Frame frame) { boolean changed = false; // Local variable table for (int i = 0; i < locals.length; i++) { if (locals[i] != null) { Type prev = locals[i]; Type merged = prev.merge(frame.locals[i]); // always replace the instance in case a multi-interface type changes to a normal Type locals[i] = merged; if (! merged.equals(prev) || merged.popChanged()) { changed = true; } } else if (frame.locals[i] != null) { locals[i] = frame.locals[i]; changed = true; } } changed |= mergeStack(frame); return changed; }
/** * Merges all types on the stack and local variable table of this frame with that of the specified * type. * * @param frame the frame to merge with * @return true if any changes to this frame where made by this merge */ public boolean merge(Frame frame) { boolean changed = false; // Local variable table for (int i = 0; i < locals.length; i++) { if (locals[i] != null) { Type prev = locals[i]; Type merged = prev.merge(frame.locals[i]); // always replace the instance in case a multi-interface type changes to a normal Type locals[i] = merged; if (! merged.equals(prev) || merged.popChanged()) { changed = true; } } else if (frame.locals[i] != null) { locals[i] = frame.locals[i]; changed = true; } } changed |= mergeStack(frame); return changed; }
/** * Merges all types on the stack and local variable table of this frame with that of the specified * type. * * @param frame the frame to merge with * @return true if any changes to this frame where made by this merge */ public boolean merge(Frame frame) { boolean changed = false; // Local variable table for (int i = 0; i < locals.length; i++) { if (locals[i] != null) { Type prev = locals[i]; Type merged = prev.merge(frame.locals[i]); // always replace the instance in case a multi-interface type changes to a normal Type locals[i] = merged; if (! merged.equals(prev) || merged.popChanged()) { changed = true; } } else if (frame.locals[i] != null) { locals[i] = frame.locals[i]; changed = true; } } changed |= mergeStack(frame); return changed; }
changed = true; } else { changed = old.mergeStack(frame);
changed = true; } else { changed = old.mergeStack(frame);
changed = true; } else { changed = old.mergeStack(frame);
changed = true; } else { changed = old.mergeStack(frame);