From 3050630b69f7ec8aeaa5a1918275fa56e15b80f7 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 10 Sep 2021 10:25:07 +0900 Subject: vm.c, codedump.c: add `IREP_TT_NFLAG` assertions. The pool specified by `OP_STRING` (and `OP_SYMBOL`) should represent a string, so that `IREP_TT_NFLAG` should be zero. --- src/codedump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/codedump.c') diff --git a/src/codedump.c b/src/codedump.c index b0a7676f0..b7dc421e2 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -461,6 +461,7 @@ codedump(mrb_state *mrb, const mrb_irep *irep) print_lv_a(mrb, irep, a); break; CASE(OP_STRING, BB): + mrb_assert((irep->pool[b].tt&IREP_TT_NFLAG)==0); if ((irep->pool[b].tt & IREP_TT_NFLAG) == 0) { printf("OP_STRING\tR%d\tL(%d)\t; %s", a, b, irep->pool[b].u.str); } -- cgit v1.2.3