/** {@inheritDoc} */ @Override public LocalsArraySet mergeWithSubroutineCaller (LocalsArray other, int predLabel) { LocalsArraySet result = new LocalsArraySet(getMaxLocals()); return result.mergeWithSubroutineCaller(other, predLabel); }
/** * Returns a LocalsArray instance representing the locals state that should * be used when returning to a subroutine caller. * * @param subLabel {@code >= 0;} A calling label of a subroutine * @return {@code null-ok;} an instance for this subroutine, or null if subroutine * is not in this set. */ public LocalsArray subArrayForLabel(int subLabel) { LocalsArray result = getSecondaryForLabel(subLabel); return result; }
/** {@inheritDoc} */ @Override public void set(RegisterSpec spec) { set(spec.getReg(), spec); }
/** @inheritDoc */ @Override public LocalsArraySet merge(LocalsArray other) { LocalsArraySet result; try { if (other instanceof LocalsArraySet) { result = mergeWithSet((LocalsArraySet) other); } else { result = mergeWithOne((OneLocalsArray) other); } } catch (SimException ex) { ex.addContext("underlay locals:"); annotate(ex); ex.addContext("overlay locals:"); other.annotate(ex); throw ex; } result.setImmutable(); return result; }
(LocalsArray other, int predLabel) { LocalsArray mine = getSecondaryForLabel(predLabel); LocalsArray newSecondary; OneLocalsArray newPrimary; = new LocalsArraySet(newPrimary, newSecondaries); result.setImmutable(); return result;
boolean secondariesChanged = false; newPrimary = primary.merge(other.getPrimary()); return new LocalsArraySet(newPrimary, newSecondaries);
/** {@inheritDoc} */ @Override public LocalsArray copy() { return new LocalsArraySet(this); }
/** {@inheritDoc*/ public String toHuman() { StringBuilder sb = new StringBuilder(); sb.append("(locals array set; primary)\n"); sb.append(getPrimary().toHuman()); sb.append('\n'); int sz = secondaries.size(); for (int label = 0; label < sz; label++) { LocalsArray la = secondaries.get(label); if (la != null) { sb.append("(locals array set: primary for caller " + Hex.u2(label) + ")\n"); sb.append(la.getPrimary().toHuman()); sb.append('\n'); } } return sb.toString(); }
/** * Constructs an instance which is a copy of another. * * @param toCopy {@code non-null;} instance to copy. */ private LocalsArraySet(LocalsArraySet toCopy) { super(toCopy.getMaxLocals() > 0); primary = toCopy.primary.copy(); secondaries = new ArrayList(toCopy.secondaries.size()); int sz = toCopy.secondaries.size(); for (int i = 0; i < sz; i++) { LocalsArray la = toCopy.secondaries.get(i); if (la == null) { secondaries.add(null); } else { secondaries.add(la.copy()); } } }
/** @inheritDoc */ @Override public LocalsArraySet merge(LocalsArray other) { LocalsArraySet result; try { if (other instanceof LocalsArraySet) { result = mergeWithSet((LocalsArraySet) other); } else { result = mergeWithOne((OneLocalsArray) other); } } catch (SimException ex) { ex.addContext("underlay locals:"); annotate(ex); ex.addContext("overlay locals:"); other.annotate(ex); throw ex; } result.setImmutable(); return result; }
(LocalsArray other, int predLabel) { LocalsArray mine = getSecondaryForLabel(predLabel); LocalsArray newSecondary; OneLocalsArray newPrimary; = new LocalsArraySet(newPrimary, newSecondaries); result.setImmutable(); return result;
boolean secondariesChanged = false; newPrimary = primary.merge(other.getPrimary()); return new LocalsArraySet(newPrimary, newSecondaries);
/** @inheritDoc */ @Override public LocalsArray copy() { return new LocalsArraySet(this); }
return laSet.getPrimary();
/** * Constructs an instance which is a copy of another. * * @param toCopy {@code non-null;} instance to copy. */ private LocalsArraySet(LocalsArraySet toCopy) { super(toCopy.getMaxLocals() > 0); primary = toCopy.primary.copy(); secondaries = new ArrayList(toCopy.secondaries.size()); int sz = toCopy.secondaries.size(); for (int i = 0; i < sz; i++) { LocalsArray la = toCopy.secondaries.get(i); if (la == null) { secondaries.add(null); } else { secondaries.add(la.copy()); } } }
/** {@inheritDoc} */ @Override public LocalsArraySet merge(LocalsArray other) { LocalsArraySet result; try { if (other instanceof LocalsArraySet) { result = mergeWithSet((LocalsArraySet) other); } else { result = mergeWithOne((OneLocalsArray) other); } } catch (SimException ex) { ex.addContext("underlay locals:"); annotate(ex); ex.addContext("overlay locals:"); other.annotate(ex); throw ex; } result.setImmutable(); return result; }
(LocalsArray other, int predLabel) { LocalsArray mine = getSecondaryForLabel(predLabel); LocalsArray newSecondary; OneLocalsArray newPrimary; = new LocalsArraySet(newPrimary, newSecondaries); result.setImmutable(); return result;
/** {@inheritDoc} */ @Override public LocalsArraySet mergeWithSubroutineCaller (LocalsArray other, int predLabel) { LocalsArraySet result = new LocalsArraySet(getMaxLocals()); return result.mergeWithSubroutineCaller(other, predLabel); }
boolean secondariesChanged = false; newPrimary = primary.merge(other.getPrimary()); return new LocalsArraySet(newPrimary, newSecondaries);
/** {@inheritDoc} */ @Override public LocalsArray copy() { return new LocalsArraySet(this); }