: emit_struct_addref(emit, t, size, emit_var);
}
-ANN static inline bool is_static_call(const Emitter emit, const Exp e) {
+ANN static inline bool is_static_call(const Exp e) {
if (e->exp_type != ae_exp_dot) return true;
const Exp_Dot *member = &e->d.exp_dot;
- return GET_FLAG(member->base->type, final) ||
- !vflag(exp_self(member)->type->info->value, vflag_member) ||
- is_class(emit->gwion, member->base->type) ||
+ return GET_FLAG(e->type, final) ||
+ GET_FLAG(member->base->type, final) ||
+// GET_FLAG(e->type->info->func, static) ||
member->base->exp_type == ae_exp_cast;
}
CHECK_BB(emit_func_args(emit, exp_call));
if (is_func(emit->gwion, t)) // is_callable needs type
CHECK_BB(emit_exp_call1(emit, t->info->func,
- is_static_call(emit, exp_call->func)));
+ is_static_call(exp_call->func)));
else {
struct Op_Import opi = {.op = insert_symbol("@ctor"),
.rhs = t,
instr->m_val = (m_uint)f;
return;
}
- } else if (is_static_call(emit, exp_self(member))) {
+ } else if (is_static_call(exp_self(member))) {
if (member->is_call && f == emit->env->func) return;
const Instr func_i = emit_add_instr(emit, f->code ? RegPushImm : SetFunc);
func_i->m_val = (m_uint)f->code ?: (m_uint)f;