The default container is empty. We need a manual implementation of
Default because deriving it seems to imply that K and V generic
parameter types must also implement Default.
Cloning can be used to clone an empty container or for cloning the whole
forest. We can derive this trait because we already require Copy for K
and V.
The iter() methods return an iterator that traverses all set elements /
map key-value pairs. The iterator doesn't require a mutable container
and forest reference, unlike the cursor types.
* Replace FunctionBuilder's Drop impl with a finalize function.
This has the advantage of not triggering assertion failures in the event
of abandoning a partially-built function. It has the disadvantage of
requiring users to call finalize() explicitly.
Add new ordered set and map data structures based on B+-trees. These are
not general-purpose data structures like the BTreeSet and BTreeMap types
in the standard library. They are specialized for:
- Keys and values are small `Copy` types, optimized for 32-bit entities.
- Each set or map has a very small footprint, using only 32 bits of
memory when empty.
- Keys are compared using a borrowed comparator object which can provide
context for comparing tiny types that don't contain enough information
to implement `Ord`.
- A whole forest of B-trees can be cleared in constant time without
having to traverse the whole data structure.
Ebb parameters are appended explicitly by whoever calls create_block,
so they don't need to also be inferred from branches. This makes the
frontend code more flexible for producers that want to create things
in a different order, and it eliminates more temporary allocations.
FunctionBuilder no longer maintains its own list of the function
parameter values; these can be obtained from the ebb parameter list
on the entry block.
switch_to_block doesn't need its jump_args argument, since jump
arguments are handled by the `jump` instruction and others, rather
than on the switch to a new ebb itself.