From c592b1c2256fbf71193113591c8e1d9750780e06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 10 Sep 2020 21:40:41 +0200 Subject: [PATCH] :art: is not a object anymore --- src/lib/object_op.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/lib/object_op.c b/src/lib/object_op.c index e12894ca..cfa04a18 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -438,14 +438,18 @@ ANN void struct_release(const VM_Shred shred, const Type base, const m_bit *ptr) } GWION_IMPORT(object_op) { - const Type t_null = gwi_mk_type(gwi, "@null", SZ_INT, "Object"); + const Type t_null = gwi_mk_type(gwi, "@null", SZ_INT, NULL); gwi->gwion->type[et_null] = t_null; GWI_BB(gwi_set_global_type(gwi, t_null, et_null)) GWI_BB(gwi_oper_cond(gwi, "Object", BranchEqInt, BranchNeqInt)) GWI_BB(gwi_oper_ini(gwi, "Object", "Object", NULL)) GWI_BB(gwi_oper_add(gwi, at_object)) GWI_BB(gwi_oper_emi(gwi, opem_at_object)) - GWI_BB(gwi_oper_end(gwi, "@=>", ObjectAssign)) + GWI_BB(gwi_oper_end(gwi, "@=>", NULL)) + GWI_BB(gwi_oper_ini(gwi, "@null", "Object", NULL)) + GWI_BB(gwi_oper_add(gwi, at_object)) + GWI_BB(gwi_oper_emi(gwi, opem_at_object)) + GWI_BB(gwi_oper_end(gwi, "@=>", NULL)) GWI_BB(gwi_oper_ini(gwi, "Object", "Object", "int")) GWI_BB(gwi_oper_end(gwi, "==", EqObject)) GWI_BB(gwi_oper_end(gwi, "!=", NeqObject)) @@ -455,9 +459,13 @@ GWION_IMPORT(object_op) { GWI_BB(gwi_oper_add(gwi, opck_implicit_null2obj)) GWI_BB(gwi_oper_emi(gwi, opem_implicit_null2obj)) GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) - GWI_BB(gwi_oper_ini(gwi, "@null", "Object", "int")) + GWI_BB(gwi_oper_ini(gwi, "@null", "Object", NULL)) GWI_BB(gwi_oper_add(gwi, opck_implicit_null2obj)) GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) + GWI_BB(gwi_oper_ini(gwi, "@null", "Object", NULL)) + GWI_BB(gwi_oper_add(gwi, opck_object_cast)) + GWI_BB(gwi_oper_emi(gwi, opem_object_cast)) + GWI_BB(gwi_oper_end(gwi, "$", NULL)) GWI_BB(gwi_oper_ini(gwi, NULL, "Object", "bool")) GWI_BB(gwi_oper_add(gwi, opck_unary_meta2)) GWI_BB(gwi_oper_end(gwi, "!", IntNot)) -- 2.43.0