From add3ae8d8acdb7d061915bc9db8a304855ac38e7 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 19 Jul 2022 18:05:13 +0200 Subject: [PATCH] :bug: Avoid ahead of time emit of a class --- src/emit/emit.c | 1 + src/emit/emitter.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index c38377cf..bdc8a984 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -138,6 +138,7 @@ ANN /*static */ m_bool emit_cdef(const Emitter, const Type); ANN /*static inline*/ m_bool ensure_emit(const Emitter emit, const Type t) { if (tflag(t, tflag_emit) || !(tflag(t, tflag_cdef) || tflag(t, tflag_udef))) return GW_OK; // clean callers +if(!tflag(t, tflag_tmpl))return GW_OK; struct EnvSet es = {.env = emit->env, .data = emit, .func = (_exp_func)emit_cdef, diff --git a/src/emit/emitter.c b/src/emit/emitter.c index f5669edf..d15592e8 100644 --- a/src/emit/emitter.c +++ b/src/emit/emitter.c @@ -36,7 +36,7 @@ ANN void free_emitter(MemPool p, Emitter a) { } __attribute__((returns_nonnull)) ANN2(1) Instr - emit_add_instr(const Emitter emit, const f_instr f) { +emit_add_instr(const Emitter emit, const f_instr f) { const Instr instr = mp_calloc(emit->gwion->mp, Instr); if ((m_uint)f < 255) instr->opcode = (m_uint)f; -- 2.43.0