compiler(0.R): a dispatched action's record is the queue's to keep - one list per action, filled in place, all free again when the drain ends
dispatch lowered to ludic_act_push(k, new A { ... }): a fresh record every dispatch, and an input
system dispatches Move and FrameTime every frame. The queue now keeps a list per action
(kept<k>, used<k>); ludic_act_new__A hands out the next (made only when all are queued), new's
emitter fills it field by field as it fills a fresh one (every field, default or given), and
drain_actions sets every used<k> back to 0 once the queue is empty. A reducer only ever reads
its action during the drain, so nothing sees a record after it is reused. Actions are visible
to the program's file, where the queue lives, as reducers already were.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3e3c6088fb
commit
93bc8a90db
4 changed files with 65 additions and 7 deletions
|
|
@ -1060,7 +1060,7 @@ function emit_expr(e: Node) -> Val {
|
|||
if e.kind == E_STR { return val(emit_str_const(e.s), "string") }
|
||||
if e.kind == E_NEW {
|
||||
if is_slice_ty(e.s) { return emit_new_slice(e.s) }
|
||||
return emit_new_struct(e.s, e.a)
|
||||
return emit_new_struct(e.s, e.a, e.b)
|
||||
}
|
||||
if e.kind == E_LIST { return emit_list(e) } # [a, b, c] -> a fresh slice
|
||||
# fn name -> the function's address, for a worker entry point. The OS-thread runtime calls it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue