From: fennecdjay Date: Mon, 30 Jan 2023 18:31:04 +0000 (+0100) Subject: :art: rename @ctor op to call_type X-Git-Tag: nightly~206^2~1 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9695314bdc2eda1b2e4cdbba533360aa89ed6c60;p=gwion.git :art: rename @ctor op to call_type --- diff --git a/src/emit/emit.c b/src/emit/emit.c index bc67142a..30b300d3 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1335,7 +1335,7 @@ ANN static m_bool _emit_exp_call(const Emitter emit, const Exp_Call *call) { if(unlikely(!is_func(emit->gwion, t))) { const Type t = actual_type(emit->gwion, call->func->type); - struct Op_Import opi = {.op = insert_symbol("@ctor"), + struct Op_Import opi = {.op = insert_symbol("call_type"), .rhs = t, .data = (uintptr_t)call, .pos = exp_self(call)->pos}; diff --git a/src/lib/lib_class.c b/src/lib/lib_class.c index 2def08a0..69b11157 100644 --- a/src/lib/lib_class.c +++ b/src/lib/lib_class.c @@ -71,7 +71,7 @@ GWION_IMPORT(class) { gwidoc(gwi, "internal constructor operator."); GWI_BB(gwi_oper_ini(gwi, NULL, (m_str)OP_ANY_TYPE, NULL)) GWI_BB(gwi_oper_add(gwi, opck_basic_ctor)) - GWI_BB(gwi_oper_end(gwi, "@ctor", NULL)) + GWI_BB(gwi_oper_end(gwi, "call_type", NULL)) /* gwidoc(gwi, "Allow enum for array size"); GWI_BB(gwi_oper_ini(gwi, "Class", "int", NULL)) diff --git a/src/parse/check.c b/src/parse/check.c index f44f0468..66ea0cfa 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -946,7 +946,7 @@ ANN Type call_type(const Env env, Exp_Call *const exp) { const Value v = nspc_lookup_value0(t->info->base_type->nspc, insert_symbol("new")); if(v) return exp->func->type = v->type; } - struct Op_Import opi = {.op = insert_symbol("@ctor"), + struct Op_Import opi = {.op = insert_symbol("call_type"), .rhs = actual_type(env->gwion, exp->func->type), .data = (uintptr_t)exp, .pos = exp_self(exp)->pos};