Bob Nystrom 04dda643d0 fix: correct local variable storage and remove premature local slot allocation in vm
The compiler's storeVariable function was incorrectly emitting CODE_STORE_LOCAL for all variables, including locals that already have their value in the correct stack slot. This change renames storeVariable to defineVariable and adds logic to only emit CODE_STORE_GLOBAL for globals, while for locals it emits CODE_DUP to preserve the value through the subsequent POP. Additionally, the vm's callFunction no longer pre-allocates empty slots for locals, as they are now placed on the stack during compilation. New test files verify duplicate local/parameter detection and correct local variable ordering in block scopes.
2013-11-09 19:38:01 +00:00
S
Description
Highly customized version of the wren programming language. It has all the modules that you would expect in a std library including http, websockets, sqlite3 and jinja-like templating engine. The idea is to make it suitable for web development.
22 MiB
Languages
HTML 50%
C 22.2%
PHP 13.4%
C++ 6%
Makefile 2.9%
Other 5.5%