Esempio n. 1
0
void addSVDisownNonNull(IRSB* sbOut, IRExpr* sv){
  IRExpr* refCountAddr =
    runArrowAddr(sbOut, sv, ShadowValue, ref_count);
  IRExpr* prevRefCount =
    runLoad64(sbOut, refCountAddr);
  IRExpr* newRefCount =
    runBinop(sbOut, Iop_Sub64, prevRefCount, mkU64(1));
  addStore(sbOut, newRefCount, refCountAddr);
  IRExpr* lastRef = runBinop(sbOut, Iop_CmpEQ64, prevRefCount, mkU64(1));
  IRStmt* freeVal =
    mkDirtyG_0_1(freeShadowValue, sv, lastRef);
  addStmtToIRSB(sbOut, freeVal);
}
Esempio n. 2
0
 virtual void parseStores(QDomNodeList & stores)
 {
     for ( uint i = 0; i < stores.length(); i++)
     {
         QDomElement store = stores.item(i).toElement();
         uint uid = store.attribute("number").toUInt();
         QString name = store.attribute("name");
         uint capacity = store.attribute("volume").toUInt();
         uint type = store.attribute("type").toUInt();
         uint replicationCapacity = store.attribute("replicationcapacity").toUInt();
         Store * astore = new Store(name.toStdString(), capacity, capacity, type, replicationCapacity);
         addStore(uid, astore);
         storeXMLCache[uid] = store;
     }
 }