entity_allocator.bend checks
raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/entity_allocator.bend as Entity_allocator
2 imports
import Base import entity_key.bend as K
Types
type Phase source · line 4 · raw
Data
ConsumedPhase
PendingPhase
LivePhase
DeadRetainedPhase
FreePhase
type Slot source · line 10 · raw
Data
Slot@generation:U32 -> @phase:Phase -> Slot
type Allocator source · line 12 · raw
Type
Allocator@next:U32 -> @high:U32 -> @slots:Array<Slot> -> @capacity:U32 -> @depth:Nat -> @free:List<&2, U32> -> @order:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> Allocator
type Reservation source · line 14 · raw
Data
Reserved@key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> Reservation
ExhaustedReservation
Definitions
def empty source · line 18 · raw
Allocator
def live source · line 21 · raw
@phase:Phase -> Bool
def pending source · line 25 · raw
@phase:Phase -> Bool
def metadata source · line 29 · raw
@phase:Phase -> Bool
def phase_valid source · line 33 · raw
@mode:U32 -> @phase:Phase -> Bool
def slot_valid source · line 38 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @mode:U32 -> @slot:Slot -> Bool
def checked_slot source · line 41 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @mode:U32 -> @+next:U32 -> @+high:U32 -> @+capacity:U32 -> @+depth:Nat -> @+free:List<&2, U32> -> @+order:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @observed:Pair(Array<Slot>, Slot) -> Pair(Allocator, Bool)
def checked_bounds source · line 44 · raw
@allowed:Bool -> @allocator:Allocator -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @mode:U32 -> Pair(Allocator, Bool)
def checked source · line 48 · raw
@allocator:Allocator -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @mode:U32 -> Pair(Allocator, Bool)
def keep source · line 52 · raw
@same:Bool -> @head:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @rest:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>
def without source · line 57 · raw
@keys:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>
def phase_slot source · line 62 · raw
@key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @phase:Phase -> Slot
def write_phase source · line 64 · raw
@allocator:Allocator -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @phase:Phase -> Allocator
def set_checked source · line 67 · raw
@phase:Phase -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @observed:Pair(Allocator, Bool) -> Pair(Allocator, Bool)
def set source · line 71 · raw
@allocator:Allocator -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @phase:Phase -> Pair(Allocator, Bool)
def abandon_checked source · line 73 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @observed:Pair(Allocator, Bool) -> Allocator
def abandon source · line 77 · raw
@allocator:Allocator -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> Allocator
def release_checked source · line 80 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @observed:Pair(Allocator, Bool) -> Allocator
def release source · line 84 · raw
@allocator:Allocator -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> Allocator
def reserve_recycled source · line 87 · raw
@+index:U32 -> @+next:U32 -> @+high:U32 -> @+capacity:U32 -> @+depth:Nat -> @+free:List<&2, U32> -> @+order:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @observed:Pair(Array<Slot>, Slot) -> Pair(Allocator, Reservation)
def reserve_fresh source · line 90 · raw
@available:Bool -> @grow:Bool -> @allocator:Allocator -> Pair(Allocator, Reservation)
def reserve source · line 95 · raw
@allocator:Allocator -> Pair(Allocator, Reservation)
def visible_join source · line 100 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @next:(@_:Allocator -> @_:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)) -> @reversed:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @observed:Pair(Allocator, Bool) -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def visible_state_join source · line 103 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @reversed:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @observed:Pair(Allocator, Bool) -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def visible_state_loop source · line 106 · raw
@keys:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @state:Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>) -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def visible_loop source · line 110 · raw
@keys:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @allocator:Allocator -> @reversed:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def visible source · line 112 · raw
@allocator:Allocator -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def abandon_pending_kept source · line 117 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @observed:Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>) -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
Restore cancellation consumes queued reservations without freeing their IDs.
def abandon_pending_checked source · line 120 · raw
@+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @next:(@_:Allocator -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)) -> @observed:Pair(Allocator, Bool) -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def abandon_pending_loop source · line 124 · raw
@keys:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> @allocator:Allocator -> Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>)
def abandon_pending_join source · line 128 · raw
@observed:Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>) -> Allocator
def abandon_pending source · line 131 · raw
@allocator:Allocator -> Allocator
def floor_finish source · line 136 · raw
@+floor:U32 -> @allocator:Allocator -> Allocator
A file may advance fresh-index progress, never replace generations or owners.
def floor_step source · line 139 · raw
@grow:Bool -> @+floor:U32 -> @next:(@_:Allocator -> Allocator) -> @allocator:Allocator -> Allocator
def floor_grow source · line 143 · raw
@fuel:Nat -> @+floor:U32 -> @allocator:Allocator -> Allocator
def floor_checked source · line 147 · raw
@allowed:Bool -> @+floor:U32 -> @allocator:Allocator -> Pair(Allocator, Bool)
def advance_floor source · line 151 · raw
@allocator:Allocator -> @+floor:U32 -> Pair(Allocator, Bool)
def count_keys source · line 154 · raw
@keys:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> Nat
def count_free source · line 158 · raw
@keys:List<&2, U32> -> Nat
def restore_room_join source · line 162 · raw
@+floor:U32 -> @needed:Nat -> @observed:Pair(Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>) -> Pair(Allocator, Bool)
def restore_room source · line 166 · raw
@allocator:Allocator -> @floor:U32 -> @needed:Nat -> Pair(Allocator, Bool)