✓
Passing This code compiles and runs correctly.
Code
// PINS: component add/remove expressed as a PRESENCE-COLUMN write — set the
// bit on every row, observe membership through a guarded sweep, clear it,
// observe the guarded sweep now match nothing, and the rows survive intact.
//
// This is ecs_bench_suite's add_remove_component (rust-gamedev's workload).
// In an archetype engine adding a component MIGRATES the row between tables;
// under O13's no-archetypes ruling it is an ordinary column write firing
// ordinary deltas, and this pin is that claim as a program: the whole
// workload is two `stored` writes and two `when` guards (the guard gating
// 690_084 pins), with no row ever moving.
import std/io
import std/store
std/store:new(ents, capacity: 8) { hp: i64, frozen: i64 }
std/store:insert(ents) { hp: 10, frozen: 0 }
std/store:insert(ents) { hp: 20, frozen: 0 }
std/store:sweep(ents)
! sweep a |> std/store:stored { a.frozen: 1 }
std/store:sweep(ents)
! sweep b when b.frozen == 1 |> std/io:print.ln("frozen {{ b.hp:d }}")
std/store:sweep(ents)
! sweep c |> std/store:stored { c.frozen: 0 }
std/store:sweep(ents)
! sweep d when d.frozen == 1 |> std/io:print.ln("still frozen {{ d.hp:d }}")
std/store:sweep(ents)
! sweep e |> std/io:print.ln("alive {{ e.hp:d }}")
Actual
frozen 10
frozen 20
alive 10
alive 20
Expected output
frozen 10
frozen 20
alive 10
alive 20
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: ents, capacity: 8, source: hp: i64, frozen: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: ents, source: hp: 10, frozen: 0)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: ents, source: hp: 20, frozen: 0)
flow ~sweep click a branch to expand · @labels scroll to their anchor
sweep (expr: ents)
flow ~sweep click a branch to expand · @labels scroll to their anchor
sweep (expr: ents)
flow ~sweep click a branch to expand · @labels scroll to their anchor
sweep (expr: ents)
flow ~sweep click a branch to expand · @labels scroll to their anchor
sweep (expr: ents)
flow ~sweep click a branch to expand · @labels scroll to their anchor
sweep (expr: ents)
Test Configuration
MUST_RUN