From cdeee266d3d0f22cd245c6febf69e71a00b1adb6 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 28 Sep 2026 09:40:16 +0100 Subject: Guide a list's inner nodes: items before each child and its first key, searched without branches --- core/module-list.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/module-list.h') diff --git a/core/module-list.h b/core/module-list.h index b9d5a92..ec7ee10 100644 --- a/core/module-list.h +++ b/core/module-list.h @@ -81,6 +81,10 @@ bool pure_list_next(const PureList *, PureRun *); * field does not order below key (numbers by value, texts by bytes), and * whether that item's field is key. */ size_t pure_list_seek(const PureList *, unsigned field, PureCell key, bool *found); +/* The field a keyed list keeps its items in order of: when it is a number + * field, seek by it reads each level's keys from one node (field -1, or a + * text field: none). ALLOCATION leaves the list searched as if it had none. */ +PureResult pure_list_keyed(PureList *, int field); /* The list's items ordered by field, as a keyed list keeps them: *out is NULL * when they already are, or a new list in that order with moved[position * before] = position after for every item. CONFLICT when two items have the -- cgit v1.2.3