extend constructed type info with 'pointer depth', to distinguish between inline-depths; use in symbolizing & call stack expression formation

This commit is contained in:
Ryan Fleury
2025-02-11 16:16:44 -08:00
parent 312ddd5899
commit 98ec6ee3bb
13 changed files with 140 additions and 58 deletions
+5 -1
View File
@@ -323,6 +323,8 @@ e_hash_from_cons_type_params(E_ConsTypeParams *params)
params->direct_key.u32[2],
(U32)((params->count & 0x00000000ffffffffull)>> 0),
(U32)((params->count & 0xffffffff00000000ull)>> 32),
(U32)((params->depth & 0x00000000ffffffffull)>> 0),
(U32)((params->depth & 0xffffffff00000000ull)>> 32),
};
U64 hash = e_hash_from_string(5381, str8((U8 *)buffer, sizeof(buffer)));
hash = e_hash_from_string(hash, params->name);
@@ -336,7 +338,8 @@ e_cons_type_params_match(E_ConsTypeParams *l, E_ConsTypeParams *r)
l->flags == r->flags &&
str8_match(l->name, r->name, 0) &&
e_type_key_match(l->direct_key, r->direct_key) &&
l->count == r->count);
l->count == r->count &&
l->depth == r->depth);
if(result && l->members != 0 && r->members != 0)
{
for(U64 idx = 0; idx < l->count; idx += 1)
@@ -628,6 +631,7 @@ e_type_from_key(Arena *arena, E_TypeKey key)
type->name = push_str8_copy(arena, node->params.name);
type->direct_type_key = node->params.direct_key;
type->count = node->params.count;
type->depth = node->params.depth;
type->byte_size = node->byte_size;
switch(type->kind)
{
+2
View File
@@ -129,6 +129,7 @@ struct E_Type
String8 name;
U64 byte_size;
U64 count;
U64 depth;
U32 off;
E_TypeKey direct_type_key;
E_TypeKey owner_type_key;
@@ -176,6 +177,7 @@ struct E_ConsTypeParams
String8 name;
E_TypeKey direct_key;
U64 count;
U64 depth;
E_Member *members;
E_EnumVal *enum_vals;
};