fix type pattern matching for auto hooks, improve slice array indexing operations to rely less on the full irtree path (it composes poorly when using combining type views

This commit is contained in:
Ryan Fleury
2025-04-30 10:15:32 -07:00
parent 60b2195500
commit 10ff98faa8
4 changed files with 65 additions and 28 deletions
+5
View File
@@ -1075,6 +1075,11 @@ e_auto_hook_exprs_from_type_key(Arena *arena, E_TypeKey type_key)
continue;
}
U64 pattern_part_pos = str8_find_needle(type_string, scan_pos, n->string, 0);
if(pattern_part_pos > scan_pos && n == auto_hook_node->type_pattern_parts.first)
{
fits_this_type_string = 0;
break;
}
if(pattern_part_pos >= type_string.size)
{
fits_this_type_string = 0;