ANN Type upvalue_type(const Env env, Capture *cap) {
const Value v = nspc_lookup_value1(env->curr, cap->xid);
- if(!v)exit(3);
+ if(!v) ERR_O(cap->pos, _("non existing value")); // did_you_mean
if(cap->is_ref && not_upvalue(env, v))
ERR_O(cap->pos, _("can't take ref of a scoped value"));
cap->orig = v;
return check_dot(env, member);
}
-/*
-// enable static checking
-ANN static OP_CHECK(opck_predicate) {
- const Exp_Call *call = (Exp_Call*)data;
- const Exp predicate = call->args;
-const Func f = exp_self(call)->type->info->func;
-//f->def->d.code->d.stmt_code.stmt_list->stmt->d.stmt_exp.val;
- if(predicate->exp_type != ae_exp_primary ||
- predicate->d.prim.prim_type != ae_prim_num ||
- !predicate->d.prim.d.num) exit(12);
-}
-*/
-
ANN m_bool check_type_def(const Env env, const Type_Def tdef) {
if (tdef->when) {
set_tflag(tdef->type, tflag_contract);
}
PRAGMA_POP()
} else {
-//exit(3);
-//return;
+
static void *_dispatch[] = {
&&_regsetimm, &&_regpushimm, &&_regpushfloat, &&_regpushother, &&_regpushaddr,
&&_regpushmem, &&_regpushmemfloat, &&_regpushmemother, &&_regpushmemaddr,