From: Jérémie Astor Date: Sat, 4 Sep 2021 16:11:01 +0000 (+0200) Subject: :art: Fix static decl leak X-Git-Tag: nightly~470^2~16 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d78cc3b896fc4b0cbb741d0d72cfb8563761fdc2;p=gwion.git :art: Fix static decl leak --- diff --git a/src/emit/emit.c b/src/emit/emit.c index b02a6b01..c8c80fee 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -812,8 +812,8 @@ ANN static m_bool decl_static(const Emitter emit, const Exp_Decl *decl, emit_instantiate_decl(emit, v->type, decl->td, var_decl->array, is_ref)); CHECK_BB(emit_dot_static_data(emit, v, 1)); emit_add_instr(emit, Assign); - if(get_depth(var_decl->value->type) && !is_ref) - (void)emit_object_addref(emit, -SZ_INT, 0); +// if(get_depth(var_decl->value->type) && !is_ref) +// (void)emit_object_addref(emit, -SZ_INT, 0); regpop(emit, SZ_INT); emit->code = code; return GW_OK;