This pull request implements closures (i.e. function objects that capture the enclosing environment) and fixes some bugs regarding function objects (in particular anonymous functions).
Additionally, core library functions can now explicitly declared native by adding @native to their declaration. This way, it is possible to implement both, LLVM and Monty core functionality without weird implicit rules for native and non-native implementations.
This is done in this merge request and not separately, because there was no good way to determine whether a function declaration was native in the code generation (which is required, since native functions can not be closures).
This pull request implements closures (i.e. function objects that capture the enclosing environment) and fixes some bugs regarding function objects (in particular anonymous functions).
Additionally, core library functions can now explicitly declared native by adding
@native
to their declaration. This way, it is possible to implement both, LLVM and Monty core functionality without weird implicit rules for native and non-native implementations. This is done in this merge request and not separately, because there was no good way to determine whether a function declaration was native in the code generation (which is required, since native functions can not be closures).