mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-16 07:38:43 +00:00
Provided accessors to internal allocator for ImutAVLTree and ImmutableSet.
Added postfix ++,-- support for ImmutableSet::iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83e105c600
commit
0b22da3d73
@ -294,6 +294,8 @@ public:
|
|||||||
|
|
||||||
TreeTy* GetEmptyTree() const { return NULL; }
|
TreeTy* GetEmptyTree() const { return NULL; }
|
||||||
|
|
||||||
|
BumpPtrAllocator& getAllocator() { return Allocator; }
|
||||||
|
|
||||||
//===--------------------------------------------------===//
|
//===--------------------------------------------------===//
|
||||||
// A bunch of quick helper functions used for reasoning
|
// A bunch of quick helper functions used for reasoning
|
||||||
// about the properties of trees and their children.
|
// about the properties of trees and their children.
|
||||||
@ -336,6 +338,7 @@ private:
|
|||||||
|
|
||||||
// FIXME: more intelligent calculation of alignment.
|
// FIXME: more intelligent calculation of alignment.
|
||||||
TreeTy* T = (TreeTy*) Allocator.Allocate(sizeof(*T),16);
|
TreeTy* T = (TreeTy*) Allocator.Allocate(sizeof(*T),16);
|
||||||
|
|
||||||
new (T) TreeTy(L,R,V,IncrementHeight(L,R));
|
new (T) TreeTy(L,R,V,IncrementHeight(L,R));
|
||||||
|
|
||||||
Cache.InsertNode(T,InsertPos);
|
Cache.InsertNode(T,InsertPos);
|
||||||
@ -816,6 +819,8 @@ public:
|
|||||||
return ImmutableSet(F.Remove(Old.Root,V));
|
return ImmutableSet(F.Remove(Old.Root,V));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BumpPtrAllocator& getAllocator() { return F.getAllocator(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Factory(const Factory& RHS) {};
|
Factory(const Factory& RHS) {};
|
||||||
void operator=(const Factory& RHS) {};
|
void operator=(const Factory& RHS) {};
|
||||||
@ -858,7 +863,9 @@ public:
|
|||||||
public:
|
public:
|
||||||
inline value_type_ref operator*() const { return itr->getValue(); }
|
inline value_type_ref operator*() const { return itr->getValue(); }
|
||||||
inline iterator& operator++() { ++itr; return *this; }
|
inline iterator& operator++() { ++itr; return *this; }
|
||||||
|
inline iterator operator++(int) { iterator tmp(*this); ++itr; return tmp; }
|
||||||
inline iterator& operator--() { --itr; return *this; }
|
inline iterator& operator--() { --itr; return *this; }
|
||||||
|
inline iterator operator--(int) { iterator tmp(*this); --itr; return tmp; }
|
||||||
inline bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
|
inline bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
|
||||||
inline bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
|
inline bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user