|
1 | 1 | # Change Log |
2 | 2 |
|
3 | | -## [Unreleased changes] - 20XX-XX-XX |
| 3 | +## [4.1.2] - 2026-01-09 |
4 | 4 | ### Added |
5 | 5 | - the repl prints the output of the last expression it ran |
6 | 6 | - new super instructions: `MUL_BY`, `MUL_BY_INDEX`, `MUL_SET_VAL` that can do multiplications (and optional storing in vars) in place |
|
19 | 19 | - the REPL attempts to load a file from `ARKSCRIPT_REPL_STARTUP` environment variable, to preload code |
20 | 20 | - rename LOAD_SYMBOL and LOAD_SYMBOL_BY_INDEX to LOAD_FAST and LOAD_FAST_BY_INDEX to emphasize they load refs |
21 | 21 |
|
22 | | -### Removed |
23 | | - |
24 | 22 | ## [4.1.1] - 2025-12-13 |
25 | 23 | ### Fixed |
26 | 24 | - the formatter was breaking functions' arguments list containing argument attributes on multiple lines for no reason |
|
85 | 83 | - new operator `@@` to get elements in list of lists / list of strings |
86 | 84 | - new builtin `random`, returning a random number between INT_MIN and INT_MAX, or in a custom range |
87 | 85 | - `$as-is` to paste a node inside a maro without evaluating it further ; useful to stop recursive evaluation of nodes inside function macros |
88 | | -- `LOAD_FAST_BY_INDEX` instruction, loading a local from the current scope by an index (0 being the last element added to the scope) |
| 86 | +- `LOAD_SYMBOL_BY_INDEX` instruction, loading a local from the current scope by an index (0 being the last element added to the scope) |
89 | 87 | - `STORE_FROM_INDEX` and `SET_VAL_FROM_INDEX` instructions for parity with the super instructions not using load by index |
90 | 88 | - `INCREMENT_BY_INDEX` and `DECREMENT_BY_INDEX` instructions for parity with the super instructions not using load by index |
91 | 89 | - `STORE_TAIL_BY_INDEX`, `STORE_HEAD_BY_INDEX`, `SET_VAL_TAIL_BY_INDEX`, `SET_VAL_HEAD_BY_INDEX` super instructions added for parity with the super instructions not using load by index |
92 | | -- `RESET_SCOPE_JUMP` instruction emitted at the end of a while loop to reset a scope so that we can create multiple variables and use `LOAD_FAST_BY_INDEX` |
| 90 | +- `RESET_SCOPE_JUMP` instruction emitted at the end of a while loop to reset a scope so that we can create multiple variables and use `LOAD_SYMBOL_BY_INDEX` |
93 | 91 | - instruction source location ; two new bytecode tables were added: one for filenames, another for (page pointer, instruction pointer, file id, line), allowing the VM to display better error messages when the source is available |
94 | 92 | - show source location when a runtime error is thrown in the VM |
95 | 93 | - `LT_CONST_JUMP_IF_FALSE` and `LT_SYM_JUMP_IF_FALSE` to compare a symbol to a const and a symbol to a symbol (respectively), then jump to an address if false (useful for while loops that check a simple `(< x n)` condition) |
|
187 | 185 | - magic numbers for value types in bytecode files have been changed from 0x01, 0x02, 0x03 to 0xF1, 0xF2, 0xF3 (number, string, function) |
188 | 186 | - numbers in the values table in bytecode files are no longer turned to string, but their IEEE754 representation is now encoded on 12 bytes (4 for the exponent, 8 for the mantissa) |
189 | 187 | - changed how scopes are stored inside the VM to enhance performances. All scope data are now contiguous! |
190 | | -- when possible, accessing variables from the current scope is compiled to a new instruction `LOAD_FAST_BY_INDEX`, to avoid the sometimes expansive lookup by id |
| 188 | +- when possible, accessing variables from the current scope is compiled to a new instruction `LOAD_SYMBOL_BY_INDEX`, to avoid the sometimes expansive lookup by id |
191 | 189 | - this works inside normal scopes (introduced by while loops) and functions scopes, but not for closures |
192 | 190 | - VM stack size is now 4096 instead of 8192 |
193 | 191 | - `Ark::CodeError` now takes a `CodeErrorContext` to store the source (filename, line, column, expression) of an error |
|
0 commit comments