From: Jérémie Astor Date: Wed, 18 Aug 2021 14:40:59 +0000 (+0200) Subject: :art: Hunt internal (quest begin) X-Git-Tag: nightly~470^2~54 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9cf318e8a6869e2f91b4c39537566c91338d6f60;p=gwion.git :art: Hunt internal (quest begin) --- diff --git a/plug b/plug index 1753198e..dfdf1ccb 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 1753198efbf0afa6d21a05cd37b3fdba9e862bb1 +Subproject commit dfdf1ccbc6577c55fe4754c4a59a02a1571d2964 diff --git a/src/lib/array.c b/src/lib/array.c index 009b2f51..5725413c 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -755,10 +755,6 @@ GWION_IMPORT(array) { gwi->gwion->type[et_array] = t_array; gwi_class_xtor(gwi, NULL, array_dtor); t_array->nspc->offset += SZ_INT*2; -// GWI_BB(gwi_item_ini(gwi, "@internal", "@array")) -// 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, num, 0)) GWI_BB(gwi_fptr_ini(gwi, "A", "map_t:[A]")) GWI_BB(gwi_func_arg(gwi, "T", "elem")) diff --git a/src/lib/event.c b/src/lib/event.c index 2b1cc33e..e833d177 100644 --- a/src/lib/event.c +++ b/src/lib/event.c @@ -45,9 +45,7 @@ GWION_IMPORT(event) { const Type t_event = gwi_class_ini(gwi, "Event", "Object"); gwi_class_xtor(gwi, event_ctor, event_dtor); 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, num, 0)) + t_event->nspc->offset += SZ_INT; 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/ptr.c b/src/lib/ptr.c index 52b522a3..1a0ace40 100644 --- a/src/lib/ptr.c +++ b/src/lib/ptr.c @@ -181,8 +181,7 @@ GWION_IMPORT(ptr) { const Type t_ptr = gwi_struct_ini(gwi, "Ptr:[A]"); 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, num, 0)) + t_ptr->nspc->offset += SZ_INT; GWI_BB(gwi_class_end(gwi)) GWI_BB(gwi_oper_ini(gwi, "Ptr", NULL, NULL)) GWI_BB(gwi_oper_add(gwi, opck_ptr_scan)) diff --git a/src/lib/ref.c b/src/lib/ref.c index 075f4087..ba22c2d3 100644 --- a/src/lib/ref.c +++ b/src/lib/ref.c @@ -91,8 +91,7 @@ GWION_IMPORT(ref) { set_tflag(t_foreach, tflag_infer); gwinote(gwi, "a pointer to the referenced variable."); - GWI_BB(gwi_item_ini(gwi, "@internal", "val")) - GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) + t_foreach->nspc->offset += SZ_INT; GWI_BB(gwi_struct_end(gwi)) diff --git a/src/lib/shred.c b/src/lib/shred.c index 6fb5beb3..d9afb132 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -304,8 +304,7 @@ GWION_IMPORT(shred) { const Type t_shred = gwi_class_ini(gwi, "Shred", NULL); gwi_class_xtor(gwi, NULL, shred_dtor); - gwi_item_ini(gwi, "@internal", "@me"); - GWI_BB(gwi_item_end(gwi, ae_flag_const, num, 0)) + t_shred->nspc->offset += SZ_INT; gwi_item_ini(gwi, "int", "cancel"); GWI_BB((o_shred_cancel = gwi_item_end(gwi, ae_flag_const, num, 0))) @@ -375,13 +374,13 @@ GWION_IMPORT(shred) { const Type t_fork = gwi_class_ini(gwi, "Fork", "Shred"); gwi_class_xtor(gwi, NULL, fork_dtor); gwi->gwion->type[et_fork] = t_fork; + o_fork_thread = t_fork->nspc->offset; + t_fork->nspc->offset += SZ_INT; + o_fork_cond = t_fork->nspc->offset; + t_fork->nspc->offset += SZ_INT; + o_fork_mutex = t_fork->nspc->offset; + t_fork->nspc->offset += SZ_INT; - gwi_item_ini(gwi, "@internal", "@thread"); - 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, num, 0))) - gwi_item_ini(gwi, "@internal", "@mutex"); - 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, num, 0))) gwi_item_ini(gwi, "Event", "ev"); diff --git a/src/lib/string.c b/src/lib/string.c index a96446af..b5968bbb 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -370,9 +370,7 @@ GWION_IMPORT(string) { gwi->gwion->type[et_string] = t_string; // use func gwi_class_xtor(gwi, string_ctor, string_dtor); GWI_BB(gwi_gack(gwi, t_string, gack_string)) - - gwi_item_ini(gwi, "@internal", "@data"); - GWI_BB(gwi_item_end(gwi, ae_flag_const, num, 0)) + t_string->nspc->offset += SZ_INT; 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 94aafb72..b8b1157e 100644 --- a/src/lib/ugen.c +++ b/src/lib/ugen.c @@ -393,9 +393,7 @@ GWION_IMPORT(ugen) { const Type t_ugen = gwi_class_ini(gwi, "UGen", NULL); gwi_class_xtor(gwi, ugen_ctor, ugen_dtor); 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, num, 0)) + t_ugen->nspc->offset += SZ_INT; GWI_BB(gwi_func_ini(gwi, "UGen", "chan")) GWI_BB(gwi_func_arg(gwi, "int", "arg0")) diff --git a/src/lib/vararg.c b/src/lib/vararg.c index 8ab6c14e..3f8210e3 100644 --- a/src/lib/vararg.c +++ b/src/lib/vararg.c @@ -167,8 +167,7 @@ GWION_IMPORT(vararg) { const Type t_vararg = gwi_class_ini(gwi, "Vararg", "Object"); 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, num, 0)) + t_vararg->nspc->offset += SZ_INT; GWI_BB(gwi_item_ini(gwi, "int", "@inLoop")) GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0)) GWI_BB(gwi_item_ini(gwi, "int", "@len"))