Constant fold all kinds of constants
This patch exports all the binary operator builtins functions from
builtin.c and uses them for constant folding in the parser, allowing
constant folding to work will all kinds and combinations of constants.
Now string*number, $ARGS+$ARGS, string/string, etc will also be
constant folded and the implementation of constant folded operators and
runtime operators will be the same.
And thanks to the new ERRORK bytecode operation, errors are constant
folded too! (e.g. 1 / 0 [] * {} etc)
This commit is contained in:
1 parent
5fc5453409
commit
3b6e7ddd72
5 files changed
+841
-894
No files matched your search
Generated
+772
-804
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user