Transpiling Slang Methods to C Functions: An Example of Static Polymorphism for S...
summary
The paper describes an extension to the Slang→C transpiler that generates distinct C variants for Smalltalk VM methods so polymorphism is resolved at compile time: a prefixing methods approach and a spreading polymorphism approach driven by a configuration that maps markers (e.g., incremental vs complete). It's applied to two garbage collectors in OpenSmalltalk-VM, emits prefixed C functions, and adds an exported call graph for validation; the solution works but Slang is brittle and debugging and manual annotations remain necessary.
AI-written summary · about
chapters (10)
- 0:00Transpiling Slang to C
- 2:09Project context and goals
- 3:10Slang function example
- 4:41Static polymorphism approach
- 7:11Spreading polymorphism approach
- 8:56Spreading logic example
- 9:39Experience and challenges
- 11:48Future work
- 12:33Conclusion
- 12:54Q&A
related talks
17mInlined Code Generation for Smalltalk
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
18mSpace-Efficient Polymorphic Gradual Typing, Mostly Parametric
01h 00mDynamic Polymorphism with Metaclasses and Code Injection
01h 07mDynamic Polymorphism With Code Injection and Metaclasses
01h 28mTutorial on Program Transformations
30mLayout Polymorphism: Using static computation to allow efficient polymorphism over...
20mSlang Building Solidity Compiler APIs from a Declarative Language Specification
