struct SoundInfo_ *si;
int argc;
m_bool loop;
- m_bool memoize;
} Arg;
ANN void arg_release(Arg*);
" -o <number> : set output channel number\n"
" -d <number> : set driver (and arguments)\n"
" -l <number> : set loop mode\n"
-" -z <number> : set memoization limit\n"
" -m <mod:args> : load module (and arguments)\n"
" -g <mod:args> : set Gwion compiler passes order\n";
CHECK_OB((tmp = _get_arg(arg, &i)))
arg->loop = (m_bool)ARG2INT(tmp) > 0 ? 1 : -1;
break;
- case 'z':
- CHECK_OB((tmp = _get_arg(arg, &i)))
- arg->memoize = (uint32_t)ARG2INT(tmp);
- break;
case 'i':
CHECK_OB((tmp = _get_arg(arg, &i)))
arg->si->in = (uint8_t)ARG2INT(tmp);
}
if(exp->cast_to)
CHECK_BB(emit_implicit_cast(emit, exp, exp->cast_to))
- if(emit->env->func && isa(exp->type, emit->gwion->type[et_lambda]) < 0 &&
- isa(exp->type, emit->gwion->type[et_function]) > 0 &&
- !GET_FLAG(exp->type->e->d.func->value_ref->d.func_ref, pure))
- UNSET_FLAG(emit->env->func, pure);
} while((exp = exp->next));
return GW_OK;
}
const m_bool ret = arg_parse(gwion, arg);
if(ret) {
gwion->data->plug = new_pluginfo(gwion->mp, &arg->lib);
- gwion->emit->info->memoize = arg->memoize;
shreduler_set_loop(gwion->vm->shreduler, arg->loop);
if(gwion_audio(gwion) > 0 && gwion_engine(gwion)) {
plug_run(gwion, &arg->mod);
}
}
-ANN static Type_List mk_type_list(const Env env, const Type type) {
+ANN static Type_List mk_type_list(const Env env, const Type type, const loc_t pos) {
struct Vector_ v;
vector_init(&v);
vector_add(&v, (vtype)insert_symbol(type->name));
fill_tl_vector(env, type->e->owner, &v);
ID_List id = NULL;
for(m_uint i = 0 ; i < vector_size(&v); ++i)
- id = prepend_id_list(env->gwion->mp, (Symbol)vector_at(&v, i), id, new_loc(env->gwion->mp, __LINE__));
+ id = prepend_id_list(env->gwion->mp, (Symbol)vector_at(&v, i), id, loc_cpy(env->gwion->mp, pos));
vector_release(&v);
assert(id);
Type_Decl* td = new_type_decl(env->gwion->mp, id);
char path[id_list_len(arg->td->xid)];
type_path(path, arg->td->xid);
if(!strcmp(s_name(list->xid), path)) {
- tl[args_number] = mk_type_list(env, template_arg->type);
+ tl[args_number] = mk_type_list(env, template_arg->type, fdef->pos);
if(args_number)
tl[args_number - 1]->next = tl[args_number];
++args_number;