ANN static void emit_func_arg_vararg(const Emitter emit,
const Exp_Call *exp_call) {
const Instr instr = emit_add_instr(emit, VarargIni);
- const Vector kinds = new_vector(emit->gwion->mp);
- if ((instr->m_val = vararg_size(emit->gwion, exp_call, kinds)))
- instr->m_val2 = (m_uint)kinds;
+ struct Vector_ kinds;
+ vector_init(&kinds);
+ if ((instr->m_val = vararg_size(emit->gwion, exp_call, &kinds)))
+ instr->m_val2 = (m_uint)kinds.ptr;
else
- free_vector(emit->gwion->mp, kinds);
+ vector_release(&kinds);
}
ANN static m_bool emit_func_args(const Emitter emit, const Exp_Call *exp_call) {
POP_REG(shred, instr->m_val - SZ_INT)
if ((*(m_uint *)(o->data + SZ_INT * 2) = instr->m_val)) {
arg->d = (m_bit *)xmalloc(round2szint(instr->m_val));
- const Vector kinds = (Vector)instr->m_val2;
+ const Vector kinds = (Vector)&instr->m_val2;
vector_copy2(kinds, &arg->t);
m_uint offset = 0;
for (m_uint i = 0; i < vector_size(&arg->t); ++i) {
}
static FREEARG(freearg_vararg) {
- if (instr->m_val2) free_vector(((Gwion)gwion)->mp, (Vector)instr->m_val2);
+ if (instr->m_val2) vector_release((Vector)&instr->m_val2);
}
static ID_CHECK(idck_vararg) {