-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
Showing
5 changed files
with
518 additions
and
571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.