Ejemplo n.º 1
0
 std::vector<const Transaction*> IncrementalParser::getAllTransactions() {
   std::vector<const Transaction*> result;
   const cling::Transaction* T = getFirstTransaction();
   while (T) {
     result.push_back(T);
     T = T->getNext();
   }
   return result;
 }
Ejemplo n.º 2
0
 IncrementalParser::~IncrementalParser() {
   Transaction* T = const_cast<Transaction*>(getFirstTransaction());
   while (T) {
     assert((T->getState() == Transaction::kCommitted
             || T->getState() == Transaction::kRolledBackWithErrors
             || T->getState() == Transaction::kNumStates // reset from the pool
             || T->getState() == Transaction::kRolledBack)
            && "Not committed?");
     const Transaction* nextT = T->getNext();
     m_TransactionPool->releaseTransaction(T, false);
     T = const_cast<Transaction*>(nextT);
   }
 }
Ejemplo n.º 3
0
  IncrementalParser::~IncrementalParser() {
    if (hasCodeGenerator()) {
      getCodeGenerator()->ReleaseModule();
    }
    const Transaction* T = getFirstTransaction();
    const Transaction* nextT = 0;
    while (T) {
      nextT = T->getNext();
      delete T;
      T = nextT;
    }

    for (size_t i = 0; i < m_TTransformers.size(); ++i)
      delete m_TTransformers[i];
  }
Ejemplo n.º 4
0
  IncrementalParser::~IncrementalParser() {
    if (hasCodeGenerator()) {
      getCodeGenerator()->ReleaseModule();
    }
    const Transaction* T = getFirstTransaction();
    const Transaction* nextT = 0;
    while (T) {
      assert((T->getState() == Transaction::kCommitted 
              || T->getState() == Transaction::kRolledBack)
             && "Not committed?");
      nextT = T->getNext();
      delete T;
      T = nextT;
    }

    for (size_t i = 0; i < m_ASTTransformers.size(); ++i)
      delete m_ASTTransformers[i];

    for (size_t i = 0; i < m_IRTransformers.size(); ++i)
      delete m_IRTransformers[i];
  }