sketch out artifact types for new rdi baking pass

This commit is contained in:
Ryan Fleury
2024-06-06 15:37:27 -07:00
parent 10ead2f999
commit d0d1e7d7e6
3 changed files with 200 additions and 37 deletions
+35 -36
View File
@@ -1290,42 +1290,41 @@ RDI_U32 match_count;
RDI_U32 match_idx_or_idx_run_first;
};
typedef RDI_U8 RDI_SectionElementType_NULL;
typedef RDI_TopLevelInfo RDI_SectionElementType_TopLevelInfo;
typedef RDI_U8 RDI_SectionElementType_StringData;
typedef RDI_U32 RDI_SectionElementType_StringTable;
typedef RDI_U32 RDI_SectionElementType_IndexRuns;
typedef RDI_BinarySection RDI_SectionElementType_BinarySections;
typedef RDI_FilePathNode RDI_SectionElementType_FilePathNodes;
typedef RDI_SourceFile RDI_SectionElementType_SourceFiles;
typedef RDI_LineTable RDI_SectionElementType_LineTables;
typedef RDI_U64 RDI_SectionElementType_LineInfoVOffs;
typedef RDI_Line RDI_SectionElementType_LineInfoLines;
typedef RDI_Column RDI_SectionElementType_LineInfoColumns;
typedef RDI_SourceLineMap RDI_SectionElementType_SourceLineMaps;
typedef RDI_U32 RDI_SectionElementType_SourceLineMapNumbers;
typedef RDI_U32 RDI_SectionElementType_SourceLineMapRanges;
typedef RDI_U64 RDI_SectionElementType_SourceLineMapVOffs;
typedef RDI_Unit RDI_SectionElementType_Units;
typedef RDI_VMapEntry RDI_SectionElementType_UnitVMap;
typedef RDI_TypeNode RDI_SectionElementType_TypeNodes;
typedef RDI_UDT RDI_SectionElementType_UDTs;
typedef RDI_Member RDI_SectionElementType_Members;
typedef RDI_EnumMember RDI_SectionElementType_EnumMembers;
typedef RDI_GlobalVariable RDI_SectionElementType_GlobalVariables;
typedef RDI_VMapEntry RDI_SectionElementType_GlobalVMap;
typedef RDI_ThreadVariable RDI_SectionElementType_ThreadVariables;
typedef RDI_Procedure RDI_SectionElementType_Procedures;
typedef RDI_Scope RDI_SectionElementType_Scopes;
typedef RDI_U64 RDI_SectionElementType_ScopeVOffData;
typedef RDI_VMapEntry RDI_SectionElementType_ScopeVMap;
typedef RDI_InlineSite RDI_SectionElementType_InlineSites;
typedef RDI_Local RDI_SectionElementType_Locals;
typedef RDI_LocationBlock RDI_SectionElementType_LocationBlocks;
typedef RDI_U8 RDI_SectionElementType_LocationData;
typedef RDI_NameMap RDI_SectionElementType_NameMaps;
typedef RDI_NameMapBucket RDI_SectionElementType_NameMapBuckets;
typedef RDI_NameMapNode RDI_SectionElementType_NameMapNodes;
typedef RDI_TopLevelInfo RDI_SectionElementType_TopLevelInfo;
typedef RDI_U8 RDI_SectionElementType_StringData;
typedef RDI_U32 RDI_SectionElementType_StringTable;
typedef RDI_U32 RDI_SectionElementType_IndexRuns;
typedef RDI_BinarySection RDI_SectionElementType_BinarySections;
typedef RDI_FilePathNode RDI_SectionElementType_FilePathNodes;
typedef RDI_SourceFile RDI_SectionElementType_SourceFiles;
typedef RDI_LineTable RDI_SectionElementType_LineTables;
typedef RDI_U64 RDI_SectionElementType_LineInfoVOffs;
typedef RDI_Line RDI_SectionElementType_LineInfoLines;
typedef RDI_Column RDI_SectionElementType_LineInfoColumns;
typedef RDI_SourceLineMap RDI_SectionElementType_SourceLineMaps;
typedef RDI_U32 RDI_SectionElementType_SourceLineMapNumbers;
typedef RDI_U32 RDI_SectionElementType_SourceLineMapRanges;
typedef RDI_U64 RDI_SectionElementType_SourceLineMapVOffs;
typedef RDI_Unit RDI_SectionElementType_Units;
typedef RDI_VMapEntry RDI_SectionElementType_UnitVMap;
typedef RDI_TypeNode RDI_SectionElementType_TypeNodes;
typedef RDI_UDT RDI_SectionElementType_UDTs;
typedef RDI_Member RDI_SectionElementType_Members;
typedef RDI_EnumMember RDI_SectionElementType_EnumMembers;
typedef RDI_GlobalVariable RDI_SectionElementType_GlobalVariables;
typedef RDI_VMapEntry RDI_SectionElementType_GlobalVMap;
typedef RDI_ThreadVariable RDI_SectionElementType_ThreadVariables;
typedef RDI_Procedure RDI_SectionElementType_Procedures;
typedef RDI_Scope RDI_SectionElementType_Scopes;
typedef RDI_U64 RDI_SectionElementType_ScopeVOffData;
typedef RDI_VMapEntry RDI_SectionElementType_ScopeVMap;
typedef RDI_InlineSite RDI_SectionElementType_InlineSites;
typedef RDI_Local RDI_SectionElementType_Locals;
typedef RDI_LocationBlock RDI_SectionElementType_LocationBlocks;
typedef RDI_U8 RDI_SectionElementType_LocationData;
typedef RDI_NameMap RDI_SectionElementType_NameMaps;
typedef RDI_NameMapBucket RDI_SectionElementType_NameMapBuckets;
typedef RDI_NameMapNode RDI_SectionElementType_NameMapNodes;
RDI_PROC RDI_U64 rdi_hash(RDI_U8 *ptr, RDI_U64 size);
RDI_PROC RDI_U32 rdi_size_from_basic_type_kind(RDI_TypeKind kind);
+164
View File
@@ -1058,6 +1058,167 @@ struct RDIM_VMapMarker
RDI_U32 begin_range;
};
//- rjf: baking results
typedef struct RDIM_TopLevelInfoBakeResult RDIM_TopLevelInfoBakeResult;
struct RDIM_TopLevelInfoBakeResult
{
RDI_TopLevelInfo *top_level_info;
};
typedef struct RDIM_BinarySectionBakeResult RDIM_BinarySectionBakeResult;
struct RDIM_BinarySectionBakeResult
{
RDI_BinarySection *binary_sections;
RDI_U64 binary_sections_count;
};
typedef struct RDIM_UnitBakeResult RDIM_UnitBakeResult;
struct RDIM_UnitBakeResult
{
RDI_Unit *units;
RDI_U64 units_count;
};
typedef struct RDIM_UnitVMapBakeResult RDIM_UnitVMapBakeResult;
struct RDIM_UnitVMapBakeResult
{
RDIM_BakeVMap vmap;
};
typedef struct RDIM_SrcFileBakeResult RDIM_SrcFileBakeResult;
struct RDIM_SrcFileBakeResult
{
RDI_SourceFile *source_files;
RDI_U64 source_files_count;
RDI_SourceLineMap *source_line_maps;
RDI_U64 source_line_maps_count;
RDI_U32 *source_line_map_nums;
RDI_U32 *source_line_map_rngs;
RDI_U64 *source_line_map_voffs;
RDI_U64 source_line_map_nums_count;
RDI_U64 source_line_map_rngs_count;
RDI_U64 source_line_map_voffs_count;
};
typedef struct RDIM_LineTableBakeResult RDIM_LineTableBakeResult;
struct RDIM_LineTableBakeResult
{
RDI_LineTable *line_tables;
RDI_U64 line_tables_count;
RDI_U64 *line_table_voffs;
RDI_U64 line_table_voffs_count;
RDI_Line *line_table_lines;
RDI_U64 line_table_lines_count;
RDI_Column *line_table_columns;
RDI_U64 line_table_columns_count;
};
typedef struct RDIM_TypeNodeBakeResult RDIM_TypeNodeBakeResult;
struct RDIM_TypeNodeBakeResult
{
RDI_TypeNode *type_nodes;
RDI_U64 type_nodes_count;
};
typedef struct RDIM_UDTBakeResult RDIM_UDTBakeResult;
struct RDIM_UDTBakeResult
{
RDI_UDT *udts;
RDI_U64 udts_count;
RDI_Member *members;
RDI_U64 members_count;
RDI_EnumMember *enum_members;
RDI_U64 enum_members_count;
};
typedef struct RDIM_GlobalVariableBakeResult RDIM_GlobalVariableBakeResult;
struct RDIM_GlobalVariableBakeResult
{
RDI_GlobalVariable *global_variables;
RDI_U64 global_variables_count;
};
typedef struct RDIM_GlobalVMapBakeResult RDIM_GlobalVMapBakeResult;
struct RDIM_GlobalVMapBakeResult
{
RDIM_BakeVMap vmap;
};
typedef struct RDIM_ThreadVariableBakeResult RDIM_ThreadVariableBakeResult;
struct RDIM_ThreadVariableBakeResult
{
RDI_ThreadVariable *thread_variables;
RDI_U64 thread_variables_count;
};
typedef struct RDIM_ProcedureBakeResult RDIM_ProcedureBakeResult;
struct RDIM_ProcedureBakeResult
{
RDI_Procedure *procedures;
RDI_U64 procedures_count;
};
typedef struct RDIM_ScopeBakeResult RDIM_ScopeBakeResult;
struct RDIM_ScopeBakeResult
{
RDI_Scope *scopes;
RDI_U64 scopes_count;
RDI_U64 *scope_voffs;
RDI_U64 scope_voffs_count;
RDI_Local *locals;
RDI_U64 locals_count;
RDI_LocationBlock *location_blocks;
RDI_U64 location_blocks_count;
RDI_U8 *location_data;
RDI_U64 location_data_size;
};
typedef struct RDIM_ScopeVMapBakeResult RDIM_ScopeVMapBakeResult;
struct RDIM_ScopeVMapBakeResult
{
RDIM_BakeVMap vmap;
};
typedef struct RDIM_TopLevelNameMapBakeResult RDIM_TopLevelNameMapBakeResult;
struct RDIM_TopLevelNameMapBakeResult
{
RDI_NameMap *name_maps;
RDI_U64 name_maps_count;
};
typedef struct RDIM_NameMapBakeResult RDIM_NameMapBakeResult;
struct RDIM_NameMapBakeResult
{
RDI_NameMapBucket *buckets;
RDI_U64 buckets_count;
RDI_NameMapNode *nodes;
RDI_U64 nodes_count;
};
typedef struct RDIM_FilePathBakeResult RDIM_FilePathBakeResult;
struct RDIM_FilePathBakeResult
{
RDI_FilePathNode *nodes;
RDI_U64 nodes_count;
};
typedef struct RDIM_StringBakeResult RDIM_StringBakeResult;
struct RDIM_StringBakeResult
{
RDI_U32 *string_offs;
RDI_U64 string_offs_count;
RDI_U8 *string_data;
RDI_U64 string_data_size;
};
typedef struct RDIM_IndexRunBakeResult RDIM_IndexRunBakeResult;
struct RDIM_IndexRunBakeResult
{
RDI_U32 *idx_runs;
RDI_U64 idx_count;
};
////////////////////////////////
//~ rjf: Basic Helpers
@@ -1266,6 +1427,9 @@ RDI_PROC RDIM_BakeIdxRunMap *rdim_bake_idx_run_map_from_params(RDIM_Arena *arena
//- rjf: bake path tree building
RDI_PROC RDIM_BakePathTree *rdim_bake_path_tree_from_params(RDIM_Arena *arena, RDIM_BakeParams *params);
////////////////////////////////
//~ rjf: [Baking] Build Artifacts -> Baked Versions
////////////////////////////////
//~ rjf: [Baking] Build Artifacts -> Data Section Lists
+1 -1
View File
@@ -220,7 +220,7 @@ RDI_SectionMemberTable:
@gen(catchall)
{
@expand(RDI_SectionTable a) `$(a.name != COUNT -> "typedef " .. a.element_type .. " RDI_SectionElementType_" .. a.name .. ";")`;
@expand(RDI_SectionTable a) `$(a.name != COUNT && a.name != NULL -> "typedef " .. a.element_type .. =>40 .. " RDI_SectionElementType_" .. a.name .. ";")`;
``;
}