gren-lang / compiler

Compiler for the Gren programming language
https://gren-lang.org
Other
379 stars 23 forks source link

Direct function calls #251

Closed robinheghan closed 3 months ago

robinheghan commented 4 months ago

This branch adds an optimization that compiles function calls to direct function calls when a qualified function is called with the right arity. This vastly improves performance and reduces the chance of stack overflows occuring. As a side benefit, more functions are now named which makes it easier to use the JavaScript debugger and profiler.

Also added a few improvements to source mapping while I was at it.