-Subproject commit 59dea1d3bdabeb2ed1d69944e45bb0c83b12435b
+Subproject commit a7f4b203839d44366733b76e74feac7dab7b2a06
}
ANN static void clean_prim(Clean *a, Exp_Primary *b) {
- if(b->prim_type == ae_prim_hack ||
- b->prim_type == ae_prim_typeof ||
- b->prim_type == ae_prim_interp)
+ if(b->prim_type == ae_prim_hack || b->prim_type == ae_prim_interp)
clean_exp(a, b->d.exp);
else if(b->prim_type == ae_prim_array)
clean_array_sub(a, b->d.array);
#define emit_prim_nil (void*)dummy_func
-ANN static m_bool emit_prim_typeof(const Emitter emit, const Exp *exp) {
- const Exp e = *exp;
- if(!e->type->array_depth)
- regpushi(emit, (m_uint)(actual_type(emit->gwion, e->type)));
- else
- regpushi(emit, (m_uint)e->type);
- return GW_OK;
-}
-
ANN static void interp_multi(const Emitter emit, const Exp e) {
Var_Decl_List list = e->d.exp_decl.list;
const int emit_var = exp_getvar(e);
return prim_id_non_res(env, data);
}
-ANN static Type check_prim_typeof(const Env env, const Exp *exp) {
- const Exp e = *exp;
- DECL_OO(const Type, t, = check_exp(env, e))
- CHECK_BO(inferable(env, t, (*exp)->pos))
- return type_class(env->gwion, t);
-}
-
ANN static Type check_prim_interp(const Env env, const Exp* exp) {
CHECK_OO(check_exp(env, *exp))
return env->gwion->type[et_string];
}
static inline m_bool scan1_defined(const Env env, const Var_Decl var) {
- if(var->value) // from a `typeof` declaration
+ if(var->value) // from an auto declaration
return GW_OK;
if(((!env->class_def || !GET_FLAG(env->class_def, final) || env->scope->depth) ? nspc_lookup_value1 : nspc_lookup_value2)(env->curr, var->xid))
ERR_B(var->pos, _("variable %s has already been defined in the same scope..."),
}
ANN static inline m_bool scan1_prim(const Env env, const Exp_Primary* prim) {
- if(prim->prim_type == ae_prim_hack || prim->prim_type == ae_prim_typeof ||
- prim->prim_type == ae_prim_interp)
+ if(prim->prim_type == ae_prim_hack || prim->prim_type == ae_prim_interp)
return scan1_exp(env, prim->d.exp);
if(prim->prim_type == ae_prim_array && prim->d.array->exp)
return scan1_exp(env, prim->d.array->exp);
}
ANN static inline m_bool scan2_prim(const Env env, const Exp_Primary* prim) {
- if(prim->prim_type == ae_prim_hack || prim->prim_type == ae_prim_typeof ||
- prim->prim_type == ae_prim_interp)
+ if(prim->prim_type == ae_prim_hack || prim->prim_type == ae_prim_interp)
CHECK_BB(scan2_exp(env, prim->d.exp))
/* else if(prim->prim_type == ae_prim_id) {
const Value v = prim_value(env, prim->d.var);