LightAndLight / ipso

A functional scripting language.
https://ipso.dev
17 stars 1 forks source link

On-demand closure conversion #192

Closed LightAndLight closed 2 years ago

LightAndLight commented 2 years ago

I released that the interpreter holds on to too much information when evaluating recursive functions. (TODO: link post?)

Closure conversion solves this.

I want all definitions to be typechecked (even unused ones), but performance optimisations need only apply to definitions that are actually used by a script. I made this by closure converting "just in time", when a definition is first accessed by the evaluator.

Tasks