mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-10 18:00:23 +00:00
rdi format - namespaces
This commit is contained in:
@@ -806,6 +806,29 @@ rdim_unit_chunk_list_concat_in_place(RDIM_UnitChunkList *dst, RDIM_UnitChunkList
|
||||
RDIM_IdxedChunkListConcatInPlace(RDIM_UnitChunkNode, dst, to_push);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: [Building] Namespace Info Building
|
||||
|
||||
RDI_PROC RDIM_Namespace *
|
||||
rdim_namespace_chunk_list_push(RDIM_Arena *arena, RDIM_NamespaceChunkList *list, RDI_U64 cap)
|
||||
{
|
||||
RDIM_IdxedChunkListPush(arena, list, RDIM_NamespaceChunkNode, RDIM_Namespace, cap, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U64
|
||||
rdim_idx_from_namespace(RDIM_Namespace *ns)
|
||||
{
|
||||
RDIM_IdxedChunkListElementGetIdx(ns, idx);
|
||||
return idx;
|
||||
}
|
||||
|
||||
RDI_PROC void
|
||||
rdim_namespace_chunk_list_concat_in_place(RDIM_NamespaceChunkList *dst, RDIM_NamespaceChunkList *to_push)
|
||||
{
|
||||
RDIM_IdxedChunkListConcatInPlace(RDIM_NamespaceChunkNode, dst, to_push);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: [Building] Type Info Building
|
||||
|
||||
@@ -2162,6 +2185,7 @@ rdim_serialized_section_bundle_from_bake_results(RDIM_BakeResults *results)
|
||||
bundle.sections[RDI_SectionKind_SourceLineMapVOffs] = rdim_serialized_section_make_unpacked_array(results->src_files.source_line_map_voffs, results->src_files.source_line_map_voffs_count);
|
||||
bundle.sections[RDI_SectionKind_Units] = rdim_serialized_section_make_unpacked_array(results->units.units, results->units.units_count);
|
||||
bundle.sections[RDI_SectionKind_UnitVMap] = rdim_serialized_section_make_unpacked_array(results->unit_vmap.vmap.vmap, results->unit_vmap.vmap.count);
|
||||
bundle.sections[RDI_SectionKind_Namespaces] = rdim_serialized_section_make_unpacked_array(results->namespaces.namespaces, results->namespaces.namespaces_count);
|
||||
bundle.sections[RDI_SectionKind_TypeNodes] = rdim_serialized_section_make_unpacked_array(results->type_nodes.type_nodes, results->type_nodes.type_nodes_count);
|
||||
bundle.sections[RDI_SectionKind_UDTs] = rdim_serialized_section_make_unpacked_array(results->udts.udts, results->udts.udts_count);
|
||||
bundle.sections[RDI_SectionKind_Members] = rdim_serialized_section_make_unpacked_array(results->udts.members, results->udts.members_count);
|
||||
|
||||
@@ -665,6 +665,38 @@ struct RDIM_UnitChunkList
|
||||
RDI_U64 total_count;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Namespace Types
|
||||
|
||||
typedef struct RDIM_Namespace RDIM_Namespace;
|
||||
struct RDIM_Namespace
|
||||
{
|
||||
struct RDIM_NamespaceChunkNode *chunk;
|
||||
RDIM_Namespace *parent_namespace;
|
||||
struct RDIM_Scope *parent_scope;
|
||||
struct RDIM_UDT *parent_udt;
|
||||
RDIM_String8 name;
|
||||
};
|
||||
|
||||
typedef struct RDIM_NamespaceChunkNode RDIM_NamespaceChunkNode;
|
||||
struct RDIM_NamespaceChunkNode
|
||||
{
|
||||
RDIM_NamespaceChunkNode *next;
|
||||
RDIM_Namespace *v;
|
||||
RDI_U64 count;
|
||||
RDI_U64 cap;
|
||||
RDI_U64 base_idx;
|
||||
};
|
||||
|
||||
typedef struct RDIM_NamespaceChunkList RDIM_NamespaceChunkList;
|
||||
struct RDIM_NamespaceChunkList
|
||||
{
|
||||
RDIM_NamespaceChunkNode *first;
|
||||
RDIM_NamespaceChunkNode *last;
|
||||
RDI_U64 chunk_count;
|
||||
RDI_U64 total_count;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Type System Node Types
|
||||
|
||||
@@ -1010,6 +1042,7 @@ struct RDIM_BakeParams
|
||||
RDIM_TopLevelInfo top_level_info;
|
||||
RDIM_BinarySectionList binary_sections;
|
||||
RDIM_UnitChunkList units;
|
||||
RDIM_NamespaceChunkList namespaces;
|
||||
RDIM_TypeChunkList types;
|
||||
RDIM_UDTChunkList udts;
|
||||
RDIM_SrcFileChunkList src_files;
|
||||
@@ -1349,6 +1382,13 @@ struct RDIM_LineTableBakeResult
|
||||
RDI_U64 line_table_columns_count;
|
||||
};
|
||||
|
||||
typedef struct RDIM_NamespaceBakeResult RDIM_NamespaceBakeResult;
|
||||
struct RDIM_NamespaceBakeResult
|
||||
{
|
||||
RDI_Namespace *namespaces;
|
||||
RDI_U64 namespaces_count;
|
||||
};
|
||||
|
||||
typedef struct RDIM_TypeNodeBakeResult RDIM_TypeNodeBakeResult;
|
||||
struct RDIM_TypeNodeBakeResult
|
||||
{
|
||||
@@ -1492,6 +1532,7 @@ struct RDIM_BakeResults
|
||||
RDIM_SrcFileBakeResult src_files;
|
||||
RDIM_ChecksumBakeResult checksums;
|
||||
RDIM_LineTableBakeResult line_tables;
|
||||
RDIM_NamespaceBakeResult namespaces;
|
||||
RDIM_TypeNodeBakeResult type_nodes;
|
||||
RDIM_UDTBakeResult udts;
|
||||
RDIM_GlobalVariableBakeResult global_variables;
|
||||
@@ -1626,6 +1667,13 @@ RDI_PROC RDIM_Unit *rdim_unit_chunk_list_push(RDIM_Arena *arena, RDIM_UnitChunkL
|
||||
RDI_PROC RDI_U64 rdim_idx_from_unit(RDIM_Unit *unit);
|
||||
RDI_PROC void rdim_unit_chunk_list_concat_in_place(RDIM_UnitChunkList *dst, RDIM_UnitChunkList *to_push);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: [Building] Namespace Info Building
|
||||
|
||||
RDI_PROC RDIM_Namespace *rdim_namespace_chunk_list_push(RDIM_Arena *arena, RDIM_NamespaceChunkList *list, RDI_U64 cap);
|
||||
RDI_PROC RDI_U64 rdim_idx_from_namespace(RDIM_Namespace *ns);
|
||||
RDI_PROC void rdim_namespace_chunk_list_concat_in_place(RDIM_NamespaceChunkList *dst, RDIM_NamespaceChunkList *to_push);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: [Building] Type Info & UDT Building
|
||||
|
||||
@@ -1757,9 +1805,4 @@ RDI_PROC RDIM_SerializedSection rdim_serialized_section_make_unpacked(void *data
|
||||
RDI_PROC RDIM_SerializedSectionBundle rdim_serialized_section_bundle_from_bake_results(RDIM_BakeResults *results);
|
||||
RDI_PROC RDIM_String8List rdim_file_blobs_from_section_bundle(RDIM_Arena *arena, RDIM_SerializedSectionBundle *bundle);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: [Serializing] Parsed RDI -> Bake Results
|
||||
|
||||
RDI_PROC RDIM_BakeResults *rdim_bake_results_from_rdi(RDIM_Arena *arena, RDI_Parsed *rdi);
|
||||
|
||||
#endif // RDI_MAKE_H
|
||||
|
||||
Reference in New Issue
Block a user