Effectful Assembly Programming with AsmFX
summary
AsmFX proposes a six‑instruction extension (enter, do, return, exit, resume, break) plus re-enter/final-re-enter and shallow variants to implement effect handlers directly on conventional machines. It models handler state as a contiguous effect context block that stores closure-like records and saved registers, enabling fine‑tail resumptive handlers, parameterized state, recursion by using the context as a call stack, and multi‑shot resumptions. A prototype exists and the specification shows exactly how contexts and continuation records are pushed, duplicated, restored, and jumped to.
AI-written summary · about
chapters (14)
- 0:00AsmFX and effect handlers
- 1:11Effect handlers in hardware
- 3:21Terminology and fragments
- 5:38ASM FX instruction set
- 7:49Budget handler example
- 9:38Abstract machine and context
- 15:14Beyond tail-resumptive
- 16:16Saving registers in handling
- 18:52Parameterized handlers
- 21:04Recursion with effect handlers
- 22:09Multi-shot resumptions
- 24:40Resumption instructions summary
- 25:43Conclusion and future
- 27:10Q&A
related talks
18mContinuing WebAssembly with Effect Handlers
18mLexical Effect Handlers, Directly
22mLexical Effect Handler: Fast by Design, Correct by Proof
32mHigh-Level Effect Handlers in C++
15mEffects as Capabilities: Effect Handlers and Lightweight Effect Polymorphism
12mCompiling Effect Handlers in Capability-Passing Style
16mAn Intrinsically Typed Compiler for Algebraic Effect Handlers
15mEfficient Compilation of Algebraic Effect Handlers
