From: Jérémie Astor Date: Tue, 1 Sep 2020 18:40:30 +0000 (+0200) Subject: :bug: Some (func) types do not have tuples X-Git-Tag: nightly~1369 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=b6eab5b6870e6facfc06b7e0063d81a60491eec4;p=gwion.git :bug: Some (func) types do not have tuples --- diff --git a/src/emit/emit.c b/src/emit/emit.c index e7660b04..1169192a 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -78,6 +78,8 @@ ANN static inline void frame_push(Frame* frame) { } ANN static void struct_pop(const Emitter emit, const Type type, const m_uint offset) { + if(!type->e->tuple) + return; for(m_uint i = 0; i < vector_size(&type->e->tuple->types); ++i) { const Type t = (Type)vector_at(&type->e->tuple->types, i); if(isa(t, emit->gwion->type[et_object]) > 0) { @@ -1320,6 +1322,8 @@ DECL_EXP_FUNC(emit, m_bool, Emitter) ANN static void struct_addref(const Emitter emit, const Type type, const m_int size, const m_bool offset, const m_bool emit_var) { + if(!type->e->tuple) + return; for(m_uint i = 0; i < vector_size(&type->e->tuple->types); ++i) { const Type t = (Type)vector_at(&type->e->tuple->types, i); if(isa(t, emit->gwion->type[et_object]) > 0) {