From 34f3fca5f13728c2998ef7a03058fcc269b968c4 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 20 Feb 2023 13:46:55 +0100 Subject: [PATCH] :art: Update --- ast | 2 +- fmt | 2 +- plug | 2 +- src/arg.c | 38 +++++++++++++++++++------------------- src/emit/emit.c | 1 + src/env/nspc.c | 5 +++-- util | 2 +- 7 files changed, 27 insertions(+), 25 deletions(-) diff --git a/ast b/ast index d8d61d8a..8fd51451 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit d8d61d8a6395dd2b79e96bd1fcaaec54e324685b +Subproject commit 8fd514519a4e811a450508b96a8e7f0893220210 diff --git a/fmt b/fmt index 7e9001e5..5f22a51a 160000 --- a/fmt +++ b/fmt @@ -1 +1 @@ -Subproject commit 7e9001e585e1e8f0813d5569977b3a18a3a52520 +Subproject commit 5f22a51a47f2fe5f1d7f1d52822ba0b08b2d3688 diff --git a/plug b/plug index ce09a14c..1e179307 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit ce09a14cc01ba003fcbc2120f5a4434e6cccc671 +Subproject commit 1e179307891760893f9bd880c9ee0e3d391aa869 diff --git a/src/arg.c b/src/arg.c index 1c1a7e73..4f4f4e1c 100644 --- a/src/arg.c +++ b/src/arg.c @@ -174,42 +174,42 @@ ANN2(1) static void module_arg(const Map map, const char *str) { } static void setup_options(cmdapp_t *app, cmdopt_t *opt) { - cmdapp_set(app, 'C', "config", CMDOPT_TAKESARG, NULL, "parse a config file", + cmdapp_set(app, 'C', "config", CMDOPT_TAKESARG, NULL, "parse a config file", "{Y}path{0}", &opt[CONFIG]); cmdapp_set(app, 'p', "plugdir", CMDOPT_TAKESARG, NULL, - "add ARG to the plugin search path", &opt[PLUGIN]); + "add ARG to the plugin search path", "directory", &opt[PLUGIN]); cmdapp_set(app, 'm', "module", CMDOPT_TAKESARG, NULL, - "activate module (and arguments)", &opt[MODULE]); - cmdapp_set(app, 'l', "loop", CMDOPT_TAKESARG, NULL, "set loop mode", + "activate module", "arguments", &opt[MODULE]); + cmdapp_set(app, 'l', "loop", CMDOPT_TAKESARG, NULL, "set loop mode", "boolean", &opt[LOOP]); - cmdapp_set(app, 'g', "passes", CMDOPT_TAKESARG, NULL, "set pass order", + cmdapp_set(app, 'g', "passes", CMDOPT_TAKESARG, NULL, "comma separted list of passes", "{B}passes{0}", &opt[PASS]); - cmdapp_set(app, '\0', "stdin", 0, NULL, "read from stdin", &opt[STDIN]); + cmdapp_set(app, '\0', "stdin", 0, NULL, "read from stdin", NULL, &opt[STDIN]); cmdapp_set(app, 'c', "color", CMDOPT_TAKESARG, NULL, - "set colored output (never/auto/always, defaults to auto)", + "when to use {R}c{G}o{B}l{Y}o{M}r{C}s{0} (defaults to auto)", "{+}never{-}/auto/always", &opt[COLOR]); // sound options cmdapp_set(app, 'd', "driver", CMDOPT_TAKESARG, NULL, - "set driver (and arguments)", &opt[DRIVER]); + "set driver (and arguments)", "arguments", &opt[DRIVER]); cmdapp_set(app, 's', "samplerate", CMDOPT_TAKESARG, NULL, - "set the samplerate", &opt[SRATE]); + "set the samplerate", "integer", &opt[SRATE]); cmdapp_set(app, 'i', "input", CMDOPT_TAKESARG, NULL, - "number of input channel", &opt[NINPUT]); + "number of input channel", "integer", &opt[NINPUT]); cmdapp_set(app, 'o', "output", CMDOPT_TAKESARG, NULL, - "number of output channel", &opt[NOUTPUT]); - cmdapp_set(app, 'P', "plugin", CMDOPT_TAKESARG, NULL, "(force-)load a plugin", + "number of output channel", "integer", &opt[NOUTPUT]); + cmdapp_set(app, 'P', "plugin", CMDOPT_TAKESARG, NULL, "(force-)load a plugin", "name", &opt[LOAD_PLUGIN]); - cmdapp_set(app, 'D', "define", CMDOPT_TAKESARG, NULL, "define a macro", + cmdapp_set(app, 'D', "define", CMDOPT_TAKESARG, NULL, "define a macro", "macro", &opt[DEFINE]); - cmdapp_set(app, 'U', "undef", CMDOPT_TAKESARG, NULL, "undefine a macro", + cmdapp_set(app, 'U', "undef", CMDOPT_TAKESARG, NULL, "undefine a macro", "macro", &opt[UNDEF]); cmdapp_set(app, 'I', "include", CMDOPT_TAKESARG, NULL, - "add ARG to include path", &opt[INCLUDE]); - cmdapp_set(app, 'G', "debug", CMDOPT_MAYTAKEARG, NULL, "set/unset debug mode", + "add ARG to include path", "directory", &opt[INCLUDE]); + cmdapp_set(app, 'G', "debug", CMDOPT_MAYTAKEARG, NULL, "set/unset debug mode","bool", &opt[DEBUG]); - cmdapp_set(app, 'B', "dump", CMDOPT_MAYTAKEARG, NULL, "set/unset bytecode dump", + cmdapp_set(app, 'B', "dump", CMDOPT_MAYTAKEARG, NULL, "set/unset bytecode dump", "bool", &opt[DUMP]); - cmdapp_set(app, 'H', "cdoc", CMDOPT_MAYTAKEARG, NULL, "set/unset cdoc mode", + cmdapp_set(app, 'H', "cdoc", CMDOPT_MAYTAKEARG, NULL, "set/unset cdoc mode", "bool", &opt[CDOC]); } @@ -358,7 +358,7 @@ ANN m_bool _arg_parse(struct ArgInternal *arg) { .author = "Jérémie Astor", .year = 2016, .description = "Strongly timed musical programming language.", - .help_des_offset = 28, + .help_des_offset = 32, .ver_extra = "License GPLv3+: GNU GPL version 3 or later " "\n" diff --git a/src/emit/emit.c b/src/emit/emit.c index 8cd85a04..24c299c9 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -2254,6 +2254,7 @@ ANN static m_bool _emit_stmt_each(const Emitter emit, const Stmt_Each stmt, const m_uint key_offset = /*!stmt->idx ? */emit_local(emit, emit->gwion->type[et_int]) /*: emit_local(emit, stmt->idx->v->type)*/; + const m_uint val_offset = emit_localn(emit, stmt->v->type); // localn ? emit_regtomem(emit, arr_offset, 0); emit_memsetimm(emit, key_offset, -1); diff --git a/src/env/nspc.c b/src/env/nspc.c index 5fe2b286..2480815e 100644 --- a/src/env/nspc.c +++ b/src/env/nspc.c @@ -16,11 +16,12 @@ ANN void nspc_commit(const Nspc nspc) { static inline void _free_nspc_value(const Nspc a, const Value v, Gwion gwion) { if(v->from->ctx && v->from->ctx->error) return; // this is quite a hack if (GET_FLAG(v, static) && a->class_data) { - const m_bit *ptr = *(m_bit **)(a->class_data + v->from->offset); + const m_bit *ptr = a->class_data + v->from->offset; anytype_release(gwion->vm->cleaner_shred, v->type, ptr); } else if (vflag(v, vflag_builtin) && v->d.ptr) { const m_bit *ptr = (m_bit*)v->d.ptr; - anytype_release(gwion->vm->cleaner_shred, v->type, ptr); + //if(vflag(v, vflag_direct)) + anytype_release(gwion->vm->cleaner_shred, v->type, ptr); } value_remref(v, gwion); } diff --git a/util b/util index 19c13d54..89ebe182 160000 --- a/util +++ b/util @@ -1 +1 @@ -Subproject commit 19c13d54cf5ed8f8e8ce63cca357da3fca28c6ad +Subproject commit 89ebe182f7b7e654c8bbf45e675feced02e42c48 -- 2.43.0