diff --git a/extlib/benz/codegen.c b/extlib/benz/codegen.c index a31b8305..3bc11e0b 100644 --- a/extlib/benz/codegen.c +++ b/extlib/benz/codegen.c @@ -732,13 +732,6 @@ codegen_context_destroy(pic_state *pic, codegen_context *cxt) cxt->clen++; \ } while (0) \ -#define emit_c(pic, cxt, ins, C) do { \ - check_code_size(pic, cxt); \ - cxt->code[cxt->clen].insn = ins; \ - cxt->code[cxt->clen].u.c = C; \ - cxt->clen++; \ - } while (0) \ - #define emit_r(pic, cxt, ins, D, I) do { \ check_code_size(pic, cxt); \ cxt->code[cxt->clen].insn = ins; \ @@ -981,7 +974,7 @@ codegen_quote(pic_state *pic, codegen_context *cxt, pic_value obj, bool tailpos) emit_ret(pic, cxt, tailpos); break; case PIC_TT_CHAR: - emit_c(pic, cxt, OP_PUSHCHAR, pic_char(obj)); + emit_i(pic, cxt, OP_PUSHCHAR, pic_char(obj)); emit_ret(pic, cxt, tailpos); break; default: diff --git a/extlib/benz/include/picrin/irep.h b/extlib/benz/include/picrin/irep.h index efa5fc6e..872f3d23 100644 --- a/extlib/benz/include/picrin/irep.h +++ b/extlib/benz/include/picrin/irep.h @@ -13,7 +13,6 @@ typedef struct { int insn; union { int i; - char c; struct { int depth; int idx; diff --git a/extlib/benz/vm.c b/extlib/benz/vm.c index 3e73578d..6e846c20 100644 --- a/extlib/benz/vm.c +++ b/extlib/benz/vm.c @@ -411,7 +411,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, int argc, pic_value *argv) NEXT; } CASE(OP_PUSHCHAR) { - PUSH(pic_char_value(c.u.c)); + PUSH(pic_char_value(c.u.i)); NEXT; } CASE(OP_PUSHCONST) {