sketch out 'interaction registers'; fix bp hit count tracking

This commit is contained in:
Ryan Fleury
2024-06-25 17:02:43 -07:00
parent 6fa8af5e1a
commit 9be3c2affc
2 changed files with 37 additions and 1 deletions
+1 -1
View File
@@ -7031,7 +7031,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt)
if(bp->flags & DF_EntityFlag_HasTextPoint)
{
DF_Entity *bp_file = df_entity_ancestor_from_kind(bp, DF_EntityKind_File);
DF_LineList lines = df_lines_from_file_line_num(scratch.arena, bp_file, bp_file->text_point.line);
DF_LineList lines = df_lines_from_file_line_num(scratch.arena, bp_file, bp->text_point.line);
for(DF_LineNode *n = lines.first; n != 0; n = n->next)
{
if(contains_1u64(n->v.voff_range, stop_thread_voff))
+36
View File
@@ -653,6 +653,34 @@ struct DF_TextLineDasm2SrcInfoList
U64 count;
};
////////////////////////////////
//~ rjf: Interaction Context Register Types
typedef struct DF_InteractRegs DF_InteractRegs;
struct DF_InteractRegs
{
DF_Handle window;
DF_Handle panel;
DF_Handle view;
DF_Handle thread;
DF_Handle file;
TxtPt cursor;
TxtPt mark;
U64 unwind_count;
U64 inline_unwind_count;
U128 text_key;
TXT_LangKind lang_kind;
DF_LineList lines;
U64 vaddr;
};
typedef struct DF_InteractRegsNode DF_InteractRegsNode;
struct DF_InteractRegsNode
{
DF_InteractRegsNode *next;
DF_InteractRegs v;
};
////////////////////////////////
//~ rjf: Evaluation Visualization Types
@@ -1202,6 +1230,11 @@ struct DF_State
F32 dt;
F32 seconds_til_autosave;
// rjf: interaction registers
Arena *frame_arenas[2];
DF_InteractRegsNode base_interact_regs;
DF_InteractRegsNode *top_interact_regs;
// rjf: top-level command batch
Arena *root_cmd_arena;
DF_CmdList root_cmds;
@@ -1734,6 +1767,9 @@ internal F32 df_dt(void);
internal U64 df_frame_index(void);
internal F64 df_time_in_seconds(void);
//- rjf: interaction registers
internal DF_InteractRegs *df_interact_regs(void);
//- rjf: undo/redo history
internal DF_StateDeltaHistory *df_state_delta_history(void);