From 9695314bdc2eda1b2e4cdbba533360aa89ed6c60 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 30 Jan 2023 19:31:04 +0100 Subject: [PATCH] :art: rename @ctor op to call_type --- src/emit/emit.c | 2 +- src/lib/lib_class.c | 2 +- src/parse/check.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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}; -- 2.43.0