diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-06-08 13:51:44 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-06-08 13:54:50 +0200 |
commit | 2a838d1f9f58d05bc1e15084efa42ad86fc105e4 (patch) | |
tree | 4fea33b29a7e01aafcb105ccc220a65b63819a3d /examples/execute-string.c | |
parent | 9872f652114c826c37ac6d9d92202c84943c5f23 (diff) |
compiler: improve mapping of binary operator tokens to instructions
Instead of relying on a switch/case mapping of token values to corresponding
VM instructions, infer the instruction number arithmetically.
This shrinks the compiled size on x86/64 by about 250 bytes.
Also emit I_LE and I_GE instructions for `<=` and `>=` comparisons instead
of transforming these into I_GT and I_LT negations.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'examples/execute-string.c')
0 files changed, 0 insertions, 0 deletions