From: Jérémie Astor Date: Thu, 12 May 2022 20:46:12 +0000 (+0200) Subject: :art: Update BMI again X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2c68d7bc3bfe1d937f1113fab8c32e271bb93eec;p=gwion.git :art: Update BMI again --- diff --git a/plug b/plug index 862a5199..5a583451 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 862a51991bef3cc4c86bf195101780b61563ca25 +Subproject commit 5a583451cd50f26867cf18c9bd309e3cc0f523d2 diff --git a/src/emit/emit.c b/src/emit/emit.c index ce61d198..737c63b7 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -650,7 +650,7 @@ ANN static m_bool emit_prim_array(const Emitter emit, const Array_Sub *data) { regseti(emit, count); const Instr instr = emit_add_instr(emit, ArrayInit); instr->m_val = (m_uint)type; - instr->m_val2 = array_base_simple(type)->size; + instr->m_val2 = type->array_depth == 1 ? array_base_simple(type)->size : SZ_INT; emit_local_exp(emit, prim_exp(data)); emit_notpure(emit); return GW_OK; diff --git a/src/parse/partial.c b/src/parse/partial.c index b78fa535..94b5dac4 100644 --- a/src/parse/partial.c +++ b/src/parse/partial.c @@ -23,7 +23,8 @@ ANN static Arg_List partial_arg_list(const Env env, const Arg_List base, const E sprintf(c, "@%u", args->len); const Arg *src = mp_vector_at(base, Arg, i); Type_Decl *td = src->td ? cpy_type_decl(env->gwion->mp, src->td) : NULL; - Arg arg = { .td = td, .var_decl = { .xid = insert_symbol(c) }}; + const Array_Sub array = src->var_decl.array ? cpy_array_sub(env->gwion->mp, src->var_decl.array) : NULL; + Arg arg = { .td = td, .var_decl = { .xid = insert_symbol(c), .array = array }}; mp_vector_add(env->gwion->mp, &args, Arg, arg); } i++;