]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix previous commit
authorJérémie Astor <fennecdjay@gmail.com>
Thu, 2 Sep 2021 19:18:39 +0000 (21:18 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Thu, 2 Sep 2021 19:18:39 +0000 (21:18 +0200)
src/vm/vm.c

index 6e1a0daec26dad7d1aa0b49294afdaf677e7fd5f..d2041e19f6fe2271ae4729838447ef133ff4f44f 100644 (file)
@@ -480,7 +480,7 @@ vm_run(const VM *vm) { // lgtm [cpp/use-of-goto]
       &&sporkini, &&forkini, &&sporkfunc, &&sporkmemberfptr, &&sporkexp,
       &&sporkend, &&brancheqint, &&branchneint, &&brancheqfloat,
       &&branchnefloat, &&unroll, &&arrayappend, &&autounrollinit, &&autoloop,
-      &&arraytop, &&arrayaccess, &&arrayget, &&arrayaddr, &&arraygetobj, &&newobj, &&addref,
+      &&arraytop, &&arrayaccess, &&arrayget, &&arrayaddr, &&newobj, &&addref,
       &&addrefaddr, &&structaddref, &&structaddrefaddr, &&objassign, &&assign,
       &&remref, &&except, &&allocmemberaddr, &&dotmember, &&dotfloat,
       &&dotother, &&dotaddr, &&unioncheck, &&unionint, &&unionfloat,
@@ -1065,15 +1065,6 @@ vm_run(const VM *vm) { // lgtm [cpp/use-of-goto]
           m_vector_addr(ARRAY(a.obj), *(m_int *)(reg + VAL));
       PRAGMA_POP()
       DISPATCH()
-    arraygetobj:
-      PRAGMA_PUSH()
-      m_vector_get(ARRAY(a.obj), *(m_int *)(reg + VAL), (reg + IVAL2));
-      if(!*(M_Object*)(reg + IVAL2)) {
-        handle(shred, "EmptyArrayAccess");
-        continue;
-      }
-      PRAGMA_POP()
-      DISPATCH()
     newobj:
       *(M_Object *)reg = new_object(vm->gwion->mp, NULL, (Type)VAL2);
       reg += SZ_INT;