diff options
| author | 2025-05-11 09:25:12 +0200 | |
|---|---|---|
| committer | 2025-05-11 09:25:21 +0200 | |
| commit | 24fe6921b63cc2b2145547f37218e630682b0fe6 (patch) | |
| tree | be542942848dc250ddce9c5110a3e6a2ee31a170 | |
| parent | 96cc96cb635f31a62582c04a7d0b6b3c75b4f019 (diff) | |
fix bytecode constants reuse
| -rw-r--r-- | pez.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1336,6 +1336,7 @@ inspectproto(Proto *pr) assert(*argp < pr->ncon); v = pr->con[*argp]; assert(isobj_of(v, PEZ_TString)); + fprintf(stderr, "(%d) ", *argp); inspectstr(((Str *)unbox_obj(v))->dat, ((Str *)unbox_obj(v))->len); break; case Olambda: @@ -1344,6 +1345,7 @@ inspectproto(Proto *pr) v = pr->con[*argp]; assert(isobj_of(v, PEZ_TFnProto)); opr = unbox_obj(v); + fprintf(stderr, "(%d) ", *argp); if (opr->named) { fprintf(stderr, "<'%s %p>", opr->name, opr); } else { @@ -2559,8 +2561,8 @@ compconst(Comp *cm, Val v) if (cm->con.len == UINT8_MAX) { return comperr(cm, peekchr(cm), "too many consts"), 0; } - K: vecpush(cm->cx, &cm->con, &v, 1); + K: TRY(compop(cm, Ostring)); TRY(compbyte(cm, idx)); return 1; |