mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Dramatically simplify internal DSNode representation, get implementation
*FULLY OPERATIONAL* and safe. We are now capable of completely analyzing at LEAST the Olden benchmarks + 181.mcf git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,7 +23,9 @@ class DSNodeIterator : public forward_iterator<const DSNode, ptrdiff_t> {
|
||||
|
||||
DSNodeIterator(const DSNode *N) : Node(N), Offset(0) {} // begin iterator
|
||||
DSNodeIterator(const DSNode *N, bool) // Create end iterator
|
||||
: Node(N), Offset(N->getSize()) {
|
||||
: Node(N) {
|
||||
Offset = (N->getSize()+((1 << DS::PointerShift)-1)) &
|
||||
~((1 << DS::PointerShift)-1);
|
||||
}
|
||||
public:
|
||||
DSNodeIterator(const DSNodeHandle &NH)
|
||||
@@ -41,13 +43,12 @@ public:
|
||||
}
|
||||
|
||||
pointer operator*() const {
|
||||
const DSNodeHandle *NH = Node->getLink(Offset);
|
||||
return NH ? NH->getNode() : 0;
|
||||
return Node->getLink(Offset).getNode();
|
||||
}
|
||||
pointer operator->() const { return operator*(); }
|
||||
|
||||
_Self& operator++() { // Preincrement
|
||||
++Offset;
|
||||
Offset += (1 << DS::PointerShift);
|
||||
return *this;
|
||||
}
|
||||
_Self operator++(int) { // Postincrement
|
||||
|
Reference in New Issue
Block a user