ANN static m_bool emit_symbol_builtin(const Emitter emit, const Exp_Primary* prim) {
const Value v = prim->value;
- if(GET_FLAG(v, func))
+/*
+ if(GET_FLAG(v, func)) {
regpushi(emit, (m_uint)v->d.func_ref->def->d.dl_func_ptr);
+ return GW_OK;
+ }
+*/
if(GET_FLAG(v, union)) {
const m_uint size = v->type->size;
const Instr instr = emit_kind(emit, size, exp_self(prim)->emit_var, dotstatic);
for(m_uint i = 1; i < vector_size(v); ++i)
arg_list = (arg_list->next = (Arg_List)vector_at(v, i));
vector_release(v);
+ v->ptr = NULL;
return base;
}
-ANEW ANN static Func_Base* gwi_func_base(const Gwi gwi, const ImportCK *ck) {
+ANEW ANN static Func_Base* gwi_func_base(const Gwi gwi, ImportCK *ck) {
const Arg_List arg_list = make_dll_arg_list(&gwi->ck->v);
Func_Base *base = new_func_base(gwi->gwion->mp, ck->td, ck->sym, arg_list);
- if(ck->tmpl)
+ ck->td = NULL;
+ if(ck->tmpl) {
base->tmpl = new_tmpl(gwi->gwion->mp, ck->tmpl, -1);
+ ck->tmpl = NULL;
+ }
return base;
}
-ANN static Func_Def import_fdef(const Gwi gwi, const ImportCK *ck) {
+ANN static Func_Def import_fdef(const Gwi gwi, ImportCK *ck) {
Func_Base* base = gwi_func_base(gwi, ck);
const Func_Def fdef = new_func_def(gwi->gwion->mp, base,
NULL, ck->flag | ae_flag_builtin, loc(gwi));
return GW_ERROR;
}
-ANN m_int gwi_func_valid(const Gwi gwi, const ImportCK *ck) {
+ANN m_int gwi_func_valid(const Gwi gwi, ImportCK *ck) {
DECL_OB(Func_Def, fdef, = import_fdef(gwi, ck))
if(SAFE_FLAG(gwi->gwion->env->class_def, template))
/*return*/ section_fdef(gwi, fdef);