about summary refs log tree commit diff stats
path: root/tools/treeshake_translate
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-22 22:10:02 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-22 22:10:02 -0700
commit791a71e27eb7a4c906c4454b6a49643a98662df6 (patch)
treea554b4a8b370f14e618e56f8229cad4951bb8f34 /tools/treeshake_translate
parentba4a3c5be70d473479e663be0400b798f88c113d (diff)
downloadmu-791a71e27eb7a4c906c4454b6a49643a98662df6.tar.gz
fix a long-standing bug in Mu's translator
While all test pass, this change is disquieting. When I first designed
Mu I deliberately chose to exclude literal strings from most primitive
instructions both for type-checking and to avoid silently passing
through strange constructions. Nobody really needs to add a string to a
number, and am I sure no SubX instruction will cause a memory safety
issue when passed a string literal instead of a number?

But clearly I have no tests encoding this desire. And any string literal
could be replaced by an integer literal containing the exact same value,
so what are we protecting against anyway.

Let me fix the bug for now. If I run into problems I'll come back and do
this right.
Diffstat (limited to 'tools/treeshake_translate')
0 files changed, 0 insertions, 0 deletions