eliminate per-inline-site line tables; merge inline site line info with unit's line table

This commit is contained in:
Ryan Fleury
2024-06-10 11:26:54 -07:00
parent 21b439e7e5
commit 61630f4cf9
2 changed files with 5 additions and 5 deletions
+1
View File
@@ -3338,6 +3338,7 @@ rdim_bake_scopes(RDIM_Arena *arena, RDIM_BakeStringMapTight *strings, RDIM_Scope
dst_scope->voff_range_opl = (RDI_U32)voff_idx_opl; // TODO(rjf): @u64_to_u32
dst_scope->local_first = (RDI_U32)local_idx_first; // TODO(rjf): @u64_to_u32
dst_scope->local_count = (RDI_U32)(local_idx_opl - local_idx_first); // TODO(rjf): @u64_to_u32
dst_scope->inline_site_idx = (RDI_U32)rdim_idx_from_inline_site(src_scope->inline_site); // TODO(rjf): @u64_to_u32
}
}
}
+4 -5
View File
@@ -583,6 +583,7 @@ internal TS_TASK_FUNCTION_DEF(p2r_units_convert_task__entry_point)
////////////////////////////
//- rjf: pass 1: build per-unit info & per-unit line tables
//
RDIM_LineTable **unit_line_tables = push_array(scratch.arena, RDIM_LineTable *, in->comp_units->count);
ProfScope("pass 1: build per-unit info & per-unit line tables")
for(U64 comp_unit_idx = 0; comp_unit_idx < in->comp_units->count; comp_unit_idx += 1)
{
@@ -609,8 +610,9 @@ internal TS_TASK_FUNCTION_DEF(p2r_units_convert_task__entry_point)
MemoryZeroStruct(&obj_name);
}
//- rjf: build this unit's line table
//- rjf: build this unit's line table, fill out primary line info (inline info added after)
RDIM_LineTable *line_table = rdim_line_table_chunk_list_push(arena, &out->line_tables, 256);
unit_line_tables[comp_unit_idx] = line_table;
for(CV_C13SubSectionNode *node = pdb_unit_c13->first_sub_section;
node != 0;
node = node->next)
@@ -753,9 +755,6 @@ internal TS_TASK_FUNCTION_DEF(p2r_units_convert_task__entry_point)
RDIM_LineTable *line_table = 0;
if(inlinee_lines_parsed != 0)
{
// rjf: build line table
line_table = rdim_line_table_chunk_list_push(arena, &out->line_tables, 4096);
// rjf: state machine registers
CV_InlineRangeKind range_kind = 0;
U32 code_length = 0;
@@ -977,7 +976,7 @@ internal TS_TASK_FUNCTION_DEF(p2r_units_convert_task__entry_point)
}
// rjf: push
RDIM_LineSequence *seq = rdim_line_table_push_sequence(arena, &out->line_tables, line_table, src_file_node->src_file, voffs, line_nums, 0, line_count);
RDIM_LineSequence *seq = rdim_line_table_push_sequence(arena, &out->line_tables, unit_line_tables[comp_unit_idx], src_file_node->src_file, voffs, line_nums, 0, line_count);
rdim_src_file_push_line_sequence(arena, &out->src_files, src_file_node->src_file, seq);
// rjf: clear line chunks for subsequent sequences