union_allocdata(emit->gwion->mp, udef);
SET_FLAG(udef->type, emit);
scope = emit_push_type(emit, udef->type);
- } else if(emit->env->class_def) {// miss flag ?
- if(!GET_FLAG(l->self->d.exp_decl.list->self->value, member))
- udef->o = emit_local(emit, udef->s, 0);
- } else if(global) {// miss flag?
+ } else if(global) {
void* ptr = (void*)xcalloc(1, udef->s);
l = udef->l;
do {
}
ANN static inline void nspc_release_object(const Nspc a, Value value, Gwion gwion) {
- if((GET_FLAG(value, static) && a->info->class_data) ||
- (value->d.ptr && GET_FLAG(value, builtin))) {
+ if(!GET_FLAG(value, pure) && ((GET_FLAG(value, static) && a->info->class_data) ||
+ (value->d.ptr && GET_FLAG(value, builtin)))) {
const M_Object obj = value->d.ptr ? (M_Object)value->d.ptr :
*(M_Object*)(a->info->class_data + value->from->offset);
release(obj, gwion->vm->cleaner_shred);
check_udef(env, udef);
const m_uint scope = union_push(env, udef);
const m_bool ret = check_union_decl(env, udef);
+ if(!udef->xid && !udef->type_xid && env->class_def && !GET_FLAG(udef, static))
+ env->class_def->nspc->info->offset = udef->o + udef->s;
union_pop(env, udef, scope);
return ret;
}
valuefrom(env, udef->value->from);
nspc_add_value(nspc, sym, udef->value);
add_type(env, nspc, t);
- SET_FLAG(udef->value, checked | udef->flag);
+ SET_FLAG(udef->value, checked | ae_flag_pure | udef->flag);
SET_FLAG(t, scan1 | ae_flag_union);
}
if(udef->tmpl) {