From: fennecdjay Date: Wed, 1 Feb 2023 15:16:03 +0000 (+0100) Subject: :art: update X-Git-Tag: nightly~205^2~6 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d706b30766e01b4db983652ad182bcb6e8dc363d;p=gwion.git :art: update --- diff --git a/include/vm.h b/include/vm.h index c1a7597a..54cac881 100644 --- a/include/vm.h +++ b/include/vm.h @@ -137,7 +137,7 @@ ANN uint32_t gw_rand(uint32_t s[2]); ANN void gw_seed(uint32_t s[2], const uint64_t); ANN bool handle(VM_Shred shred, const m_str effect); #define xfun_handle(shred, effect) {\ - shred->mem -= ((Instr)vector_at(&shred->code->instr, shred->pc-1))->m_val2; \ +/* shred->mem -= ((Instr)vector_at(&shred->code->instr, shred->pc-1))->m_val2; */\ handle(shred, effect); \ } diff --git a/src/emit/emit.c b/src/emit/emit.c index 30b300d3..5d0cd104 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -139,12 +139,12 @@ ANN void emit_object_release(const Emitter emit, const m_uint offset) { ANN void emit_compound_release(const Emitter emit, const Type t, const m_uint offset) { if(tflag(t, tflag_compound)) return emit_object_release(emit, offset); - if(tflag(t, tflag_release)) - emit_struct_release(emit, t, offset); + emit_struct_release(emit, t, offset); } ANN void emit_struct_release(const Emitter emit, const Type type, const m_uint offset) { + if(!tflag(type, tflag_release)) return; const Instr instr = emit_add_instr(emit, StructReleaseMem); instr->m_val = offset; instr->m_val2 = (m_uint)type; @@ -788,13 +788,13 @@ ANN static void emit_gack_type(const Emitter emit, const Exp e) { (e->exp_type == ae_exp_primary && e->d.prim.prim_type == ae_prim_str)) return; const m_bool isobj = isa(e->type, emit->gwion->type[et_object]) > 0; - if (isobj && (tflag(e->type, tflag_ref) || !GET_FLAG(e->type, final))) + if (isobj && (tflag(e->type, tflag_ref) || !GET_FLAG(e->type, final))) emit_add_instr(emit, GackType); } ANN /*static*/ m_bool emit_interp(const Emitter emit, const Exp exp) { emit_pushimm(emit, 0); - emit_local(emit, emit->gwion->type[et_int]); + //emit_local(emit, emit->gwion->type[et_int]); Exp e = exp, next = NULL; do { next = e->next; diff --git a/tests/error/array_invalid1.gw b/tests/error/array_invalid1.gw index 490d340e..4a1bb88b 100644 --- a/tests/error/array_invalid1.gw +++ b/tests/error/array_invalid1.gw @@ -1,2 +1,2 @@ -#! [contains] invalid format for array init +#! [contains] invalid array access [ [1,2] [3,4] ]; diff --git a/tests/error/array_mutable.gw b/tests/error/array_mutable.gw index f69954c6..33e53b22 100644 --- a/tests/error/array_mutable.gw +++ b/tests/error/array_mutable.gw @@ -1,2 +1,2 @@ #! [contains] non-mutable -[1,2,3,4] :=> [1][1]; +4 :=> [1][1]; diff --git a/util b/util index d1244811..19c13d54 160000 --- a/util +++ b/util @@ -1 +1 @@ -Subproject commit d12448118cc4366fb8871f1f149626969fad775a +Subproject commit 19c13d54cf5ed8f8e8ce63cca357da3fca28c6ad