CLRHack: unwind-protect and catch-throw

· Funcall Blogspot · May 27, 2026, 7:08 a.m.
Summary
The blog post discusses the implementation of Lisp's unwind-protect and catch-throw mechanisms in the CLRHack compiler, which translates these concepts onto the .NET CLR's Structured Exception Handling framework. It details how these semantics are mapped using try...finally blocks and explains how dynamic non-local exits for throw and catch operations are achieved through specialized exception handling in the CLR. The author emphasizes the preservation of return states during exceptions, ensuring compliance with Lisp's cleanup guarantees, and provides technical insights into the bridging of .NET and Lisp programming paradigms.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →