envset_push(&es, dt->owner_class);
(void)emit_push(emit, dt->owner_class, dt->owner);
const m_bool ret = traverse_emit_func_def(emit, dt->def);
- if(dt->owner_class && dt->owner_class->e->owner_class)
+ if(es.run)
envset_pop(&es, dt->owner_class->e->owner_class);
emit_pop(emit, scope);
return ret;
envset_push(&es, v->from->owner_class);
(void)emit_push(emit, v->from->owner_class, v->from->owner);
const m_bool ret = emit_func_def(emit, f->def);
- if(v->from->owner_class && v->from->owner_class->e->owner_class)
+ if(es.run)
envset_pop(&es, v->from->owner_class->e->owner_class);
emit_pop(emit, scope);
return ret > 0 ? push_func_code(emit, f) : GW_ERROR;
if(lambda->owner)
envset_push(&es, lambda->owner);
const m_bool ret = emit_lambda(emit, lambda);
- if(lambda->owner)
- envset_push(&es, lambda->owner);
+ if(es.run)
+ envset_pop(&es, lambda->owner);
return ret;
}
}
}
free_mstr(env->gwion->mp, tmpl_name);
- if(v->from->owner_class && v->from->owner_class->e->owner_class && es.run)
+ if(es.run)
envset_pop(&es, v->from->owner_class->e->owner_class);
env_pop(env, scope);
env->func = former;
envset_push(&es, v->from->owner_class);
(void)env_push(env, v->from->owner_class, v->from->owner);
const m_bool ret = traverse_func_def(env, func->def);
- if(v->from->owner_class && v->from->owner_class->e->owner_class && es.run)
- envset_push(&es, v->from->owner_class);
+ if(es.run)
+ envset_pop(&es, v->from->owner_class);
env_pop(env, scope);
CHECK_BO(ret)
}