Improve codegen for nextLogical
This commit is contained in:
@@ -1574,10 +1574,21 @@ Node *nextPhysical(Node *node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Node *nextLogical(Node *node) {
|
Node *nextLogical(Node *node) {
|
||||||
for (node = nextPhysical(node); node != nullptr && !node->entryPresent;
|
int index = -1;
|
||||||
node = nextPhysical(node))
|
for (;;) {
|
||||||
;
|
auto nextChild = getChildGeq(node, index + 1);
|
||||||
|
if (nextChild != nullptr) {
|
||||||
|
for (node = nextChild; !node->entryPresent;
|
||||||
|
node = getFirstChildExists(node)) {
|
||||||
|
}
|
||||||
return node;
|
return node;
|
||||||
|
}
|
||||||
|
index = node->parentsIndex;
|
||||||
|
node = node->parent;
|
||||||
|
if (node == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invalidates `self`, replacing it with a node of at least capacity.
|
// Invalidates `self`, replacing it with a node of at least capacity.
|
||||||
|
Reference in New Issue
Block a user