about summary refs log tree commit diff stats
path: root/linux/stack_array.subx
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 /linux/stack_array.subx
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 'linux/stack_array.subx')
0 files changed, 0 insertions, 0 deletions