From: fennecdjay Date: Mon, 24 Jun 2019 18:14:32 +0000 (+0200) Subject: :art: Arity X-Git-Tag: nightly~2387^2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=39f520e725bd731801be9f89c9fa2edf841c585b;p=gwion.git :art: Arity --- diff --git a/src/vm/vm_code.c b/src/vm/vm_code.c index a3376a12..dd197e56 100644 --- a/src/vm/vm_code.c +++ b/src/vm/vm_code.c @@ -40,7 +40,8 @@ ANN static void free_vm_code(VM_Code a, Gwion gwion) { mp_free(gwion->mp , VM_Code, a); } -ANN static m_bit* tobytecode(MemPool p, const VM_Code code, const Vector v) { +ANN static m_bit* tobytecode(MemPool p, const VM_Code code) { + const Vector v = code->instr; const m_uint sz = vector_size(v); m_bit *ptr = _mp_malloc(p, sz * BYTECODE_SZ); for(m_uint i= 0; i < sz; ++i) { @@ -66,7 +67,7 @@ VM_Code new_vm_code(MemPool p, const Vector instr, const m_uint stack_depth, VM_Code code = mp_calloc(p, VM_Code); if(instr) { code->instr = vector_copy(p, instr); - code->bytecode = tobytecode(p, code, instr); + code->bytecode = tobytecode(p, code); } code->name = mstrdup(p, name); code->stack_depth = stack_depth;