uint16_t ref;
ae_flag flag;
int builtin;
+ int callback;
};
typedef struct Shreduler_* Shreduler;
return func;
CHECK_OO(func->next);
return find_func_match_actual(env, func->next, args, implicit, specific);
- }
+ } else if(!e->type) //fix bug found with Cytosol
+ return NULL;
if(e1->type == env->gwion->type[et_auto] ||
(func->def->base->tmpl && is_fptr(env->gwion, func->value_ref->type) > 0)) {
const Type owner = func->value_ref->from->owner_class;
ANN static void print_current_args(Exp e) {
gw_err(_("and not\n "));
- do gw_err(" \033[32m%s\033[0m", e->type->name);
+ do gw_err(" \033[32m%s\033[0m", e->type ? e->type->name : "Unknown");
while((e = next_arg_Exp(e)));
gw_err("\n");
}
return GW_OK;
}
-ANN m_bool plugin_ini(struct Gwion_ *gwion, const m_str iname) {
+ANN static m_bool _plugin_ini(struct Gwion_ *gwion, const m_str iname) {
const Map map = &gwion->data->plug;
for(m_uint i = 0; i < map_size(map); ++i) {
const Plug plug = (Plug)VVAL(map, i);
return GW_ERROR;
}
+ANN m_bool plugin_ini(struct Gwion_ *gwion, const m_str iname) {
+ const Context ctx = gwion->env->context;
+ gwion->env->context = NULL;
+ const m_bool ret = _plugin_ini(gwion, iname);
+ gwion->env->context = ctx;
+ return ret;
+}
+
ANN m_bool driver_ini(const struct Gwion_ *gwion) {
const Map map = &gwion->data->plug;
m_str dname = gwion->vm->bbq->si->arg;
return mem > (((m_bit*)c + sizeof(struct VM_Shred_) + SIZEOF_REG) + (SIZEOF_MEM) - (MEM_STEP*16));
}
-ANN static inline VM_Shred init_spork_shred(const VM_Shred shred, const VM_Code code) {
+ANN /*static inline */VM_Shred init_spork_shred(const VM_Shred shred, const VM_Code code) {
const VM_Shred sh = new_shred_base(shred, code);
vm_add_shred(shred->info->vm, sh);
sh->tick->parent = shred->tick;
}
}
-ANN static void _free_code_instr(const Vector v, const Gwion gwion) {
- free_code_instr(v, gwion);
- free_vector(gwion->mp, v);
-}
-
ANN void free_vmcode(VM_Code a, Gwion gwion) {
if(a->memoize)
memoize_end(gwion->mp, a->memoize);
if(!a->builtin) {
_mp_free(gwion->mp, vector_size(a->instr) * BYTECODE_SZ, a->bytecode);
- _free_code_instr(a->instr, gwion);
+ if(likely(!a->callback))
+ free_code_instr(a->instr, gwion);
+ free_vector(gwion->mp, a->instr);
}
if(a->closure)
free_closure(a->closure, gwion);
-Subproject commit 0696b88ce453490a27e449faf4f25a907bef7c46
+Subproject commit 9da3e2b76e09c603f1b84217c9c2432618014a88