From: Jérémie Astor Date: Wed, 6 Jan 2021 22:43:24 +0000 (+0100) Subject: :art: update X-Git-Tag: nightly~1050 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=cdb995b86e7f792ea13b0e324faff0b6fa6a2c6c;p=gwion.git :art: update --- diff --git a/include/import/item.h b/include/import/item.h index 68de56e3..46a0cd69 100644 --- a/include/import/item.h +++ b/include/import/item.h @@ -3,6 +3,6 @@ ANN m_int gwi_item_ini(const Gwi gwi, const m_str type, const m_str name); ANN2(1) m_int gwi_item_end(const Gwi gwi, const ae_flag flag, union value_data); -//#define gwi_item_end(a, b, c) gwi_item_end(a, (const ae_flag)(b), c) +#define gwi_item_end(a, b, member, c) gwi_item_end(a, (ae_flag)(b), (union value_data){.member=c}) ANN void ck_clean_item(MemPool, ImportCK*); #endif diff --git a/plug b/plug index 70680a9f..9b46c464 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 70680a9f3ca9abb4b9003c9f69b1b9f33b81557e +Subproject commit 9b46c464a70f7f11d87796d97ad9fe57edcd5893 diff --git a/src/lib/array.c b/src/lib/array.c index 56b162bc..ddcdf9c9 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -394,9 +394,9 @@ GWION_IMPORT(array) { gwi->gwion->type[et_array] = t_array; gwi_class_xtor(gwi, NULL, array_dtor); GWI_BB(gwi_item_ini(gwi, "@internal", "@array")) - GWI_BB(gwi_item_end(gwi, 0, NULL)) + GWI_BB(gwi_item_end(gwi, 0, num, 0)) GWI_BB(gwi_item_ini(gwi, "@internal", "@ctor_data")) - GWI_BB(gwi_item_end(gwi, 0, NULL)) + GWI_BB(gwi_item_end(gwi, 0, num, 0)) GWI_BB(gwi_func_ini(gwi, "int", "size")) GWI_BB(gwi_func_end(gwi, vm_vector_size, ae_flag_none)) diff --git a/src/lib/event.c b/src/lib/event.c index 04ae61f7..47ca622d 100644 --- a/src/lib/event.c +++ b/src/lib/event.c @@ -53,7 +53,7 @@ GWION_IMPORT(event) { gwi->gwion->type[et_event] = t_event; // use func GWI_BB(gwi_item_ini(gwi, "@internal", "@shreds")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_func_ini(gwi, "void", "signal")) GWI_BB(gwi_func_end(gwi, event_signal, ae_flag_none)) GWI_BB(gwi_func_ini(gwi, "void", "broadcast")) diff --git a/src/lib/foreach.c b/src/lib/foreach.c index 6ca26469..56616401 100644 --- a/src/lib/foreach.c +++ b/src/lib/foreach.c @@ -32,7 +32,7 @@ GWION_IMPORT(foreach) { const Type t_foreach = gwi_struct_ini(gwi, "@Foreach:[A]"); set_tflag(t_foreach, tflag_ntmpl | tflag_infer); GWI_BB(gwi_item_ini(gwi, "@internal", "val")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_struct_end(gwi)) GWI_BB(gwi_oper_ini(gwi, "@Foreach", NULL, NULL)) GWI_BB(gwi_oper_add(gwi, opck_foreach_scan)) diff --git a/src/lib/prim_values.c b/src/lib/prim_values.c index c5ab56d9..4236549e 100644 --- a/src/lib/prim_values.c +++ b/src/lib/prim_values.c @@ -20,22 +20,22 @@ GWION_IMPORT(values) { VM* vm = gwi_vm(gwi); const m_float sr = vm->bbq->si->sr; gwi_item_ini(gwi, "float", "samplerate"); - gwi_item_end(gwi, ae_flag_const, sr); + gwi_item_end(gwi, ae_flag_const, fnum, sr); gwi_item_ini(gwi, "float", "pi"); - gwi_item_end(gwi, ae_flag_const, (m_float)M_PI); + gwi_item_end(gwi, ae_flag_const, fnum, M_PI); gwi_item_ini(gwi, "dur", "d_zero"); - gwi_item_end(gwi, ae_flag_const, (m_float)0.0); + gwi_item_end(gwi, ae_flag_const, fnum, 0.0); gwi_item_ini(gwi, "dur", "samp"); - gwi_item_end(gwi, ae_flag_const, (m_float)1.0); + gwi_item_end(gwi, ae_flag_const, fnum, 1.0); gwi_item_ini(gwi, "dur", "ms"); - gwi_item_end(gwi, ae_flag_const, (m_float)(sr/1000.0)); + gwi_item_end(gwi, ae_flag_const, fnum, sr/1000.0); gwi_item_ini(gwi, "dur", "second"); - gwi_item_end(gwi, ae_flag_const, sr); + gwi_item_end(gwi, ae_flag_const, fnum, sr); gwi_item_ini(gwi, "dur", "minute"); - gwi_item_end(gwi, ae_flag_const, (m_float)(sr*60.0)); + gwi_item_end(gwi, ae_flag_const, fnum, sr*60.0); gwi_item_ini(gwi, "dur", "hour"); - gwi_item_end(gwi, ae_flag_const, (m_float)(sr*60*60)); + gwi_item_end(gwi, ae_flag_const, fnum, sr*60*60); gwi_item_ini(gwi, "time", "t_zero"); - gwi_item_end(gwi, ae_flag_const, (m_float)0.0); + gwi_item_end(gwi, ae_flag_const, fnum, 0.0); return GW_OK; } diff --git a/src/lib/ptr.c b/src/lib/ptr.c index 501fb696..325d956f 100644 --- a/src/lib/ptr.c +++ b/src/lib/ptr.c @@ -174,7 +174,7 @@ GWION_IMPORT(ptr) { gwi->gwion->type[et_ptr] = t_ptr; GWI_BB(gwi_gack(gwi, t_ptr, gack_ptr)) GWI_BB(gwi_item_ini(gwi, "@internal", "@val")) - GWI_BB(gwi_item_end(gwi, 0, NULL)) + GWI_BB(gwi_item_end(gwi, 0, num, 0)) GWI_BB(gwi_class_end(gwi)) set_tflag(t_ptr, tflag_ntmpl); GWI_BB(gwi_oper_ini(gwi, "Ptr", NULL, NULL)) diff --git a/src/lib/shred.c b/src/lib/shred.c index eb0a751d..a52cc879 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -314,10 +314,10 @@ GWION_IMPORT(shred) { gwi_class_xtor(gwi, NULL, shred_dtor); gwi_item_ini(gwi, "@internal", "@me"); - GWI_BB(gwi_item_end(gwi, ae_flag_const, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_const, num, 0)) gwi_item_ini(gwi, "int", "cancel"); - GWI_BB((o_shred_cancel = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_shred_cancel = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_func_ini(gwi, "void", "exit"); GWI_BB(gwi_func_end(gwi, gw_shred_exit, ae_flag_none)) @@ -386,17 +386,17 @@ GWION_IMPORT(shred) { gwi->gwion->type[et_fork] = t_fork; gwi_item_ini(gwi, "@internal", "@thread"); - GWI_BB((o_fork_thread = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_fork_thread = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_item_ini(gwi, "@internal", "@cond"); - GWI_BB((o_fork_cond = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_fork_cond = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_item_ini(gwi, "@internal", "@mutex"); - GWI_BB((o_fork_mutex = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_fork_mutex = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_item_ini(gwi, "int", "is_done"); - GWI_BB((o_fork_done = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_fork_done = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_item_ini(gwi, "Event", "ev"); - GWI_BB((o_fork_ev = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_fork_ev = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_item_ini(gwi, "int", "retsize"); - GWI_BB((o_fork_retsize = gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((o_fork_retsize = gwi_item_end(gwi, ae_flag_const, num, 0))) gwi_func_ini(gwi, "void", "join"); GWI_BB(gwi_func_end(gwi, fork_join, ae_flag_none)) gwi_func_ini(gwi, "void", "test_cancel"); @@ -406,7 +406,7 @@ GWION_IMPORT(shred) { const Type t_typed = gwi_class_ini(gwi, "TypedFork:[A]", "Fork"); gwi_item_ini(gwi, "A", "retval"); - GWI_BB((gwi_item_end(gwi, ae_flag_const, NULL))) + GWI_BB((gwi_item_end(gwi, ae_flag_const, num, 0))) GWI_BB(gwi_class_end(gwi)) SET_FLAG(t_typed, abstract | ae_flag_final); set_tflag(t_typed, tflag_ntmpl); diff --git a/src/lib/string.c b/src/lib/string.c index c87854b3..651f2d25 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -364,7 +364,7 @@ GWION_IMPORT(string) { GWI_BB(gwi_gack(gwi, t_string, gack_string)) gwi_item_ini(gwi, "@internal", "@data"); - GWI_BB(gwi_item_end(gwi, ae_flag_const, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_const, num, 0)) gwi_func_ini(gwi, "int", "size"); GWI_BB(gwi_func_end(gwi, string_len, ae_flag_none)) diff --git a/src/lib/ugen.c b/src/lib/ugen.c index 0cdfc8c1..294497a9 100644 --- a/src/lib/ugen.c +++ b/src/lib/ugen.c @@ -352,7 +352,7 @@ ANN static UGen add_ugen(const Gwi gwi, struct ugen_importer* imp) { ugen_gen(vm->gwion, u, imp->tick, (void*)imp->vm, 0); vector_add(&vm->ugen, (vtype)u); gwi_item_ini(gwi, "UGen", imp->name); - gwi_item_end(gwi, ae_flag_const, o); + gwi_item_end(gwi, ae_flag_const, obj, o); return u; } @@ -380,7 +380,7 @@ GWION_IMPORT(ugen) { gwi->gwion->type[et_ugen] = t_ugen; // use func GWI_BB(gwi_item_ini(gwi, "@internal", "@ugen")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_func_ini(gwi, "UGen", "chan")) GWI_BB(gwi_func_arg(gwi, "int", "arg0")) diff --git a/src/lib/union.c b/src/lib/union.c index cb06211c..06afa9aa 100644 --- a/src/lib/union.c +++ b/src/lib/union.c @@ -168,7 +168,7 @@ ANN GWION_IMPORT(union) { const Type t_union = gwi_class_ini(gwi, "@Union", "Object"); gwi_class_xtor(gwi, NULL, UnionDtor); GWI_BB(gwi_item_ini(gwi, "int", "@index")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_func_ini(gwi, "bool", "is")) GWI_BB(gwi_func_arg(gwi, "int", "member")) GWI_BB(gwi_func_end(gwi, union_is, ae_flag_none)) diff --git a/src/lib/vararg.c b/src/lib/vararg.c index e723df45..644c71bd 100644 --- a/src/lib/vararg.c +++ b/src/lib/vararg.c @@ -164,17 +164,17 @@ GWION_IMPORT(vararg) { gwi_class_xtor(gwi, NULL, vararg_dtor); gwi_gack(gwi, t_vararg, gack_vararg); GWI_BB(gwi_item_ini(gwi, "@internal", "@data")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_item_ini(gwi, "int", "@inLoop")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_item_ini(gwi, "int", "@len")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_item_ini(gwi, "int", "@o")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_item_ini(gwi, "int", "@i")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_item_ini(gwi, "int", "@s")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL)) + GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_func_ini(gwi, "Vararg", "cpy")) GWI_BB(gwi_func_end(gwi, mfun_vararg_cpy, ae_flag_none)) GWI_BB(gwi_class_end(gwi))