further work on convergence, dead code elimination, and lens (view rule) calls

This commit is contained in:
Ryan Fleury
2025-04-10 14:29:57 -07:00
parent cde079a14d
commit fbe747a8b4
13 changed files with 476 additions and 601 deletions
-39
View File
@@ -581,45 +581,6 @@ struct E_LookupRuleExprPair
};
#endif
////////////////////////////////
//~ rjf: IR Generation Hooks
#if 0 // TODO(rjf): @eval
#define E_IRGEN_FUNCTION_SIG(name) E_IRTreeAndType name(Arena *arena, E_Expr *expr)
#define E_IRGEN_FUNCTION_NAME(name) e_irgen_##name
#define E_IRGEN_FUNCTION_DEF(name) internal E_IRGEN_FUNCTION_SIG(E_IRGEN_FUNCTION_NAME(name))
typedef E_IRGEN_FUNCTION_SIG(E_IRGenFunctionType);
E_IRGEN_FUNCTION_DEF(default);
typedef struct E_IRGenRule E_IRGenRule;
struct E_IRGenRule
{
String8 name;
E_IRGenFunctionType *irgen;
};
typedef struct E_IRGenRuleNode E_IRGenRuleNode;
struct E_IRGenRuleNode
{
E_IRGenRuleNode *next;
E_IRGenRule v;
};
typedef struct E_IRGenRuleSlot E_IRGenRuleSlot;
struct E_IRGenRuleSlot
{
E_IRGenRuleNode *first;
E_IRGenRuleNode *last;
};
typedef struct E_IRGenRuleMap E_IRGenRuleMap;
struct E_IRGenRuleMap
{
U64 slots_count;
E_IRGenRuleSlot *slots;
};
#endif
////////////////////////////////
//~ rjf: Type Pattern -> Hook Key Data Structure (Auto View Rules)