aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/builtins.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 15:56:59 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 15:56:59 +0330
commita4ca7a4f327a1f2af792fb15b60344bc8cc6487f (patch)
tree65928803c9acee850c0f2dcef85fbcf31d37cfca /src/compiler/builtins.zc
parentreturn: a value returned from a void function is dropped and the function yie... (diff)
memdebug: accept 'memdebug scrub;' (the check compared against rt.scrub); the scrub program reads the freed word through asm
Diffstat (limited to 'src/compiler/builtins.zc')
-rw-r--r--src/compiler/builtins.zc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/builtins.zc b/src/compiler/builtins.zc
index 53d8597..5acba50 100644
--- a/src/compiler/builtins.zc
+++ b/src/compiler/builtins.zc
@@ -7,7 +7,7 @@ int kw_memdebug() {
stmtonly();
next();
if (is_id(s_on)) { mdbg = 1; f = 5; }
- else if (is_id(s_scrub)) { mdbg = 1; f = 7; }
+ else if (tk == T_ID && rt.eq_w(tv, "scrub")) { mdbg = 1; f = 7; } // s_scrub is the runtime function rt.scrub, not this word
else if (is_id(s_off)) { mdbg = 0; f = 0; }
else die("memdebug on, memdebug scrub or memdebug off");
next();