mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
eliminate all old eval visualization block/row code
This commit is contained in:
@@ -873,13 +873,6 @@ RD_CollectionTable:
|
||||
@expand(RD_CollectionTable a) `EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_NAME($(a.id_space == x -> a.name)$(a.id_space != x -> identity))`
|
||||
}
|
||||
|
||||
/* @blocks
|
||||
@data(`EV_ViewRuleBlockProdHookFunctionType *`) rd_collection_block_prod_hook_function_table:
|
||||
{
|
||||
@expand(RD_CollectionTable a) `EV_VIEW_RULE_BLOCK_PROD_FUNCTION_NAME($(a.name))`
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: View Rules
|
||||
|
||||
@@ -951,7 +944,6 @@ RD_ViewRuleTable:
|
||||
`String8 params_schema`;
|
||||
`RD_IconKind icon_kind`;
|
||||
`RD_ViewRuleInfoFlags flags`;
|
||||
// TODO(rjf): @blocks `EV_ViewRuleBlockProdHookFunctionType *block_prod`;
|
||||
`EV_ViewRuleExprExpandInfoHookFunctionType *expr_expand_info`;
|
||||
`RD_ViewRuleUIFunctionType *ui`;
|
||||
}
|
||||
@@ -959,7 +951,6 @@ RD_ViewRuleTable:
|
||||
@gen
|
||||
{
|
||||
`RD_VIEW_RULE_UI_FUNCTION_DEF(null);`,
|
||||
// @blocks @expand(RD_ViewRuleTable a) `$(a.can_use_in_watch_table != 0 -> "EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(" .. a.name_lower .. ");")`,
|
||||
@expand(RD_ViewRuleTable a) `$(a.can_use_in_watch_table != 0 && a.can_expand != 0 -> "EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(" .. a.name_lower .. ");")`,
|
||||
@expand(RD_ViewRuleTable a) `RD_VIEW_RULE_UI_FUNCTION_DEF($(a.name_lower));`,
|
||||
}
|
||||
|
||||
+10
-330
@@ -5825,12 +5825,12 @@ rd_window_frame(RD_Window *ws)
|
||||
EV_View *ev_view = rd_ev_view_from_key(d_hash_from_string(ev_view_key_string));
|
||||
EV_Key parent_key = ev_key_make(5381, 1);
|
||||
EV_Key key = ev_key_make(ev_hash_from_key(parent_key), 1);
|
||||
EV2_BlockTree block_tree = ev2_block_tree_from_string(scratch.arena, ev_view, str8_zero(), expr, &top_level_view_rules);
|
||||
EV2_BlockRangeList block_ranges = ev2_block_range_list_from_tree(scratch.arena, &block_tree);
|
||||
EV_BlockTree block_tree = ev_block_tree_from_string(scratch.arena, ev_view, str8_zero(), expr, &top_level_view_rules);
|
||||
EV_BlockRangeList block_ranges = ev_block_range_list_from_tree(scratch.arena, &block_tree);
|
||||
// EV_BlockList viz_blocks = ev_block_list_from_view_expr_keys(scratch.arena, ev_view, str8_zero(), &top_level_view_rules, expr, parent_key, key, 0);
|
||||
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(eval.space);
|
||||
U32 default_radix = (entity->kind == CTRL_EntityKind_Thread ? 16 : 10);
|
||||
EV2_WindowedRowList rows = ev2_windowed_row_list_from_block_range_list(scratch.arena, ev_view, str8_zero(), &block_ranges, r1u64(0, 50));
|
||||
EV_WindowedRowList rows = ev_windowed_row_list_from_block_range_list(scratch.arena, ev_view, str8_zero(), &block_ranges, r1u64(0, 50));
|
||||
// EV_WindowedRowList viz_rows = ev_windowed_row_list_from_block_list(scratch.arena, ev_view, r1s64(0, 50), &viz_blocks);
|
||||
|
||||
//- rjf: animate
|
||||
@@ -5872,9 +5872,9 @@ rd_window_frame(RD_Window *ws)
|
||||
F32 value_column_width_px = 30.f*ui_top_font_size();
|
||||
if(rows.first != 0)
|
||||
{
|
||||
EV2_Row *row = rows.first;
|
||||
EV_Row *row = rows.first;
|
||||
E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr);
|
||||
String8 row_expr_string = ev2_expr_string_from_row(scratch.arena, row, 0);
|
||||
String8 row_expr_string = ev_expr_string_from_row(scratch.arena, row, 0);
|
||||
String8 row_display_value = rd_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules);
|
||||
expr_column_width_px = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, 0, row_expr_string).x + ui_top_font_size()*5.f;
|
||||
value_column_width_px = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, 0, row_display_value).x + ui_top_font_size()*5.f;
|
||||
@@ -5918,16 +5918,16 @@ rd_window_frame(RD_Window *ws)
|
||||
UI_Parent(hover_eval_box) UI_PrefHeight(ui_px(row_height, 1.f))
|
||||
{
|
||||
//- rjf: build rows
|
||||
for(EV2_Row *row = rows.first; row != 0; row = row->next)
|
||||
for(EV_Row *row = rows.first; row != 0; row = row->next)
|
||||
{
|
||||
//- rjf: unpack row
|
||||
U64 row_depth = ev2_depth_from_block(row->block);
|
||||
U64 row_depth = ev_depth_from_block(row->block);
|
||||
E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr);
|
||||
String8 row_expr_string = ev2_expr_string_from_row(scratch.arena, row, 0);
|
||||
String8 row_expr_string = ev_expr_string_from_row(scratch.arena, row, 0);
|
||||
String8 row_edit_value = rd_value_string_from_eval(scratch.arena, 0, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules);
|
||||
String8 row_display_value = rd_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules);
|
||||
B32 row_is_editable = ev2_row_is_editable(row);
|
||||
B32 row_is_expandable = ev2_row_is_expandable(row);
|
||||
B32 row_is_editable = ev_row_is_editable(row);
|
||||
B32 row_is_expandable = ev_row_is_expandable(row);
|
||||
|
||||
//- rjf: determine if row's data is fresh and/or bad
|
||||
B32 row_is_fresh = 0;
|
||||
@@ -8072,199 +8072,6 @@ EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(procedures) {return rd_ev_
|
||||
EV_VIEW_RULE_EXPR_EXPAND_ID_FROM_NUM_FUNCTION_DEF(procedures) {return rd_ev_view_rule_expr_id_from_num__debug_info_tables(num, user_data, RDI_SectionKind_Procedures); }
|
||||
EV_VIEW_RULE_EXPR_EXPAND_NUM_FROM_ID_FUNCTION_DEF(procedures) {return rd_ev_view_rule_expr_num_from_id__debug_info_tables(id, user_data, RDI_SectionKind_Procedures); }
|
||||
|
||||
//- TODO(rjf): OLD VVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(watches)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_EntityList watches = rd_query_cached_entity_list_with_kind(RD_EntityKind_Watch);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
for(RD_EntityNode *n = watches.first; n != 0; n = n->next)
|
||||
{
|
||||
RD_Entity *entity = n->entity;
|
||||
String8 entity_expr_string = entity->string;
|
||||
EV_Key entity_parent_key = rd_parent_ev_key_from_entity(entity);
|
||||
EV_Key entity_key = rd_ev_key_from_entity(entity);
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, filter, view_rules_inherited, entity_expr_string, entity_parent_key, entity_key, depth);
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, entity_expr_string);
|
||||
if(blocks.total_semantic_row_count > 1 || matches.count == matches.needle_part_count)
|
||||
{
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(targets)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_EntityList targets = rd_query_cached_entity_list_with_kind(RD_EntityKind_Target);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
ev_view_rule_list_push_string(arena, view_rules_inherited, str8_lit("target"));
|
||||
for(RD_EntityNode *n = targets.first; n != 0; n = n->next)
|
||||
{
|
||||
RD_Entity *target = n->entity;
|
||||
String8 target_expr_string = push_str8f(arena, "$%I64u", target->id);
|
||||
EV_Key target_parent_key = key;
|
||||
EV_Key target_key = ev_key_make(ev_hash_from_key(target_parent_key), target->id);
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, target_expr_string, target_parent_key, target_key, depth);
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(breakpoints)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_EntityList bps = rd_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
for(RD_EntityNode *n = bps.first; n != 0; n = n->next)
|
||||
{
|
||||
RD_Entity *bp = n->entity;
|
||||
String8 bp_expr_string = push_str8f(arena, "$%I64u", bp->id);
|
||||
EV_Key bp_parent_key = key;
|
||||
EV_Key bp_key = ev_key_make(ev_hash_from_key(bp_parent_key), bp->id);
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, bp_expr_string, bp_parent_key, bp_key, depth);
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(watch_pins)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_EntityList wps = rd_query_cached_entity_list_with_kind(RD_EntityKind_WatchPin);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
for(RD_EntityNode *n = wps.first; n != 0; n = n->next)
|
||||
{
|
||||
RD_Entity *wp = n->entity;
|
||||
String8 wp_expr_string = push_str8f(arena, "$%I64u", wp->id);
|
||||
EV_Key wp_parent_key = key;
|
||||
EV_Key wp_key = ev_key_make(ev_hash_from_key(wp_parent_key), wp->id);
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, wp_expr_string, wp_parent_key, wp_key, depth);
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(threads)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
CTRL_EntityList entities = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Thread);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
ev_view_rule_list_push_string(arena, view_rules_inherited, str8_lit("thread"));
|
||||
for(CTRL_EntityNode *n = entities.first; n != 0; n = n->next)
|
||||
{
|
||||
CTRL_Entity *entity = n->v;
|
||||
String8 entity_expr_string = push_str8f(arena, "$_%I64x_%I64x", entity->handle.machine_id, entity->handle.dmn_handle.u64[0]);
|
||||
EV_Key entity_parent_key = key;
|
||||
EV_Key entity_key = ev_key_make(ev_hash_from_key(entity_parent_key), d_hash_from_string(entity_expr_string));
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, entity_expr_string, entity_parent_key, entity_key, depth);
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(modules)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
CTRL_EntityList entities = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Module);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
for(CTRL_EntityNode *n = entities.first; n != 0; n = n->next)
|
||||
{
|
||||
CTRL_Entity *entity = n->v;
|
||||
String8 entity_expr_string = push_str8f(arena, "$_%I64x_%I64x", entity->handle.machine_id, entity->handle.dmn_handle.u64[0]);
|
||||
EV_Key entity_parent_key = key;
|
||||
EV_Key entity_key = ev_key_make(ev_hash_from_key(entity_parent_key), d_hash_from_string(entity_expr_string));
|
||||
EV_BlockList blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, entity_expr_string, entity_parent_key, entity_key, depth);
|
||||
ev_block_list_concat__in_place(out, &blocks);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(locals)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_String2NumMapNodeArray nodes = e_string2num_map_node_array_from_map(scratch.arena, e_parse_ctx->locals_map);
|
||||
e_string2num_map_node_array_sort__in_place(&nodes);
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
for(U64 idx = 0; idx < nodes.count; idx += 1)
|
||||
{
|
||||
E_String2NumMapNode *n = nodes.v[idx];
|
||||
String8 root_expr_string = n->string;
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, root_expr_string);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
{
|
||||
EV_Key local_parent_key = key;
|
||||
EV_Key local_key = ev_key_make(ev_hash_from_key(local_parent_key), idx+1);
|
||||
EV_BlockList root_blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, root_expr_string, local_parent_key, local_key, depth);
|
||||
ev_block_list_concat__in_place(out, &root_blocks);
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(registers)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread);
|
||||
Arch arch = thread->arch;
|
||||
U64 reg_count = regs_reg_code_count_from_arch(arch);
|
||||
String8 *reg_strings = regs_reg_code_string_table_from_arch(arch);
|
||||
U64 alias_count = regs_alias_code_count_from_arch(arch);
|
||||
String8 *alias_strings = regs_alias_code_string_table_from_arch(arch);
|
||||
U64 num = 1;
|
||||
EV_ViewRuleList *view_rules_inherited = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
ev_view_rule_list_push_string(arena, view_rules_inherited, str8_lit("hex"));
|
||||
for(U64 reg_idx = 1; reg_idx < reg_count; reg_idx += 1, num += 1)
|
||||
{
|
||||
String8 root_expr_string = push_str8f(arena, "reg:%S", reg_strings[reg_idx]);
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, root_expr_string);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
{
|
||||
EV_Key reg_parent_key = key;
|
||||
EV_Key reg_key = ev_key_make(ev_hash_from_key(reg_parent_key), num);
|
||||
EV_BlockList root_blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, root_expr_string, reg_parent_key, reg_key, depth);
|
||||
ev_block_list_concat__in_place(out, &root_blocks);
|
||||
}
|
||||
}
|
||||
for(U64 alias_idx = 1; alias_idx < alias_count; alias_idx += 1, num += 1)
|
||||
{
|
||||
String8 root_expr_string = push_str8f(arena, "reg:%S", alias_strings[alias_idx]);
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, root_expr_string);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
{
|
||||
EV_Key reg_parent_key = ev_key_make(5381, 0);
|
||||
EV_Key reg_key = ev_key_make(ev_hash_from_key(reg_parent_key), num);
|
||||
EV_BlockList root_blocks = ev_block_list_from_view_expr_keys(arena, view, str8_zero(), view_rules_inherited, root_expr_string, reg_parent_key, reg_key, depth);
|
||||
ev_block_list_concat__in_place(out, &root_blocks);
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(globals)
|
||||
{
|
||||
rd_ev_view_rule_block_prod_collection_debug_tables(arena, RDI_SectionKind_GlobalVariables, view, filter, parent_key, key, expand_node, string, expr, view_rules, view_params, depth, out);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(thread_locals)
|
||||
{
|
||||
rd_ev_view_rule_block_prod_collection_debug_tables(arena, RDI_SectionKind_ThreadVariables, view, filter, parent_key, key, expand_node, string, expr, view_rules, view_params, depth, out);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(types)
|
||||
{
|
||||
rd_ev_view_rule_block_prod_collection_debug_tables(arena, RDI_SectionKind_UDTs, view, filter, parent_key, key, expand_node, string, expr, view_rules, view_params, depth, out);
|
||||
}
|
||||
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(procedures)
|
||||
{
|
||||
rd_ev_view_rule_block_prod_collection_debug_tables(arena, RDI_SectionKind_Procedures, view, filter, parent_key, key, expand_node, string, expr, view_rules, view_params, depth, out);
|
||||
}
|
||||
#endif
|
||||
|
||||
internal EV_ExpandInfo
|
||||
rd_ev_view_rule_expr_expand_info__meta_entities(Arena *arena, EV_View *view, String8 filter, E_Expr *expr, MD_Node *params, RD_EntityKind kind)
|
||||
{
|
||||
@@ -8569,133 +8376,6 @@ rd_ev_view_rule_expr_num_from_id__debug_info_tables(U64 id, void *user_data, RDI
|
||||
return num;
|
||||
}
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
internal void
|
||||
rd_ev_view_rule_block_prod_collection_debug_tables(Arena *arena, RDI_SectionKind target, EV_View *view, String8 filter, EV_Key parent_key, EV_Key key, EV_ExpandNode *expand_node, String8 string, E_Expr *expr, EV_ViewRuleList *view_rules, MD_Node *view_params, S32 depth, struct EV_BlockList *out)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
if(target != RDI_SectionKind_NULL)
|
||||
{
|
||||
U64 endt_us = os_now_microseconds()+200;
|
||||
|
||||
//- rjf: unpack context
|
||||
DI_KeyList dbgi_keys_list = d_push_active_dbgi_key_list(scratch.arena);
|
||||
DI_KeyArray dbgi_keys = di_key_array_from_list(scratch.arena, &dbgi_keys_list);
|
||||
U64 rdis_count = dbgi_keys.count;
|
||||
RDI_Parsed **rdis = push_array(scratch.arena, RDI_Parsed *, rdis_count);
|
||||
for(U64 idx = 0; idx < rdis_count; idx += 1)
|
||||
{
|
||||
rdis[idx] = di_rdi_from_key(rd_state->frame_di_scope, &dbgi_keys.v[idx], endt_us);
|
||||
}
|
||||
|
||||
//- rjf: calculate top-level keys, expand root-level, grab root expansion node
|
||||
EV_ExpandNode *root_node = ev_expand_node_from_key(view, key);
|
||||
|
||||
//- rjf: query all filtered items from dbgi searching system
|
||||
U128 fuzzy_search_key = {rd_regs()->view.u64[0], d_hash_from_seed_string(ev_hash_from_key(key), string)};
|
||||
B32 items_stale = 0;
|
||||
FZY_Params params = {target, dbgi_keys};
|
||||
FZY_ItemArray items = fzy_items_from_key_params_query(rd_state->frame_fzy_scope, fuzzy_search_key, ¶ms, filter, endt_us, &items_stale);
|
||||
if(items_stale)
|
||||
{
|
||||
rd_request_frame();
|
||||
}
|
||||
|
||||
//- rjf: gather unsorted child expansion keys
|
||||
//
|
||||
// Nodes are sorted in the underlying expansion tree data structure, but
|
||||
// ONLY by THEIR ORDER IN THE UNDERLYING DEBUG INFO TABLE. This is
|
||||
// because debug info watch rows use the DEBUG INFO TABLE INDEX to form
|
||||
// their key - this provides more stable/predictable behavior as rows
|
||||
// are reordered, filtered, and shuffled around, as the user filters.
|
||||
//
|
||||
// When we actually build viz blocks, however, we want to produce viz
|
||||
// blocks BY THE ORDER OF SUB-EXPANSIONS IN THE FILTERED ITEM ARRAY
|
||||
// SPACE, so that all of the expansions come out in the right order.
|
||||
//
|
||||
EV_Key *sub_expand_keys = 0;
|
||||
U64 *sub_expand_item_idxs = 0;
|
||||
U64 sub_expand_keys_count = 0;
|
||||
{
|
||||
for(EV_ExpandNode *child = root_node->first; child != 0; child = child->next)
|
||||
{
|
||||
sub_expand_keys_count += 1;
|
||||
}
|
||||
sub_expand_keys = push_array(scratch.arena, EV_Key, sub_expand_keys_count);
|
||||
sub_expand_item_idxs = push_array(scratch.arena, U64, sub_expand_keys_count);
|
||||
U64 idx = 0;
|
||||
for(EV_ExpandNode *child = root_node->first; child != 0; child = child->next)
|
||||
{
|
||||
U64 item_num = fzy_item_num_from_array_element_idx__linear_search(&items, child->key.child_id);
|
||||
if(item_num != 0)
|
||||
{
|
||||
sub_expand_keys[idx] = child->key;
|
||||
sub_expand_item_idxs[idx] = item_num-1;
|
||||
idx += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_expand_keys_count -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: sort child expansion keys
|
||||
{
|
||||
for(U64 idx1 = 0; idx1 < sub_expand_keys_count; idx1 += 1)
|
||||
{
|
||||
U64 min_idx2 = 0;
|
||||
U64 min_item_idx = sub_expand_item_idxs[idx1];
|
||||
for(U64 idx2 = idx1+1; idx2 < sub_expand_keys_count; idx2 += 1)
|
||||
{
|
||||
if(sub_expand_item_idxs[idx2] < min_item_idx)
|
||||
{
|
||||
min_idx2 = idx2;
|
||||
min_item_idx = sub_expand_item_idxs[idx2];
|
||||
}
|
||||
}
|
||||
if(min_idx2 != 0)
|
||||
{
|
||||
Swap(EV_Key, sub_expand_keys[idx1], sub_expand_keys[min_idx2]);
|
||||
Swap(U64, sub_expand_item_idxs[idx1], sub_expand_item_idxs[min_idx2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: build blocks for all table items, split by sorted sub-expansions
|
||||
EV_Block *last_vb = ev_block_begin(arena, EV_BlockKind_DebugInfoTable, key, ev_key_make(ev_hash_from_key(key), 0), depth);
|
||||
{
|
||||
last_vb->visual_idx_range = last_vb->semantic_idx_range = r1u64(0, items.count);
|
||||
last_vb->fzy_target = target;
|
||||
last_vb->fzy_backing_items = items;
|
||||
}
|
||||
for(U64 sub_expand_idx = 0; sub_expand_idx < sub_expand_keys_count; sub_expand_idx += 1)
|
||||
{
|
||||
FZY_Item *item = &items.v[sub_expand_item_idxs[sub_expand_idx]];
|
||||
E_Expr *child_expr = ev_expr_from_block_index(arena, last_vb, sub_expand_item_idxs[sub_expand_idx]);
|
||||
|
||||
// rjf: form split: truncate & complete last block; begin next block
|
||||
last_vb = ev_block_split_and_continue(arena, out, last_vb, sub_expand_item_idxs[sub_expand_idx]);
|
||||
|
||||
// rjf: build child view rules
|
||||
EV_ViewRuleList *child_view_rules = ev_view_rule_list_from_inheritance(arena, view_rules);
|
||||
{
|
||||
String8 view_rule_string = ev_view_rule_from_key(view, sub_expand_keys[sub_expand_idx]);
|
||||
if(view_rule_string.size != 0)
|
||||
{
|
||||
ev_view_rule_list_push_string(arena, child_view_rules, view_rule_string);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: recurse for child
|
||||
ev_append_expr_blocks__rec(arena, view, str8_zero(), key, sub_expand_keys[sub_expand_idx], str8_zero(), child_expr, child_view_rules, depth, out);
|
||||
}
|
||||
ev_block_end(out, last_vb);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
#endif
|
||||
|
||||
internal EV_View *
|
||||
rd_ev_view_from_key(U64 key)
|
||||
{
|
||||
|
||||
@@ -1303,10 +1303,6 @@ internal EV_ExpandRangeInfo rd_ev_view_rule_expr_expand_range_info__debug_info_t
|
||||
internal U64 rd_ev_view_rule_expr_id_from_num__debug_info_tables(U64 num, void *user_data, RDI_SectionKind section);
|
||||
internal U64 rd_ev_view_rule_expr_num_from_id__debug_info_tables(U64 id, void *user_data, RDI_SectionKind section);
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
internal void rd_ev_view_rule_block_prod_collection_debug_tables(Arena *arena, RDI_SectionKind target, EV_View *view, String8 filter, EV_Key parent_key, EV_Key key, EV_ExpandNode *expand_node, String8 string, E_Expr *expr, EV_ViewRuleList *view_rules, MD_Node *view_params, S32 depth, struct EV_BlockList *out);
|
||||
#endif
|
||||
|
||||
internal EV_View *rd_ev_view_from_key(U64 key);
|
||||
internal F32 rd_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules, String8List *out);
|
||||
internal String8 rd_value_string_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules);
|
||||
|
||||
+46
-137
@@ -793,32 +793,32 @@ rd_watch_view_point_match(RD_WatchViewPoint a, RD_WatchViewPoint b)
|
||||
}
|
||||
|
||||
internal RD_WatchViewPoint
|
||||
rd_watch_view_point_from_tbl(EV2_BlockRangeList *block_ranges, Vec2S64 tbl)
|
||||
rd_watch_view_point_from_tbl(EV_BlockRangeList *block_ranges, Vec2S64 tbl)
|
||||
{
|
||||
RD_WatchViewPoint pt = zero_struct;
|
||||
pt.x = tbl.x;
|
||||
pt.key = ev2_key_from_num(block_ranges, (U64)tbl.y);
|
||||
pt.parent_key = ev2_block_range_from_num(block_ranges, (U64)tbl.y).block->key;
|
||||
pt.key = ev_key_from_num(block_ranges, (U64)tbl.y);
|
||||
pt.parent_key = ev_block_range_from_num(block_ranges, (U64)tbl.y).block->key;
|
||||
return pt;
|
||||
}
|
||||
|
||||
internal Vec2S64
|
||||
rd_tbl_from_watch_view_point(EV2_BlockRangeList *block_ranges, RD_WatchViewPoint pt)
|
||||
rd_tbl_from_watch_view_point(EV_BlockRangeList *block_ranges, RD_WatchViewPoint pt)
|
||||
{
|
||||
Vec2S64 tbl = {0};
|
||||
tbl.x = pt.x;
|
||||
tbl.y = (S64)ev2_num_from_key(block_ranges, pt.key);
|
||||
tbl.y = (S64)ev_num_from_key(block_ranges, pt.key);
|
||||
return tbl;
|
||||
}
|
||||
|
||||
//- rjf: table coordinates -> entities in collectons
|
||||
|
||||
internal RD_WatchViewCollectionInfo
|
||||
rd_collection_info_from_num(EV2_BlockRangeList *block_ranges, S64 num)
|
||||
rd_collection_info_from_num(EV_BlockRangeList *block_ranges, S64 num)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
EV2_Block *block = ev2_block_range_from_num(block_ranges, num).block;
|
||||
EV_Key key = ev2_key_from_num(block_ranges, num);
|
||||
EV_Block *block = ev_block_range_from_num(block_ranges, num).block;
|
||||
EV_Key key = ev_key_from_num(block_ranges, num);
|
||||
U64 block_relative_num = block->expand_view_rule_info->expr_expand_num_from_id(key.child_id, block->expand_view_rule_info_user_data);
|
||||
RD_EntityKind collection_entity_kind = RD_EntityKind_Nil;
|
||||
E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, block->expr);
|
||||
@@ -846,7 +846,7 @@ rd_collection_info_from_num(EV2_BlockRangeList *block_ranges, S64 num)
|
||||
//- rjf: row/column -> strings
|
||||
|
||||
internal String8
|
||||
rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV2_Row *row, RD_WatchViewColumn *col, EV_StringFlags string_flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px)
|
||||
rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, RD_WatchViewColumn *col, EV_StringFlags string_flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px)
|
||||
{
|
||||
String8 result = {0};
|
||||
EV_ViewRuleList *view_rules = row->view_rules;
|
||||
@@ -860,7 +860,7 @@ rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV2_Row *row, RD_W
|
||||
default:{}break;
|
||||
case RD_WatchViewColumnKind_Expr:
|
||||
{
|
||||
result = ev2_expr_string_from_row(arena, row, string_flags);
|
||||
result = ev_expr_string_from_row(arena, row, string_flags);
|
||||
}break;
|
||||
case RD_WatchViewColumnKind_Value:
|
||||
{
|
||||
@@ -1059,8 +1059,8 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
//////////////////////////////
|
||||
//- rjf: consume events & perform navigations/edits - calculate state
|
||||
//
|
||||
EV2_BlockTree block_tree = {0};
|
||||
EV2_BlockRangeList block_ranges = {0};
|
||||
EV_BlockTree block_tree = {0};
|
||||
EV_BlockRangeList block_ranges = {0};
|
||||
UI_ScrollListRowBlockArray row_blocks = {0};
|
||||
Vec2S64 cursor_tbl = {0};
|
||||
Vec2S64 mark_tbl = {0};
|
||||
@@ -1081,8 +1081,8 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
MemoryZeroStruct(&block_tree);
|
||||
MemoryZeroStruct(&block_ranges);
|
||||
ev_key_set_expansion(eval_view, ev_key_root(), ev_key_make(ev_hash_from_key(ev_key_root()), 1), 1);
|
||||
block_tree = ev2_block_tree_from_string(scratch.arena, eval_view, filter, root_expr, top_level_view_rules);
|
||||
block_ranges = ev2_block_range_list_from_tree(scratch.arena, &block_tree);
|
||||
block_tree = ev_block_tree_from_string(scratch.arena, eval_view, filter, root_expr, top_level_view_rules);
|
||||
block_ranges = ev_block_range_list_from_tree(scratch.arena, &block_tree);
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
@@ -1090,7 +1090,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
//
|
||||
{
|
||||
UI_ScrollListRowBlockChunkList row_block_chunks = {0};
|
||||
for(EV2_BlockRangeNode *n = block_ranges.first; n != 0; n = n->next)
|
||||
for(EV_BlockRangeNode *n = block_ranges.first; n != 0; n = n->next)
|
||||
{
|
||||
UI_ScrollListRowBlock block = {0};
|
||||
block.row_count = dim_1u64(n->v.range);
|
||||
@@ -1245,9 +1245,9 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
ewv->text_edit_state_slots_count = u64_up_to_pow2(selection_dim.y+1);
|
||||
ewv->text_edit_state_slots_count = Max(ewv->text_edit_state_slots_count, 64);
|
||||
ewv->text_edit_state_slots = push_array(ewv->text_edit_arena, RD_WatchViewTextEditState*, ewv->text_edit_state_slots_count);
|
||||
EV2_WindowedRowList rows = ev2_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y)+1));
|
||||
EV2_Row *row = rows.first;
|
||||
EV_WindowedRowList rows = ev_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y)+1));
|
||||
EV_Row *row = rows.first;
|
||||
for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y; y += 1, row = row->next)
|
||||
{
|
||||
for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1)
|
||||
@@ -1276,12 +1276,12 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
//
|
||||
if(!ewv->text_editing && evt->slot == UI_EventActionSlot_Accept)
|
||||
{
|
||||
EV2_WindowedRowList rows = ev2_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y)+1));
|
||||
EV2_Row *row = rows.first;
|
||||
EV_WindowedRowList rows = ev_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y)+1));
|
||||
EV_Row *row = rows.first;
|
||||
for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y && row != 0; y += 1, row = row->next)
|
||||
{
|
||||
if(selection_tbl.min.x <= 0 && ev2_row_is_expandable(row))
|
||||
if(selection_tbl.min.x <= 0 && ev_row_is_expandable(row))
|
||||
{
|
||||
B32 is_expanded = ev_expansion_from_key(eval_view, row->key);
|
||||
ev_key_set_expansion(eval_view, row->block->key, row->key, !is_expanded);
|
||||
@@ -1457,8 +1457,8 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
case RD_WatchViewColumnKind_Value:
|
||||
if(editing_complete && evt->slot != UI_EventActionSlot_Cancel)
|
||||
{
|
||||
EV2_WindowedRowList rows = ev2_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, y)+1));
|
||||
EV_WindowedRowList rows = ev_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, y)+1));
|
||||
B32 success = 0;
|
||||
if(rows.first != 0)
|
||||
{
|
||||
@@ -1537,9 +1537,9 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
{
|
||||
taken = 1;
|
||||
String8List strs = {0};
|
||||
EV2_WindowedRowList rows = ev2_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y)+1));
|
||||
EV2_Row *row = rows.first;
|
||||
EV_WindowedRowList rows = ev_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y),
|
||||
ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y)+1));
|
||||
EV_Row *row = rows.first;
|
||||
for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y && row != 0; y += 1, row = row->next)
|
||||
{
|
||||
for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1)
|
||||
@@ -1788,35 +1788,35 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
if(filter.size == 0)
|
||||
{
|
||||
// rjf: determine blocks of each endpoint of the table selection
|
||||
EV2_Block *selection_endpoint_blocks[2] =
|
||||
EV_Block *selection_endpoint_blocks[2] =
|
||||
{
|
||||
ev2_block_range_from_num(&block_ranges, selection_tbl.min.y).block,
|
||||
ev2_block_range_from_num(&block_ranges, selection_tbl.max.y).block,
|
||||
ev_block_range_from_num(&block_ranges, selection_tbl.min.y).block,
|
||||
ev_block_range_from_num(&block_ranges, selection_tbl.max.y).block,
|
||||
};
|
||||
|
||||
// rjf: pick shallowest block within which we can do reordering
|
||||
U64 selection_depths[2] =
|
||||
{
|
||||
ev2_depth_from_block(selection_endpoint_blocks[0]),
|
||||
ev2_depth_from_block(selection_endpoint_blocks[1]),
|
||||
ev_depth_from_block(selection_endpoint_blocks[0]),
|
||||
ev_depth_from_block(selection_endpoint_blocks[1]),
|
||||
};
|
||||
EV2_Block *selection_block = (selection_depths[1] < selection_depths[0]
|
||||
? selection_endpoint_blocks[1]
|
||||
: selection_endpoint_blocks[0]);
|
||||
EV_Block *selection_block = (selection_depths[1] < selection_depths[0]
|
||||
? selection_endpoint_blocks[1]
|
||||
: selection_endpoint_blocks[0]);
|
||||
|
||||
// rjf: find selection keys within the block in which we are doing reordering
|
||||
EV_Key selection_keys_in_block[2] = {0};
|
||||
{
|
||||
for EachElement(idx, selection_endpoint_blocks)
|
||||
{
|
||||
EV2_Block *endpoint_block = selection_endpoint_blocks[idx];
|
||||
EV_Block *endpoint_block = selection_endpoint_blocks[idx];
|
||||
if(endpoint_block == selection_block)
|
||||
{
|
||||
selection_keys_in_block[idx] = ev2_key_from_num(&block_ranges, selection_tbl.v[idx].y);
|
||||
selection_keys_in_block[idx] = ev_key_from_num(&block_ranges, selection_tbl.v[idx].y);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(;endpoint_block->parent != selection_block && endpoint_block != &ev2_nil_block;)
|
||||
for(;endpoint_block->parent != selection_block && endpoint_block != &ev_nil_block;)
|
||||
{
|
||||
endpoint_block = endpoint_block->parent;
|
||||
}
|
||||
@@ -1981,9 +1981,9 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
////////////////////////////
|
||||
//- rjf: viz blocks -> rows
|
||||
//
|
||||
EV2_WindowedRowList rows = {0};
|
||||
EV_WindowedRowList rows = {0};
|
||||
{
|
||||
rows = ev2_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(visible_row_rng.min, visible_row_rng.max+1));
|
||||
rows = ev_windowed_row_list_from_block_range_list(scratch.arena, eval_view, filter, &block_ranges, r1u64(visible_row_rng.min, visible_row_rng.max+1));
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
@@ -1992,13 +1992,13 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
ProfScope("build table")
|
||||
{
|
||||
U64 global_row_idx = rows.count_before_semantic;
|
||||
for(EV2_Row *row = rows.first; row != 0; row = row->next, global_row_idx += 1)
|
||||
for(EV_Row *row = rows.first; row != 0; row = row->next, global_row_idx += 1)
|
||||
{
|
||||
////////////////////////
|
||||
//- rjf: unpack row info
|
||||
//
|
||||
U64 row_hash = ev_hash_from_key(row->key);
|
||||
U64 row_depth = ev2_depth_from_block(row->block);
|
||||
U64 row_depth = ev_depth_from_block(row->block);
|
||||
if(row_depth > 0)
|
||||
{
|
||||
row_depth -= 1;
|
||||
@@ -2007,8 +2007,8 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
B32 row_expanded = ev_expansion_from_key(eval_view, row->key);
|
||||
E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr);
|
||||
E_Type *row_type = e_type_from_key(scratch.arena, row_eval.type_key);
|
||||
B32 row_is_expandable = ev2_row_is_expandable(row);
|
||||
B32 row_is_editable = ev2_row_is_editable(row);
|
||||
B32 row_is_expandable = ev_row_is_expandable(row);
|
||||
B32 row_is_editable = ev_row_is_editable(row);
|
||||
B32 next_row_expanded = row_expanded;
|
||||
RD_ViewRuleInfo *ui_view_rule_info = rd_view_rule_info_from_string(row->block->expand_view_rule_info->string);
|
||||
MD_Node *ui_view_rule_params_root = row->block->expand_view_rule_params;
|
||||
@@ -2361,7 +2361,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
cell_can_edit = (row_depth == 0 && modifiable && filter.size == 0);
|
||||
if(filter.size != 0)
|
||||
{
|
||||
cell_matches = fuzzy_match_find(scratch.arena, filter, ev2_expr_string_from_row(scratch.arena, row, string_flags));
|
||||
cell_matches = fuzzy_match_find(scratch.arena, filter, ev_expr_string_from_row(scratch.arena, row, string_flags));
|
||||
}
|
||||
cell_autocomp_flags = (RD_AutoCompListerFlag_Locals|
|
||||
RD_AutoCompListerFlag_Procedures|
|
||||
@@ -2659,7 +2659,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
if(DEV_eval_compiler_tooltips && x == 0 && ui_hovering(sig)) UI_Tooltip RD_Font(RD_FontSlot_Code)
|
||||
{
|
||||
local_persist char *spaces = " ";
|
||||
String8 string = ev2_expr_string_from_row(scratch.arena, row, 0);
|
||||
String8 string = ev_expr_string_from_row(scratch.arena, row, 0);
|
||||
E_TokenArray tokens = e_token_array_from_text(scratch.arena, string);
|
||||
E_Parse parse = e_parse_expr_from_text_tokens(scratch.arena, string, &tokens);
|
||||
E_IRTreeAndType irtree = e_irtree_and_type_from_expr(scratch.arena, parse.expr);
|
||||
@@ -5534,19 +5534,6 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(pending_file)
|
||||
////////////////////////////////
|
||||
//~ rjf: text @view_hook_impl
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(text)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 8);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(text)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
@@ -5784,19 +5771,6 @@ struct RD_DisasmViewState
|
||||
RD_CodeViewState cv;
|
||||
};
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(disasm)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 8);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(disasm)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
@@ -6082,19 +6056,6 @@ struct RD_MemoryViewState
|
||||
B32 contain_cursor;
|
||||
};
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(memory)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 16);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(memory)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
@@ -6895,19 +6856,6 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(memory)
|
||||
////////////////////////////////
|
||||
//~ rjf: "graph"
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(graph)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 8);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(graph)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
@@ -7000,19 +6948,6 @@ internal UI_BOX_CUSTOM_DRAW(rd_bitmap_view_canvas_box_draw)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(bitmap)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 8);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(bitmap)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
@@ -7261,19 +7196,6 @@ rd_rgba_from_eval_params(E_Eval eval, MD_Node *params)
|
||||
return rgba;
|
||||
}
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(color_rgba)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 8);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(color_rgba)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
@@ -7435,19 +7357,6 @@ internal UI_BOX_CUSTOM_DRAW(rd_geo3d_box_draw)
|
||||
dr_mesh(draw_data->vertex_buffer, draw_data->index_buffer, R_GeoTopologyKind_Triangles, R_GeoVertexFlag_TexCoord|R_GeoVertexFlag_Normals|R_GeoVertexFlag_RGB, r_handle_zero(), mat_4x4f32(1.f));
|
||||
}
|
||||
|
||||
#if 0 // TODO(rjf): @blocks
|
||||
EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(geo3d)
|
||||
{
|
||||
EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth);
|
||||
vb->string = string;
|
||||
vb->expr = expr;
|
||||
vb->visual_idx_range = r1u64(0, 16);
|
||||
vb->semantic_idx_range = r1u64(0, 1);
|
||||
vb->view_rules = view_rules;
|
||||
ev_block_end(out, vb);
|
||||
}
|
||||
#endif
|
||||
|
||||
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(geo3d)
|
||||
{
|
||||
EV_ExpandInfo info = {0};
|
||||
|
||||
@@ -104,7 +104,7 @@ struct RD_WatchViewPoint
|
||||
typedef struct RD_WatchViewCollectionInfo RD_WatchViewCollectionInfo;
|
||||
struct RD_WatchViewCollectionInfo
|
||||
{
|
||||
EV2_Block *block;
|
||||
EV_Block *block;
|
||||
EV_Key key;
|
||||
RD_EntityKind kind;
|
||||
RD_Entity *entity;
|
||||
@@ -163,14 +163,14 @@ internal RD_WatchViewColumn *rd_watch_view_column_from_x(RD_WatchViewState *wv,
|
||||
|
||||
//- rjf: watch view points <-> table coordinates
|
||||
internal B32 rd_watch_view_point_match(RD_WatchViewPoint a, RD_WatchViewPoint b);
|
||||
internal RD_WatchViewPoint rd_watch_view_point_from_tbl(EV2_BlockRangeList *block_ranges, Vec2S64 tbl);
|
||||
internal Vec2S64 rd_tbl_from_watch_view_point(EV2_BlockRangeList *block_ranges, RD_WatchViewPoint pt);
|
||||
internal RD_WatchViewPoint rd_watch_view_point_from_tbl(EV_BlockRangeList *block_ranges, Vec2S64 tbl);
|
||||
internal Vec2S64 rd_tbl_from_watch_view_point(EV_BlockRangeList *block_ranges, RD_WatchViewPoint pt);
|
||||
|
||||
//- rjf: table coordinates -> entities in collectons
|
||||
internal RD_WatchViewCollectionInfo rd_collection_info_from_num(EV2_BlockRangeList *block_ranges, S64 num);
|
||||
internal RD_WatchViewCollectionInfo rd_collection_info_from_num(EV_BlockRangeList *block_ranges, S64 num);
|
||||
|
||||
//- rjf: row/column -> strings
|
||||
internal String8 rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV2_Row *row, RD_WatchViewColumn *col, EV_StringFlags string_flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px);
|
||||
internal String8 rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, RD_WatchViewColumn *col, EV_StringFlags string_flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px);
|
||||
|
||||
//- rjf: table coordinates -> text edit state
|
||||
internal RD_WatchViewTextEditState *rd_watch_view_text_edit_state_from_pt(RD_WatchViewState *wv, RD_WatchViewPoint pt);
|
||||
|
||||
Reference in New Issue
Block a user