ArkScript v4.0.0-13
Pre-release
Pre-release
Added
$as-isto paste a node inside a maro without evaluating it further ; useful to stop recursive evaluation of nodes inside function macrosLOAD_SYMBOL_BY_INDEXinstruction, loading a local from the current scope by an index (0 being the last element added to the scope)STORE_FROM_INDEXandSET_VAL_FROM_INDEXinstructions for parity with the super instructions not using load by indexINCREMENT_BY_INDEXandDECREMENT_BY_INDEXinstructions for parity with the super instructions not using load by indexSTORE_TAIL_BY_INDEX,STORE_HEAD_BY_INDEX,SET_VAL_TAIL_BY_INDEX,SET_VAL_HEAD_BY_INDEXsuper instructions added for parity with the super instructions not using load by indexRESET_SCOPEinstruction emitted at the end of a while loop to reset a scope so that we can create multiple variables and useLOAD_SYMBOL_BY_INDEX
Changed
-bcroption can be given a source file, it will then be compiled before its bytecode is shown- magic numbers for tables start in bytecode files have been changed from 0x01, 0x02, 0x03 to 0xA1, 0xA2, 0xA3 (symbols, values, code) to make them stand out in hex editors
- magic numbers for value types in bytecode files have been changed from 0x01, 0x02, 0x03 to 0xF1, 0xF2, 0xF3 (number, string, function)
- numbers in the values table in bytecode files are no longer stringified but their IEEE754 representation is now encoded on 12 bytes (4 for the exponent, 8 for the mantissa)
- changed how scopes are stored inside the VM to enhance performances. All scope data are now contiguous!
- 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- this works inside normal scopes (introduced by while loops) and functions scopes, but not for closures