EntityAllocator.reserve: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as EntityAllocator Lines 95-98 of bendvy-ecs-core@0.1.0.3/entity_allocator.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/entity_allocator.bend&start_line=95&end_line=98 import Base def reserve(allocator:Allocator) -> Allocator & Reservation: match allocator: case Allocator{+next,high,slots,+capacity,depth,[],order}:reserve_fresh(U32.is_lt(next,131073),Bool.not(U32.is_lt(next,capacity)),Allocator{next,high,slots,capacity,depth,[],order}) case Allocator{+next,+high,slots,+capacity,+depth,+index <> free,+order}:reserve_recycled(index,next,high,capacity,depth,free,order,Array.get(Slot,slots,index)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_allocator.bend&name=Allocator https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_allocator.bend&name=Reservation https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_allocator.bend&name=Slot https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_allocator.bend&name=reserve_fresh https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/entity_allocator.bend&name=reserve_recycled