r/Protos • u/guillermoamolina • 6h ago
How a single compiler condition eliminates recursive bytecode expansion in Protos
Repeated references to the same Closure definition no longer generate redundant bytecode roots.
The compiler now emits each Closure definition once per bytecode group parse, preserving independent captures, non-local returns, suspension and specialized execution paths.
The Standard Library Scanner produces 67 roots for 66 unique Closure definitions, with no roots outside the observed reachable graph. Serializer traversal also passes.
782 focused tests reported no failures, with one skip. All 20 exhaustive CI jobs passed.
An interesting example of how a small compiler change can address a much larger structural problem.
Website: https://protoslang.com