]> Nishi Git Mirror - gwion.git/commitdiff
:art: Hunt internal (quest begin)
authorJérémie Astor <fennecdjay@gmail.com>
Wed, 18 Aug 2021 14:40:59 +0000 (16:40 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Wed, 18 Aug 2021 14:40:59 +0000 (16:40 +0200)
plug
src/lib/array.c
src/lib/event.c
src/lib/ptr.c
src/lib/ref.c
src/lib/shred.c
src/lib/string.c
src/lib/ugen.c
src/lib/vararg.c

diff --git a/plug b/plug
index 1753198efbf0afa6d21a05cd37b3fdba9e862bb1..dfdf1ccbc6577c55fe4754c4a59a02a1571d2964 160000 (submodule)
--- a/plug
+++ b/plug
@@ -1 +1 @@
-Subproject commit 1753198efbf0afa6d21a05cd37b3fdba9e862bb1
+Subproject commit dfdf1ccbc6577c55fe4754c4a59a02a1571d2964
index 009b2f51fbe4b3efc05c4ff9c699c31b86e6734d..5725413c3e792365dbc3d9548e0251f89a5abf99 100644 (file)
@@ -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"))
index 2b1cc33e157ebc9d02a1f5697f76eb8eef6b1c95..e833d17791d1eef0486623f64cfb90129a1df602 100644 (file)
@@ -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"))
index 52b522a378353528ad63b3997ac37a358db4b37a..1a0ace409667a053e1094ca2c999869d6fa70944 100644 (file)
@@ -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))
index 075f40876ce933be8179236d2d34b7b834dd2681..ba22c2d33366b810cba4bee9299bbc291a51ca63 100644 (file)
@@ -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))
 
index 6fb5beb33b5cbe7f2e79761b3aa26e70faf39615..d9afb132b18d9a13a10727681f780e737b8a9d78 100644 (file)
@@ -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");
index a96446af674cec8a61c4f664c39c9cf3fd014c3f..b5968bbbce7a8ada9737a5248f89b070b8c0cbcc 100644 (file)
@@ -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))
index 94aafb7257c2112ca4bd64924747826f57bda0ad..b8b1157ed42a116de0b6710e30e1183e5ba8d0e1 100644 (file)
@@ -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"))
index 8ab6c14e255c0baeed0feb5582805f2cd3e00abf..3f8210e38dfee06d56f8233649389e2ad0801d52 100644 (file)
@@ -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"))