authorgravatar for alex_naskos@hotmail.comAlexandros Naskos <alex_naskos@hotmail.com> 2018-04-24 16:50:36+03:00
committergravatar for alex_naskos@hotmail.comAlexandros Naskos <alex_naskos@hotmail.com> 2018-04-24 16:50:36+03:00
log189e8e97bdd8dea8efa9ea30401b164ea619f2e4
tree881a86844d1030591ec85b2614f5a5e4e77f696a
parent0e5fb035e3d12879b4bd7a23578fdb8932deb4d1

PointerInfo child is a pointer to a TypeInfo union, still not working correctly


1 files changed, 5 insertions(+), 1 deletions(-)

src/ir.cpp+5-1
...@@ -15867,7 +15867,11 @@ static ConstExprValue *ir_make_type_info_value(IrAnalyze *ira, ConstExprValue *p...@@ -15867,7 +15867,11 @@ static ConstExprValue *ir_make_type_info_value(IrAnalyze *ira, ConstExprValue *p
15867 fields[3].type = get_pointer_to_type(ira->codegen, type_info_type->data.x_type, false);15867 fields[3].type = get_pointer_to_type(ira->codegen, type_info_type->data.x_type, false);
15868 fields[3].data.x_ptr.special = ConstPtrSpecialRef;15868 fields[3].data.x_ptr.special = ConstPtrSpecialRef;
15869 fields[3].data.x_ptr.mut = ConstPtrMutComptimeVar;15869 fields[3].data.x_ptr.mut = ConstPtrMutComptimeVar;
15870 fields[3].data.x_ptr.data.ref.pointee = ir_make_type_info_value(ira, &fields[3], type_entry->data.pointer.child_type);15870 ConstExprValue *union_val = create_const_vals(1);
15871 union_val->type = type_info_type->data.x_type;
15872 bigint_init_unsigned(&union_val->data.x_union.tag, type_id_index(type_entry->data.pointer.child_type->id));
15873 union_val->data.x_union.payload = ir_make_type_info_value(ira, union_val, type_entry->data.pointer.child_type);
15874 fields[3].data.x_ptr.data.ref.pointee = union_val;
15871 return payload;15875 return payload;
15872 }15876 }
15873 default:15877 default: