Revert "Store the transactions in a std::deque."

This reverts commit b5a175d4cf6618e74cb40c898bdf805f640c7820.
This commit is contained in:
Vassil Vassilev 2013-06-04 16:15:52 +02:00 committed by sftnight
parent 53d39b672e
commit 07b73f46dd

View File

@ -14,7 +14,6 @@
#include "llvm/ADT/StringRef.h"
#include <vector>
#include <deque>
namespace llvm {
struct GenericValue;
@ -65,14 +64,13 @@ namespace cling {
// CI owns it
DeclCollector* m_Consumer;
///\brief The storage for our transactions.
///\brief The head of the single list of transactions.
///
/// We don't need the elements to be contiguous in memory, that is why we
/// don't use std::vector. We don't need to copy the elements every time the
/// capacity is exceeded.
/// FIXME: Maybe we need better allocator, a bump allocator would be good.
const Transaction* m_FirstTransaction;
///\brief The last transaction
///
std::deque<Transaction*> m_Transactions;
Transaction* m_LastTransaction;
///\brief Code generator
///
@ -125,26 +123,20 @@ namespace cling {
///\brief Returns the first transaction the incremental parser saw.
///
const Transaction* getFirstTransaction() const {
if (!m_Transactions.size())
return 0;
return m_Transactions.front();
const Transaction* getFirstTransaction() const {
return m_FirstTransaction;
}
///\brief Returns the last transaction the incremental parser saw.
///
Transaction* getLastTransaction() {
if (!m_Transactions.size())
return 0;
return m_Transactions.back();
Transaction* getLastTransaction() {
return m_LastTransaction;
}
///\brief Returns the last transaction the incremental parser saw.
///
const Transaction* getLastTransaction() const {
if (!m_Transactions.size())
return 0;
return m_Transactions.back();
const Transaction* getLastTransaction() const {
return m_LastTransaction;
}
///\brief Returns the list of transactions seen by the interpreter.