fix array-index ir tree generation - was incorrectly applying array value rules to address value evaluations; plug in ir-generation hooks for slices, arrays, etc.; eliminate old view rule code

This commit is contained in:
Ryan Fleury
2025-02-11 15:25:42 -08:00
parent 50e4f6a22a
commit 312ddd5899
11 changed files with 77 additions and 180 deletions
+3 -1
View File
@@ -28,7 +28,7 @@ RD_CmdKind_Null,
RD_CmdKind_Null,
};
RD_VocabularyInfo rd_vocabulary_info_table[64] =
RD_VocabularyInfo rd_vocabulary_info_table[66] =
{
{str8_lit_comp("auto_view_rule"), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rule"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars},
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
@@ -94,6 +94,8 @@ RD_VocabularyInfo rd_vocabulary_info_table[64] =
{str8_lit_comp("disabled"), str8_lit_comp(""), str8_lit_comp("Disabled"), str8_lit_comp("Disabled"), RD_IconKind_Null},
{str8_lit_comp("debug_subprocesses"), str8_lit_comp(""), str8_lit_comp("Debug Subprocesses"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("environment"), str8_lit_comp("environments"), str8_lit_comp("Environment"), str8_lit_comp("Environments"), RD_IconKind_Null},
{str8_lit_comp("frozen"), str8_lit_comp(""), str8_lit_comp("Frozen"), str8_lit_comp(""), RD_IconKind_Null},
{str8_lit_comp("id"), str8_lit_comp("ids"), str8_lit_comp("ID"), str8_lit_comp("IDs"), RD_IconKind_Null},
};
RD_NameSchemaInfo rd_name_schema_info_table[10] =
+1 -1
View File
@@ -570,7 +570,7 @@ C_LINKAGE_BEGIN
extern String8 rd_cfg_src_string_table[4];
extern RD_CmdKind rd_cfg_src_load_cmd_kind_table[4];
extern RD_CmdKind rd_cfg_src_write_cmd_kind_table[4];
extern RD_VocabularyInfo rd_vocabulary_info_table[64];
extern RD_VocabularyInfo rd_vocabulary_info_table[66];
extern RD_NameSchemaInfo rd_name_schema_info_table[10];
extern Rng1U64 rd_reg_slot_range_table[38];
extern RD_StringBindingPair rd_default_binding_table[111];
+2
View File
@@ -115,6 +115,8 @@ RD_VocabularyMap:
{disabled "" "Disabled" "Disabled" Null }
{debug_subprocesses "" "Debug Subprocesses" "" Null }
{environment _ "Environment" _ Null }
{frozen "" "Frozen" "" Null }
{id _ "ID" _ Null }
}
@struct RD_VocabularyInfo:
+3 -1
View File
@@ -9050,7 +9050,7 @@ E_LOOKUP_ACCESS_FUNCTION_DEF(thread)
{
E_Eval eval = e_eval_from_expr(scratch.arena, lhs);
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(eval.space);
result.irtree_and_type.root = e_irtree_leaf_u128(arena, u128_make(entity->handle.machine_id, entity->handle.dmn_handle.u64[0]));
result.irtree_and_type.root = e_irtree_set_space(arena, eval.space, e_irtree_leaf_u128(arena, u128_make(entity->handle.machine_id, entity->handle.dmn_handle.u64[0])));
result.irtree_and_type.type_key = e_type_key_cons(.kind = E_TypeKind_Set, .name = str8_lit("call_stack"));
result.irtree_and_type.mode = E_Mode_Offset;
}
@@ -13076,6 +13076,8 @@ rd_frame(void)
ctx->macro_map[0] = e_string2expr_map_make(scratch.arena, 512);
ctx->lookup_rule_map = push_array(scratch.arena, E_LookupRuleMap, 1);
ctx->lookup_rule_map[0] = e_lookup_rule_map_make(scratch.arena, 512);
ctx->irgen_rule_map = push_array(scratch.arena, E_IRGenRuleMap, 1);
ctx->irgen_rule_map[0] = e_irgen_rule_map_make(scratch.arena, 512);
ctx->auto_hook_map = push_array(scratch.arena, E_AutoHookMap, 1);
ctx->auto_hook_map[0] = e_auto_hook_map_make(scratch.arena, 512);