]> Nishi Git Mirror - gwion.git/commitdiff
:art: LGTM
authorJérémie Astor <fennecdjay@gmail.com>
Wed, 20 Apr 2022 10:27:09 +0000 (12:27 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Wed, 20 Apr 2022 10:27:09 +0000 (12:27 +0200)
ast
fmt
src/emit/emit.c
src/lib/dict.c
src/main.c
src/parse/template.c

diff --git a/ast b/ast
index 95366beda5cdee923011fa5cf53269c74a1ec791..1dbe4b1915f5b958a5ab8ec2a4b98aa5100e8981 160000 (submodule)
--- a/ast
+++ b/ast
@@ -1 +1 @@
-Subproject commit 95366beda5cdee923011fa5cf53269c74a1ec791
+Subproject commit 1dbe4b1915f5b958a5ab8ec2a4b98aa5100e8981
diff --git a/fmt b/fmt
index 2d8880671c5dcab3f2f67e6e7a5a8c40eeecd962..cf3523938d57ae658952b1104f8b91dbd3dd8ea2 160000 (submodule)
--- a/fmt
+++ b/fmt
@@ -1 +1 @@
-Subproject commit 2d8880671c5dcab3f2f67e6e7a5a8c40eeecd962
+Subproject commit cf3523938d57ae658952b1104f8b91dbd3dd8ea2
index 0c5787d8d38dead925eb895165c10d1d5e75bfe7..5d5ce8589900d76ece415c75caf86a8d5943bf46 100644 (file)
@@ -1985,12 +1985,12 @@ ANN2(1,2) static Instr _flow(const Emitter emit, const Exp e, Instr *const instr
 //  CHECK_BO(emit_exp_pop_next(emit, e));
   CHECK_BO(emit_exp(emit, e));
   {
-    const Instr instr = (Instr)vector_back(&emit->code->instr);
-    if(instr->execute == fast_except) {
+    const Instr ex = (Instr)vector_back(&emit->code->instr);
+    if(ex->execute == fast_except) {
       vector_rem(&emit->code->instr, vector_size(&emit->code->instr) - 1);
-      if(instr->m_val2)
-        mp_free2(emit->gwion->mp, sizeof(struct FastExceptInfo), (struct FastExceptInfo*)instr->m_val2);
-      free_instr(emit->gwion, instr);
+      if(ex->m_val2)
+        mp_free2(emit->gwion->mp, sizeof(struct FastExceptInfo), (struct FastExceptInfo*)ex->m_val2);
+      free_instr(emit->gwion, ex);
     }
   }
   if(instr)
index 0e85c398e9dbbaa8c562890f45dced617f06a926..98d4f121a0fabde8ae80554ba4dd216f89190aa9 100644 (file)
@@ -488,8 +488,8 @@ static OP_EMIT(opem_dict_remove) {
   CHECK_BB(emit_dict_iter(emit, hinfo, &opi, &call, bin->lhs));
   if(hinfo->keyk || hinfo->valk) {
     clear_fn *const fn = clear[hinfo->keyk][hinfo->valk];
-    const Instr clear = emit_add_instr(emit, hmap_remove_clear);
-    clear->m_val = (m_uint)fn;
+    const Instr instr = emit_add_instr(emit, hmap_remove_clear);
+    instr->m_val = (m_uint)fn;
   }
 
   const Instr pushval = emit_add_instr(emit, hmap_remove);
index 1a0a5f4f75a927050376063e66cb0c1e8cdf7f87..1811e9dcdf891adad55ee0406804c4babca8c0ce 100644 (file)
@@ -44,7 +44,6 @@ int main(int argc, char **argv) {
   CliArg arg = {.arg = {.argc = argc, .argv = argv}, .loop = false};
   signal(SIGINT, sig);
   signal(SIGTERM, sig);
-  struct Gwion_ gwion = {};
   const m_bool  ini   = gwion_ini(&gwion, &arg);
   arg_release(&arg);
   if (ini > 0) gwion_run(&gwion);
index 69d3d53cc363cdf6fc48c26f8d2d0300fe1dca04..3cb6fcd1797448fd613b637efa6c9ca562ddd932 100644 (file)
@@ -132,8 +132,8 @@ ANN static Type _scan_type(const Env env, const Type t, Type_Decl *td) {
     Specialized_List    sl = t->info->cdef->base.tmpl
         ? t->info->cdef->base.tmpl->list : NULL;
     for(uint32_t i = 0; i < tl->len; i++) {
-      Type_Decl *td = *mp_vector_at(tl, Type_Decl*, i);
-      DECL_OO(const Type, t, = known_type(env, td));
+      Type_Decl *tmp = *mp_vector_at(tl, Type_Decl*, i);
+      DECL_OO(const Type, t, = known_type(env, tmp));
         Specialized *spec = mp_vector_at(sl, Specialized, i);
         if(spec->traits) {
           Symbol missing = miss_traits(t, spec);