public void dumpDecrements(Block block, RCTracker increments) {
    // TODO: can we guarantee that the refcount var is available in the
    //       current scope?
    for (RefCountType rcType: RefcountPass.RC_TYPES) {
      for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
        assert (e.getValue() <= 0);
        Var var = increments.getRefCountVar(e.getKey());
        if (RefCounting.trackRefCount(var, rcType)) {
          Arg amount = Arg.newInt(e.getValue() * -1);
          block.addCleanup(var, RefCountOp.decrRef(rcType, var, amount));
        }
      }
    }
    // Clear out all decrements
    increments.resetAll(RCDir.DECR);
  }
public void dumpDecrements(Block block, RCTracker increments) {
   
   
    for (RefCountType rcType: RefcountPass.RC_TYPES) {
      for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.DECR)) {
        assert (e.getValue() <= 0);
        Var var = increments.getRefCountVar(e.getKey());
        if (RefCounting.trackRefCount(var, rcType)) {
          Arg amount = Arg.newInt(e.getValue() * -1);
          block.addCleanup(var, RefCountOp.decrRef(rcType, var, amount));
        }
      }
    }
   
    increments.resetAll(RCDir.DECR);
  }
public void dumpdecrements(block block, rctracker increments) { for (refcounttype rctype: refcountpass.rc_types) { for (entry<aliaskey, long> e: increments.rciter(rctype, rcdir.decr)) { assert (e.getvalue() <= 0); var var = increments.getrefcountvar(e.getkey()); if (refcounting.trackrefcount(var, rctype)) { arg amount = arg.newint(e.getvalue() * -1); block.addcleanup(var, refcountop.decrref(rctype, var, amount)); } } } increments.resetall(rcdir.decr); }