Skip to content

Commit 46d879e

Browse files
committed
extend udts w/ container info
1 parent a20f1b5 commit 46d879e

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

src/lib_rdi/rdi.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ union RDI_GUID {RDI_U8 u8[16]; RDI_U64 u64[2];};
6767

6868
// "raddbg\0\0"
6969
#define RDI_MAGIC_CONSTANT 0x0000676264646172
70-
#define RDI_ENCODING_VERSION 20
70+
#define RDI_ENCODING_VERSION 21
7171

7272
////////////////////////////////////////////////////////////////
7373
//~ Format Types & Functions
@@ -363,7 +363,7 @@ RDI_TypeModifierFlag_Volatile = 1<<1,
363363
RDI_TypeModifierFlag_Restrict = 1<<2,
364364
} RDI_TypeModifierFlagsEnum;
365365

366-
typedef RDI_U32 RDI_UDTFlags;
366+
typedef RDI_U8 RDI_UDTFlags;
367367
typedef enum RDI_UDTFlagsEnum
368368
{
369369
RDI_UDTFlag_EnumMembers = 1<<0,
@@ -879,11 +879,14 @@ X(EnumMembers)\
879879
#define RDI_UDT_XList \
880880
X(RDI_U32, self_type_idx)\
881881
X(RDI_UDTFlags, flags)\
882+
X(RDI_ContainerFlags, container_flags)\
883+
X(RDI_U16, reserved_0)\
882884
X(RDI_U32, member_first)\
883885
X(RDI_U32, member_count)\
884886
X(RDI_U32, file_idx)\
885887
X(RDI_U32, line)\
886888
X(RDI_U32, col)\
889+
X(RDI_U32, container_idx)\
887890

888891
#define RDI_MemberKind_XList \
889892
X(NULL)\
@@ -1427,11 +1430,14 @@ struct RDI_UDT
14271430
{
14281431
RDI_U32 self_type_idx;
14291432
RDI_UDTFlags flags;
1433+
RDI_ContainerFlags container_flags;
1434+
RDI_U16 reserved_0;
14301435
RDI_U32 member_first;
14311436
RDI_U32 member_count;
14321437
RDI_U32 file_idx;
14331438
RDI_U32 line;
14341439
RDI_U32 col;
1440+
RDI_U32 container_idx;
14351441
};
14361442

14371443
typedef struct RDI_Member RDI_Member;

src/rdi/rdi.mdesk

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"";
7878
"// \"raddbg\\0\\0\"";
7979
"#define RDI_MAGIC_CONSTANT 0x0000676264646172";
80-
"#define RDI_ENCODING_VERSION 20";
80+
"#define RDI_ENCODING_VERSION 21";
8181
"";
8282
"////////////////////////////////////////////////////////////////";
8383
"//~ Format Types & Functions";
@@ -825,13 +825,16 @@ RDI_UDTFlagTable:
825825
@table(name type desc)
826826
RDI_UDTMemberTable:
827827
{
828-
{self_type_idx RDI_U32 ""}
829-
{flags RDI_UDTFlags ""}
830-
{member_first RDI_U32 ""}
831-
{member_count RDI_U32 ""}
832-
{file_idx RDI_U32 ""}
833-
{line RDI_U32 ""}
834-
{col RDI_U32 ""}
828+
{self_type_idx RDI_U32 ""}
829+
{flags RDI_UDTFlags ""}
830+
{container_flags RDI_ContainerFlags ""}
831+
{reserved_0 RDI_U16 ""}
832+
{member_first RDI_U32 ""}
833+
{member_count RDI_U32 ""}
834+
{file_idx RDI_U32 ""}
835+
{line RDI_U32 ""}
836+
{col RDI_U32 ""}
837+
{container_idx RDI_U32 ""}
835838
}
836839

837840
@table(name value)
@@ -942,7 +945,7 @@ RDI_EnumMemberTable:
942945
```
943946
}
944947

945-
@enum(RDI_U32) RDI_UDTFlags:
948+
@enum(RDI_U8) RDI_UDTFlags:
946949
{
947950
@expand(RDI_UDTFlagTable a) `$(a.name .. =>20) = $(a.value)`
948951
}

src/rdi_make/rdi_make_local.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,17 +1799,6 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
17991799
}
18001800
lane_sync();
18011801

1802-
//////////////////////////////////////////////////////////////
1803-
//- rjf: @rdim_bake_stage build deduplicated location maps
1804-
//
1805-
RDIM_BakeStringMapTight *bake_locs__regs = 0;
1806-
RDIM_BakeStringMapTight *bake_locs__reg_plus_u16 = 0;
1807-
RDIM_BakeStringMapTight *bake_locs__bytecode = 0;
1808-
{
1809-
1810-
}
1811-
lane_sync();
1812-
18131802
//////////////////////////////////////////////////////////////
18141803
//- rjf: @rdim_bake_stage bake strings
18151804
//
@@ -3198,6 +3187,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
31983187
}
31993188
}
32003189
#endif
3190+
32013191
//////////////////////////////////////////////////////////////
32023192
//- rjf: @rdim_bake_stage compute layout for constant data
32033193
//

0 commit comments

Comments
 (0)