set up scaffolding for dbg engine/frontendm sgs

This commit is contained in:
Ryan Fleury
2024-08-30 15:24:35 -07:00
parent 533fd0041f
commit 8770a43678
9 changed files with 609 additions and 0 deletions
+40
View File
@@ -657,6 +657,31 @@ struct D_EvalVizWindowedRowList
U64 count_before_semantic;
};
////////////////////////////////
//~ rjf: Message Types
typedef struct D_Msg D_Msg;
struct D_Msg
{
D_MsgKind kind;
D_Regs *regs;
};
typedef struct D_MsgNode D_MsgNode;
struct D_MsgNode
{
D_MsgNode *next;
D_Msg v;
};
typedef struct D_MsgList D_MsgList;
struct D_MsgList
{
D_MsgNode *first;
D_MsgNode *last;
U64 count;
};
////////////////////////////////
//~ rjf: Command Specification Types
@@ -957,6 +982,10 @@ struct D_State
D_RegsNode base_regs;
D_RegsNode *top_regs;
// rjf: messages
Arena *msgs_arena;
D_MsgList msgs;
// rjf: top-level command batch
Arena *root_cmd_arena;
D_CmdList root_cmds;
@@ -1529,6 +1558,17 @@ internal void d_errorf(char *fmt, ...);
__VA_ARGS__ \
})
////////////////////////////////
//~ rjf: Message Functions
internal void d_msg_(D_MsgKind kind, D_Regs *regs);
#define d_msg(kind, ...) d_msg_((kind),\
&(D_Regs)\
{\
d_regs_lit_init_top\
__VA_ARGS__\
})
////////////////////////////////
//~ rjf: Main Layer Top-Level Calls