File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -76,13 +76,8 @@ e_select_ir_ctx(E_IRCtx *ctx)
7676internal E_LookupRule *
7777e_lookup_rule_from_string (String8 string )
7878{
79- local_persist read_only E_LookupRule e_lookup_rule__default =
80- {
81- str8_lit_comp ("default" ),
82- E_LOOKUP_INFO_FUNCTION_NAME (default ),
83- E_LOOKUP_FUNCTION_NAME (default ),
84- };
8579 E_LookupRule * result = & e_lookup_rule__default ;
80+ if (e_ir_ctx -> lookup_rule_map != 0 && e_ir_ctx -> lookup_rule_map -> slots_count != 0 )
8681 {
8782 U64 hash = e_hash_from_string (5381 , string );
8883 U64 slot_idx = hash %e_ir_ctx -> lookup_rule_map -> slots_count ;
@@ -142,7 +137,7 @@ E_LOOKUP_INFO_FUNCTION_DEF(default)
142137
143138E_LOOKUP_FUNCTION_DEF (default )
144139{
145- E_Lookup lookup = {0 };
140+ E_Lookup lookup = {{ & e_irnode_nil } };
146141 switch (kind )
147142 {
148143 default :{}break ;
Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ typedef E_LOOKUP_INFO_FUNCTION_SIG(E_LookupInfoFunctionType);
8383#define E_LOOKUP_FUNCTION_DEF (name ) internal E_LOOKUP_FUNCTION_SIG(E_LOOKUP_FUNCTION_NAME(name))
8484typedef E_LOOKUP_FUNCTION_SIG (E_LookupFunctionType );
8585
86+ E_LOOKUP_INFO_FUNCTION_DEF (default );
87+ E_LOOKUP_FUNCTION_DEF (default );
88+
8689typedef struct E_LookupRule E_LookupRule ;
8790struct E_LookupRule
8891{
@@ -125,6 +128,12 @@ struct E_IRCtx
125128////////////////////////////////
126129//~ rjf: Globals
127130
131+ local_persist read_only E_LookupRule e_lookup_rule__default =
132+ {
133+ str8_lit_comp ("default" ),
134+ E_LOOKUP_INFO_FUNCTION_NAME (default ),
135+ E_LOOKUP_FUNCTION_NAME (default ),
136+ };
128137global read_only E_IRNode e_irnode_nil = {& e_irnode_nil , & e_irnode_nil , & e_irnode_nil };
129138thread_static E_IRCtx * e_ir_ctx = 0 ;
130139
You can’t perform that action at this time.
0 commit comments