From: fennecdjay Date: Tue, 19 Jul 2022 16:05:13 +0000 (+0200) Subject: :bug: Avoid ahead of time emit of a class X-Git-Tag: nightly~264^2~87 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=add3ae8d8acdb7d061915bc9db8a304855ac38e7;p=gwion.git :bug: Avoid ahead of time emit of a class --- 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;