From: Jérémie Astor Date: Mon, 24 Feb 2020 23:35:15 +0000 (+0100) Subject: :art: Make gack more dynamic X-Git-Tag: nightly~1726^2~71 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=529f9e81ed095ec8cb0f420386762745a6730cf6;p=gwion.git :art: Make gack more dynamic --- diff --git a/src/lib/gack.c b/src/lib/gack.c index 1fd00ed0..05bdecb8 100644 --- a/src/lib/gack.c +++ b/src/lib/gack.c @@ -63,6 +63,11 @@ ANN static void prepare_call(const VM_Shred shred, m_uint offset) { ANN void gack(const VM_Shred shred, const Instr instr) { Type t = (Type)instr->m_val; + if(isa(t, shred->info->vm->gwion->type[et_object]) > 0 && !GET_FLAG(t, force)) { + const M_Object o = *(M_Object*)(shred->reg - SZ_INT); + if(o) + t = o->type_ref; + } const VM_Code code = get_gack(t); if(GET_FLAG(code, builtin)) { ((f_gack)code->native_func)(t, (shred->reg - t->size), shred);