deduplication from evaluation ctxs - just have base ctx with deduplicated info, then separate type-state, ir-ctx, and interpretation-ctx

This commit is contained in:
Ryan Fleury
2025-04-23 11:49:44 -07:00
parent 0ce85082ec
commit 264dbc8199
18 changed files with 546 additions and 697 deletions
+1 -20
View File
@@ -17,25 +17,13 @@ struct E_Parse
};
////////////////////////////////
//~ rjf: Parse Context
typedef struct E_ParseCtx E_ParseCtx;
struct E_ParseCtx
{
E_Module *modules;
U64 modules_count;
E_Module *primary_module;
};
////////////////////////////////
//~ rjf: Parse State (stateful thread-local caching mechanisms, not provided by user)
//~ rjf: Parse Evaluation State
typedef struct E_ParseState E_ParseState;
struct E_ParseState
{
Arena *arena;
U64 arena_eval_start_pos;
E_ParseCtx *ctx;
};
////////////////////////////////
@@ -56,13 +44,6 @@ internal E_TokenArray e_token_array_from_chunk_list(Arena *arena, E_TokenChunkLi
internal E_TokenArray e_token_array_from_text(Arena *arena, String8 text);
internal E_TokenArray e_token_array_make_first_opl(E_Token *first, E_Token *opl);
////////////////////////////////
//~ rjf: Context Selection Functions (Selection Required For All Subsequent APIs)
internal E_ParseCtx *e_selected_parse_ctx(void);
internal void e_select_parse_ctx(E_ParseCtx *ctx);
internal U32 e_parse_ctx_module_idx_from_rdi(RDI_Parsed *rdi);
////////////////////////////////
//~ rjf: Expression Tree Building Functions