mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-28 18:20:02 +00:00
eliminate old eval viz code in engine
This commit is contained in:
@@ -4151,10 +4151,6 @@ d_init(void)
|
||||
d_state->member_caches[idx].arena = arena_alloc();
|
||||
}
|
||||
|
||||
// rjf: set up eval view cache
|
||||
d_state->eval_view_cache.slots_count = 4096;
|
||||
d_state->eval_view_cache.slots = push_array(arena, D_EvalViewSlot, d_state->eval_view_cache.slots_count);
|
||||
|
||||
// rjf: set up run state
|
||||
d_state->ctrl_last_run_arena = arena_alloc();
|
||||
}
|
||||
|
||||
@@ -478,218 +478,6 @@ struct D_RegsNode
|
||||
D_Regs v;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Evaluation Visualization Types
|
||||
|
||||
//- rjf: expansion key -> view rule table
|
||||
|
||||
typedef struct D_EvalViewRuleCacheNode D_EvalViewRuleCacheNode;
|
||||
struct D_EvalViewRuleCacheNode
|
||||
{
|
||||
D_EvalViewRuleCacheNode *hash_next;
|
||||
D_EvalViewRuleCacheNode *hash_prev;
|
||||
D_ExpandKey key;
|
||||
U8 *buffer;
|
||||
U64 buffer_cap;
|
||||
U64 buffer_string_size;
|
||||
};
|
||||
|
||||
typedef struct D_EvalViewRuleCacheSlot D_EvalViewRuleCacheSlot;
|
||||
struct D_EvalViewRuleCacheSlot
|
||||
{
|
||||
D_EvalViewRuleCacheNode *first;
|
||||
D_EvalViewRuleCacheNode *last;
|
||||
};
|
||||
|
||||
typedef struct D_EvalViewRuleCacheTable D_EvalViewRuleCacheTable;
|
||||
struct D_EvalViewRuleCacheTable
|
||||
{
|
||||
U64 slot_count;
|
||||
D_EvalViewRuleCacheSlot *slots;
|
||||
};
|
||||
|
||||
//- rjf: 'eval view' entities for sparse-state expandable tree view cache for evaluation visualization
|
||||
|
||||
typedef struct D_EvalViewKey D_EvalViewKey;
|
||||
struct D_EvalViewKey
|
||||
{
|
||||
U64 u64[2];
|
||||
};
|
||||
|
||||
typedef struct D_EvalView D_EvalView;
|
||||
struct D_EvalView
|
||||
{
|
||||
// rjf: links
|
||||
D_EvalView *hash_next;
|
||||
D_EvalView *hash_prev;
|
||||
|
||||
// rjf: key
|
||||
D_EvalViewKey key;
|
||||
|
||||
// rjf: arena
|
||||
Arena *arena;
|
||||
|
||||
// rjf: expansion state
|
||||
D_ExpandTreeTable expand_tree_table;
|
||||
|
||||
// rjf: key -> view rule cache
|
||||
D_EvalViewRuleCacheTable view_rule_table;
|
||||
};
|
||||
|
||||
typedef struct D_EvalViewSlot D_EvalViewSlot;
|
||||
struct D_EvalViewSlot
|
||||
{
|
||||
D_EvalView *first;
|
||||
D_EvalView *last;
|
||||
};
|
||||
|
||||
typedef struct D_EvalViewCache D_EvalViewCache;
|
||||
struct D_EvalViewCache
|
||||
{
|
||||
D_EvalViewSlot *slots;
|
||||
U64 slots_count;
|
||||
};
|
||||
|
||||
//- rjf: eval view visualization building
|
||||
|
||||
typedef struct D_EvalLinkBase D_EvalLinkBase;
|
||||
struct D_EvalLinkBase
|
||||
{
|
||||
U64 offset;
|
||||
};
|
||||
|
||||
typedef struct D_EvalLinkBaseChunkNode D_EvalLinkBaseChunkNode;
|
||||
struct D_EvalLinkBaseChunkNode
|
||||
{
|
||||
D_EvalLinkBaseChunkNode *next;
|
||||
D_EvalLinkBase b[64];
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef struct D_EvalLinkBaseChunkList D_EvalLinkBaseChunkList;
|
||||
struct D_EvalLinkBaseChunkList
|
||||
{
|
||||
D_EvalLinkBaseChunkNode *first;
|
||||
D_EvalLinkBaseChunkNode *last;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef struct D_EvalLinkBaseArray D_EvalLinkBaseArray;
|
||||
struct D_EvalLinkBaseArray
|
||||
{
|
||||
D_EvalLinkBase *v;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef enum D_EvalVizBlockKind
|
||||
{
|
||||
D_EvalVizBlockKind_Null, // empty
|
||||
D_EvalVizBlockKind_Root, // root of tree or subtree; possibly-expandable expression.
|
||||
D_EvalVizBlockKind_Members, // members of struct, class, union
|
||||
D_EvalVizBlockKind_EnumMembers, // members of enum
|
||||
D_EvalVizBlockKind_Elements, // elements of array
|
||||
D_EvalVizBlockKind_Canvas, // escape hatch for arbitrary UI
|
||||
D_EvalVizBlockKind_DebugInfoTable, // block of filtered debug info table elements
|
||||
D_EvalVizBlockKind_COUNT,
|
||||
}
|
||||
D_EvalVizBlockKind;
|
||||
|
||||
typedef struct D_EvalVizBlock D_EvalVizBlock;
|
||||
struct D_EvalVizBlock
|
||||
{
|
||||
// rjf: kind & keys
|
||||
D_EvalVizBlockKind kind;
|
||||
D_ExpandKey parent_key;
|
||||
D_ExpandKey key;
|
||||
S32 depth;
|
||||
|
||||
// rjf: evaluation info
|
||||
String8 string;
|
||||
E_Expr *expr;
|
||||
|
||||
// rjf: info about ranges that this block spans
|
||||
Rng1U64 visual_idx_range;
|
||||
Rng1U64 semantic_idx_range;
|
||||
|
||||
// rjf: visualization config extensions
|
||||
D_CfgTable *cfg_table;
|
||||
D_EvalLinkBaseChunkList *link_bases;
|
||||
E_MemberArray members;
|
||||
E_EnumValArray enum_vals;
|
||||
RDI_SectionKind fzy_target;
|
||||
FZY_ItemArray fzy_backing_items;
|
||||
};
|
||||
|
||||
typedef struct D_EvalVizBlockNode D_EvalVizBlockNode;
|
||||
struct D_EvalVizBlockNode
|
||||
{
|
||||
D_EvalVizBlockNode *next;
|
||||
D_EvalVizBlock v;
|
||||
};
|
||||
|
||||
typedef struct D_EvalVizBlockList D_EvalVizBlockList;
|
||||
struct D_EvalVizBlockList
|
||||
{
|
||||
D_EvalVizBlockNode *first;
|
||||
D_EvalVizBlockNode *last;
|
||||
U64 count;
|
||||
U64 total_visual_row_count;
|
||||
U64 total_semantic_row_count;
|
||||
};
|
||||
|
||||
typedef struct D_EvalVizBlockArray D_EvalVizBlockArray;
|
||||
struct D_EvalVizBlockArray
|
||||
{
|
||||
D_EvalVizBlock *v;
|
||||
U64 count;
|
||||
U64 total_visual_row_count;
|
||||
U64 total_semantic_row_count;
|
||||
};
|
||||
|
||||
typedef U32 D_EvalVizStringFlags;
|
||||
enum
|
||||
{
|
||||
D_EvalVizStringFlag_ReadOnlyDisplayRules = (1<<0),
|
||||
};
|
||||
|
||||
typedef struct D_EvalVizRow D_EvalVizRow;
|
||||
struct D_EvalVizRow
|
||||
{
|
||||
D_EvalVizRow *next;
|
||||
|
||||
// rjf: block hierarchy info
|
||||
S32 depth;
|
||||
D_ExpandKey parent_key;
|
||||
D_ExpandKey key;
|
||||
|
||||
// rjf: row size/scroll info
|
||||
U64 size_in_rows;
|
||||
U64 skipped_size_in_rows;
|
||||
U64 chopped_size_in_rows;
|
||||
|
||||
// rjf: evaluation expression
|
||||
String8 string;
|
||||
E_Member *member;
|
||||
E_Expr *expr;
|
||||
|
||||
// rjf: view rule attachments
|
||||
D_CfgTable *cfg_table;
|
||||
struct DF_ViewRuleSpec *expand_ui_rule_spec;
|
||||
MD_Node *expand_ui_rule_params;
|
||||
struct DF_ViewRuleSpec *value_ui_rule_spec;
|
||||
MD_Node *value_ui_rule_params;
|
||||
};
|
||||
|
||||
typedef struct D_EvalVizWindowedRowList D_EvalVizWindowedRowList;
|
||||
struct D_EvalVizWindowedRowList
|
||||
{
|
||||
D_EvalVizRow *first;
|
||||
D_EvalVizRow *last;
|
||||
U64 count;
|
||||
U64 count_before_visual;
|
||||
U64 count_before_semantic;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Command Specification Types
|
||||
|
||||
@@ -958,9 +746,6 @@ struct D_State
|
||||
D_RunLocalsCache member_caches[2];
|
||||
U64 member_cache_gen;
|
||||
|
||||
// rjf: eval view cache
|
||||
D_EvalViewCache eval_view_cache;
|
||||
|
||||
// rjf: command specification table
|
||||
U64 total_registrar_count;
|
||||
U64 cmd_spec_table_size;
|
||||
@@ -1013,7 +798,6 @@ read_only global D_Entity d_nil_entity =
|
||||
&d_nil_entity,
|
||||
&d_nil_entity,
|
||||
};
|
||||
read_only global D_EvalView d_nil_eval_view = {&d_nil_eval_view, &d_nil_eval_view};
|
||||
|
||||
global D_State *d_state = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user