mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 13:28:40 +00:00
factored out logic for splitting function chunks into separate pass
over symbol table; associations are now assigned to sub chunks too; inherit function chunk align from parent chunk
This commit is contained in:
+10
-3
@@ -302,13 +302,20 @@ lnk_merge_chunks(Arena *arena, LNK_ChunkManager *dst_cman, LNK_Chunk *dst, LNK_C
|
||||
return src_node;
|
||||
}
|
||||
|
||||
internal
|
||||
LNK_CHUNK_VISITOR_SIG(lnk_set_associate_on_chunks)
|
||||
{
|
||||
chunk->associate = (LNK_Chunk *)ud;
|
||||
return 0;
|
||||
}
|
||||
|
||||
internal void
|
||||
lnk_chunk_associate(Arena *arena, LNK_Chunk *head, LNK_Chunk *chunk)
|
||||
lnk_chunk_associate(LNK_Chunk *head, LNK_Chunk *chunk)
|
||||
{
|
||||
// for simplicity we don't support multiple associations,
|
||||
// but it's possible to craft symbol table with multiple associations
|
||||
Assert(!chunk->associate);
|
||||
chunk->associate = head;
|
||||
AssertAlways(!chunk->associate);
|
||||
lnk_visit_chunks(0, chunk, lnk_set_associate_on_chunks, head);
|
||||
}
|
||||
|
||||
internal B32
|
||||
|
||||
Reference in New Issue
Block a user