leastfixedpoint

Tony's Link Log

All tags.

The Fil-C Optimized Calling Convention.

Filip Pizlo (16 May 2026)
🔗 https://fil-c.org/calling_convention
#object-capabilities #operating-systems #performance #security #system-layer #bcs1450 #bcs2140 #bcs2220 #bcs

Low-level implementation details on how Fil-C, a memory-safe, capability-oriented C compiler and runtime, is able to implement function calls efficiently while maintaining strong, well-defined memory-safety invariants:

Fil-C achieves memory safety even for programs that behave adversarially. That includes casting function pointers to the wrong signature and then calling them, exporting a function with one signature in one module and then importing it with a different signature in another, or even exporting a symbol as a function in one module and importing it as data in another (and vice-versa). Passing too few arguments, arguments of the wrong type, misusing va_list (including escaping it), expecting too many values to be returned - these are all things that the Fil-C calling convention either catches with a panic or ascribes safe behavior to.