You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vm: dispatcher compiled-call prologue is duplicated 9x — extract a single helper #414
After the static-arity opcodes and call_self land, the compiled-closure call prologue (register-file build, vararg proto setup, 8-slot frame tuple, call_info, tick, depth check, dispatch/12 re-entry) is copy-pasted 9 times in lib/lua/vm/dispatcher.ex (~940-1290): 2 generic + 6 static-arity + call_self. Two copies already drift: @op_call_one_0 and @op_call_zero_0 inline %{callee_proto | varargs: []} instead of calling setup_vararg_proto/4 (currently equivalent).
Any call-protocol change now has 9 edit sites. Worth extracting a shared helper (or a defmacrop, though CLAUDE.md discourages macros unless warranted) once the perf stack (#400→#401→#403→#405) settles — measured to confirm the abstraction doesn't cost the win the duplication bought.
Activity