mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-12 23:31:38 -07:00
only and omit; notes & dead code deletion
This commit is contained in:
+2
-2
@@ -48,8 +48,8 @@ commands =
|
||||
//- rjf: [raddbg]
|
||||
.f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
//- rjf: [eval_scratch]
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build no_meta eval_scratch && raddbg_stable --ipc bring_to_front && raddbg_stable --ipc run", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
//- rjf: [textperf]
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build no_meta telemetry textperf && raddbg_stable --ipc bring_to_front && raddbg_stable --ipc run", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
//- rjf: [tester]
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build no_meta tester", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
+10
-8
@@ -297,14 +297,16 @@ E_MemberKind;
|
||||
typedef U32 E_TypeFlags;
|
||||
enum
|
||||
{
|
||||
E_TypeFlag_Const = (1<<0),
|
||||
E_TypeFlag_Volatile = (1<<1),
|
||||
E_TypeFlag_IsPlainText = (1<<2),
|
||||
E_TypeFlag_IsCodeText = (1<<3),
|
||||
E_TypeFlag_IsPathText = (1<<4),
|
||||
E_TypeFlag_IsNotText = (1<<5),
|
||||
E_TypeFlag_EditableChildren = (1<<6),
|
||||
E_TypeFlag_InheritedOnAccess = (1<<7),
|
||||
E_TypeFlag_Const = (1<<0),
|
||||
E_TypeFlag_Volatile = (1<<1),
|
||||
E_TypeFlag_IsPlainText = (1<<2),
|
||||
E_TypeFlag_IsCodeText = (1<<3),
|
||||
E_TypeFlag_IsPathText = (1<<4),
|
||||
E_TypeFlag_IsNotText = (1<<5),
|
||||
E_TypeFlag_EditableChildren = (1<<6),
|
||||
E_TypeFlag_InheritedByMembers = (1<<7),
|
||||
E_TypeFlag_InheritedByElements = (1<<8),
|
||||
E_TypeFlag_ArrayLikeExpansion = (1<<9),
|
||||
};
|
||||
|
||||
typedef struct E_Member E_Member;
|
||||
|
||||
+3
-177
@@ -103,181 +103,6 @@ e_select_ir_ctx(E_IRCtx *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Member Filtering Lookup Rules
|
||||
|
||||
#if 0 // TODO(rjf): @eval
|
||||
typedef struct E_MemberFilterAccel E_MemberFilterAccel;
|
||||
struct E_MemberFilterAccel
|
||||
{
|
||||
E_MemberArray members;
|
||||
};
|
||||
|
||||
E_LOOKUP_INFO_FUNCTION_DEF(only)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_LookupInfo lookup_info = {0};
|
||||
{
|
||||
//- rjf: extract struct type
|
||||
E_TypeKey struct_type_key = zero_struct;
|
||||
{
|
||||
E_TypeKey lhs_type_key = e_type_unwrap(lhs->type_key);
|
||||
E_TypeKind lhs_type_kind = e_type_kind_from_key(lhs_type_key);
|
||||
if(e_type_kind_is_pointer_or_ref(lhs_type_kind))
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(lhs_type_key);
|
||||
if(type->count == 1)
|
||||
{
|
||||
E_TypeKey direct_type_key = e_type_unwrap(e_type_direct_from_key(lhs->type_key));
|
||||
E_TypeKind direct_type_kind = e_type_kind_from_key(direct_type_key);
|
||||
if(direct_type_kind == E_TypeKind_Struct ||
|
||||
direct_type_kind == E_TypeKind_Class ||
|
||||
direct_type_kind == E_TypeKind_Union)
|
||||
{
|
||||
struct_type_key = direct_type_key;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lhs_type_kind == E_TypeKind_Struct ||
|
||||
lhs_type_kind == E_TypeKind_Class ||
|
||||
lhs_type_kind == E_TypeKind_Union)
|
||||
{
|
||||
struct_type_key = lhs_type_key;
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: not struct -> fall back on default
|
||||
if(e_type_key_match(struct_type_key, e_type_key_zero()))
|
||||
{
|
||||
lookup_info = E_LOOKUP_INFO_FUNCTION_NAME(default)(arena, lhs, tag, filter);
|
||||
}
|
||||
|
||||
//- struct -> filter
|
||||
else
|
||||
{
|
||||
E_MemberArray data_members = e_type_data_members_from_key__cached(struct_type_key);
|
||||
E_MemberList data_members_list__filtered = {0};
|
||||
for EachIndex(idx, data_members.count)
|
||||
{
|
||||
B32 fits_filter = 0;
|
||||
for(E_Expr *name = tag->first->next; name != &e_expr_nil; name = name->next)
|
||||
{
|
||||
if(str8_match(name->string, data_members.v[idx].name, 0))
|
||||
{
|
||||
fits_filter = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(fits_filter)
|
||||
{
|
||||
e_member_list_push(scratch.arena, &data_members_list__filtered, &data_members.v[idx]);
|
||||
}
|
||||
}
|
||||
E_MemberFilterAccel *accel = push_array(arena, E_MemberFilterAccel, 1);
|
||||
accel->members = e_member_array_from_list(arena, &data_members_list__filtered);
|
||||
lookup_info.user_data = accel;
|
||||
lookup_info.named_expr_count = accel->members.count;
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return lookup_info;
|
||||
}
|
||||
|
||||
E_LOOKUP_INFO_FUNCTION_DEF(omit)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_LookupInfo lookup_info = {0};
|
||||
{
|
||||
//- rjf: extract struct type
|
||||
E_TypeKey struct_type_key = zero_struct;
|
||||
{
|
||||
E_TypeKey lhs_type_key = e_type_unwrap(lhs->type_key);
|
||||
E_TypeKind lhs_type_kind = e_type_kind_from_key(lhs_type_key);
|
||||
if(e_type_kind_is_pointer_or_ref(lhs_type_kind))
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(lhs_type_key);
|
||||
if(type->count == 1)
|
||||
{
|
||||
E_TypeKey direct_type_key = e_type_unwrap(e_type_direct_from_key(lhs->type_key));
|
||||
E_TypeKind direct_type_kind = e_type_kind_from_key(direct_type_key);
|
||||
if(direct_type_kind == E_TypeKind_Struct ||
|
||||
direct_type_kind == E_TypeKind_Class ||
|
||||
direct_type_kind == E_TypeKind_Union)
|
||||
{
|
||||
struct_type_key = direct_type_key;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lhs_type_kind == E_TypeKind_Struct ||
|
||||
lhs_type_kind == E_TypeKind_Class ||
|
||||
lhs_type_kind == E_TypeKind_Union)
|
||||
{
|
||||
struct_type_key = lhs_type_key;
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: not struct -> fall back on default
|
||||
if(e_type_key_match(struct_type_key, e_type_key_zero()))
|
||||
{
|
||||
lookup_info = E_LOOKUP_INFO_FUNCTION_NAME(default)(arena, lhs, tag, filter);
|
||||
}
|
||||
|
||||
//- struct -> filter
|
||||
else
|
||||
{
|
||||
E_MemberArray data_members = e_type_data_members_from_key__cached(struct_type_key);
|
||||
E_MemberList data_members_list__filtered = {0};
|
||||
for EachIndex(idx, data_members.count)
|
||||
{
|
||||
B32 fits_filter = 1;
|
||||
for(E_Expr *name = tag->first->next; name != &e_expr_nil; name = name->next)
|
||||
{
|
||||
if(str8_match(name->string, data_members.v[idx].name, 0))
|
||||
{
|
||||
fits_filter = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(fits_filter)
|
||||
{
|
||||
e_member_list_push(scratch.arena, &data_members_list__filtered, &data_members.v[idx]);
|
||||
}
|
||||
}
|
||||
E_MemberFilterAccel *accel = push_array(arena, E_MemberFilterAccel, 1);
|
||||
accel->members = e_member_array_from_list(arena, &data_members_list__filtered);
|
||||
lookup_info.user_data = accel;
|
||||
lookup_info.named_expr_count = accel->members.count;
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return lookup_info;
|
||||
}
|
||||
|
||||
E_LOOKUP_RANGE_FUNCTION_DEF(only_and_omit)
|
||||
{
|
||||
if(user_data == 0)
|
||||
{
|
||||
E_LOOKUP_RANGE_FUNCTION_NAME(default)(arena, lhs, tag, filter, idx_range, exprs, exprs_strings, user_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_IRTreeAndType lhs_irtree = e_irtree_and_type_from_expr(scratch.arena, lhs);
|
||||
E_MemberFilterAccel *accel = (E_MemberFilterAccel *)user_data;
|
||||
Rng1U64 legal_idx_range = r1u64(0, accel->members.count);
|
||||
Rng1U64 read_range = intersect_1u64(legal_idx_range, idx_range);
|
||||
U64 read_range_count = dim_1u64(read_range);
|
||||
for(U64 idx = 0; idx < read_range_count; idx += 1)
|
||||
{
|
||||
U64 member_idx = idx + read_range.min;
|
||||
String8 member_name = accel->members.v[member_idx].name;
|
||||
exprs[idx] = e_expr_irext_member_access(arena, lhs, &lhs_irtree, member_name);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Auto Hooks
|
||||
|
||||
@@ -1122,7 +947,8 @@ e_irtree_and_type_from_expr(Arena *arena, E_Expr *root_expr)
|
||||
for(;kind == E_TypeKind_Lens;)
|
||||
{
|
||||
E_Type *lens_type = e_type_from_key__cached(k);
|
||||
if(lens_type->flags & E_TypeFlag_InheritedOnAccess)
|
||||
if((lens_type->flags & E_TypeFlag_InheritedByMembers && expr->kind == E_ExprKind_MemberAccess) ||
|
||||
(lens_type->flags & E_TypeFlag_InheritedByElements && expr->kind == E_ExprKind_ArrayIndex))
|
||||
{
|
||||
e_type_key_list_push_front(scratch.arena, &inherited_lenses, k);
|
||||
}
|
||||
@@ -2407,7 +2233,7 @@ e_irtree_and_type_from_expr(Arena *arena, E_Expr *root_expr)
|
||||
}
|
||||
|
||||
//- rjf: find any auto hooks according to this generation's type
|
||||
if(allow_autohooks)
|
||||
if(allow_autohooks && result.mode != E_Mode_Null)
|
||||
{
|
||||
E_ExprList exprs = e_auto_hook_exprs_from_type_key__cached(result.type_key);
|
||||
for(E_ExprNode *n = exprs.first; n != 0; n = n->next)
|
||||
|
||||
@@ -2495,6 +2495,115 @@ E_TYPE_EXPAND_RANGE_FUNCTION_DEF(slice)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `only`, `omit` lenses
|
||||
|
||||
typedef struct E_MemberFilterAccel E_MemberFilterAccel;
|
||||
struct E_MemberFilterAccel
|
||||
{
|
||||
E_MemberArray members;
|
||||
};
|
||||
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(only_and_omit)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_TypeExpandInfo info = {0};
|
||||
{
|
||||
//- rjf: extract struct type
|
||||
E_TypeKey struct_type_key = zero_struct;
|
||||
{
|
||||
E_TypeKey lhs_type_key = e_type_unwrap(irtree->type_key);
|
||||
E_TypeKind lhs_type_kind = e_type_kind_from_key(lhs_type_key);
|
||||
if(e_type_kind_is_pointer_or_ref(lhs_type_kind))
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(lhs_type_key);
|
||||
if(type->count == 1)
|
||||
{
|
||||
E_TypeKey direct_type_key = e_type_unwrap(e_type_direct_from_key(irtree->type_key));
|
||||
E_TypeKind direct_type_kind = e_type_kind_from_key(direct_type_key);
|
||||
if(direct_type_kind == E_TypeKind_Struct ||
|
||||
direct_type_kind == E_TypeKind_Class ||
|
||||
direct_type_kind == E_TypeKind_Union)
|
||||
{
|
||||
struct_type_key = direct_type_key;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lhs_type_kind == E_TypeKind_Struct ||
|
||||
lhs_type_kind == E_TypeKind_Class ||
|
||||
lhs_type_kind == E_TypeKind_Union)
|
||||
{
|
||||
struct_type_key = lhs_type_key;
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: not struct -> fall back on default
|
||||
if(e_type_key_match(struct_type_key, e_type_key_zero()))
|
||||
{
|
||||
info = E_TYPE_EXPAND_INFO_FUNCTION_NAME(default)(arena, expr, irtree, filter);
|
||||
}
|
||||
|
||||
//- struct -> filter
|
||||
else
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(irtree->type_key);
|
||||
E_MemberArray data_members = e_type_data_members_from_key__cached(struct_type_key);
|
||||
E_MemberList data_members_list__filtered = {0};
|
||||
if(type->args != 0)
|
||||
{
|
||||
B32 default_fits_filter = (str8_match(type->name, str8_lit("only"), 0) ? 0 : 1);
|
||||
for EachIndex(idx, data_members.count)
|
||||
{
|
||||
B32 fits_filter = default_fits_filter;
|
||||
for EachIndex(arg_idx, type->count)
|
||||
{
|
||||
E_Expr *arg = type->args[arg_idx];
|
||||
if(str8_match(arg->string, data_members.v[idx].name, 0))
|
||||
{
|
||||
fits_filter = !default_fits_filter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(fits_filter)
|
||||
{
|
||||
e_member_list_push(scratch.arena, &data_members_list__filtered, &data_members.v[idx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
E_MemberFilterAccel *accel = push_array(arena, E_MemberFilterAccel, 1);
|
||||
accel->members = e_member_array_from_list(arena, &data_members_list__filtered);
|
||||
info.user_data = accel;
|
||||
info.expr_count = accel->members.count;
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return info;
|
||||
}
|
||||
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_DEF(only_and_omit)
|
||||
{
|
||||
if(user_data == 0)
|
||||
{
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_NAME(default)(arena, user_data, expr, irtree, filter, idx_range, exprs_out, exprs_strings_out);
|
||||
}
|
||||
else
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
E_MemberFilterAccel *accel = (E_MemberFilterAccel *)user_data;
|
||||
Rng1U64 legal_idx_range = r1u64(0, accel->members.count);
|
||||
Rng1U64 read_range = intersect_1u64(legal_idx_range, idx_range);
|
||||
U64 read_range_count = dim_1u64(read_range);
|
||||
for(U64 idx = 0; idx < read_range_count; idx += 1)
|
||||
{
|
||||
U64 member_idx = idx + read_range.min;
|
||||
String8 member_name = accel->members.v[member_idx].name;
|
||||
exprs_out[idx] = e_expr_irext_member_access(arena, expr, irtree, member_name);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `folder` type
|
||||
|
||||
|
||||
@@ -298,6 +298,12 @@ E_TYPE_IREXT_FUNCTION_DEF(slice);
|
||||
E_TYPE_ACCESS_FUNCTION_DEF(slice);
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(slice);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `only`, `omit` lenses
|
||||
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(only_and_omit);
|
||||
E_TYPE_EXPAND_RANGE_FUNCTION_DEF(only_and_omit);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: (Built-In Type Hooks) `folder` type
|
||||
|
||||
|
||||
@@ -1548,8 +1548,12 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
|
||||
{
|
||||
if(it->top_task->redirect_to_sets_and_structs)
|
||||
{
|
||||
expansion_opener_symbol = str8_lit("[");
|
||||
expansion_closer_symbol = str8_lit("]");
|
||||
E_Type *type = e_type_from_key__cached(type_key);
|
||||
if(type->flags & E_TypeFlag_ArrayLikeExpansion)
|
||||
{
|
||||
expansion_opener_symbol = str8_lit("[");
|
||||
expansion_closer_symbol = str8_lit("]");
|
||||
}
|
||||
goto arrays_and_sets_and_structs;
|
||||
}
|
||||
E_Type *type = e_type_from_key__cached(type_key);
|
||||
@@ -1677,7 +1681,7 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
|
||||
ptr_data->value_eval = e_value_eval_from_eval(eval);
|
||||
ptr_data->type = e_type_from_key__cached(type_key);
|
||||
ptr_data->direct_type = e_type_from_key__cached(e_type_unwrap(e_type_direct_from_key(e_type_unwrap(type_key))));
|
||||
ptr_data->ptee_has_content = (ptr_data->direct_type->kind != E_TypeKind_Null && ptr_data->direct_type->kind != E_TypeKind_Void);
|
||||
ptr_data->ptee_has_content = (ptr_data->value_eval.value.u64 != 0 && ptr_data->direct_type->kind != E_TypeKind_Null && ptr_data->direct_type->kind != E_TypeKind_Void);
|
||||
ptr_data->ptee_has_string = ((E_TypeKind_Char8 <= ptr_data->direct_type->kind && ptr_data->direct_type->kind <= E_TypeKind_UChar32) ||
|
||||
ptr_data->direct_type->kind == E_TypeKind_S8 ||
|
||||
ptr_data->direct_type->kind == E_TypeKind_U8);
|
||||
|
||||
+30
-18
@@ -12241,7 +12241,9 @@ rd_frame(void)
|
||||
struct
|
||||
{
|
||||
String8 name;
|
||||
B32 inherited;
|
||||
B32 inherited_by_members;
|
||||
B32 inherited_by_elements;
|
||||
B32 array_like;
|
||||
E_TypeIRExtFunctionType *irext;
|
||||
E_TypeAccessFunctionType *access;
|
||||
E_TypeExpandRule expand;
|
||||
@@ -12250,21 +12252,23 @@ rd_frame(void)
|
||||
}
|
||||
lens_table[] =
|
||||
{
|
||||
{str8_lit("bin"), 1, 0, 0, {0}},
|
||||
{str8_lit("oct"), 1, 0, 0, {0}},
|
||||
{str8_lit("dec"), 1, 0, 0, {0}},
|
||||
{str8_lit("hex"), 1, 0, 0, {0}},
|
||||
{str8_lit("digits"), 1, 0, 0, {0}},
|
||||
{str8_lit("no_string"), 1, 0, 0, {0}},
|
||||
{str8_lit("no_addr"), 1, 0, 0, {0}},
|
||||
{str8_lit("slice"), 0, E_TYPE_IREXT_FUNCTION_NAME(slice), E_TYPE_ACCESS_FUNCTION_NAME(slice), {E_TYPE_EXPAND_INFO_FUNCTION_NAME(slice), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(slice)}},
|
||||
{str8_lit("text"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(text), EV_EXPAND_RULE_INFO_FUNCTION_NAME(text)},
|
||||
{str8_lit("disasm"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(disasm), EV_EXPAND_RULE_INFO_FUNCTION_NAME(disasm)},
|
||||
{str8_lit("memory"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(memory), EV_EXPAND_RULE_INFO_FUNCTION_NAME(memory)},
|
||||
{str8_lit("bitmap"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(bitmap), EV_EXPAND_RULE_INFO_FUNCTION_NAME(bitmap)},
|
||||
{str8_lit("checkbox"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(checkbox), 0},
|
||||
{str8_lit("color_rgba"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(color_rgba), EV_EXPAND_RULE_INFO_FUNCTION_NAME(color_rgba)},
|
||||
{str8_lit("geo3d"), 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(geo3d), EV_EXPAND_RULE_INFO_FUNCTION_NAME(geo3d)},
|
||||
{str8_lit("bin"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("oct"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("dec"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("hex"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("digits"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("no_string"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("no_addr"), 1, 1, 0, 0, 0, {0}},
|
||||
{str8_lit("slice"), 0, 0, 1, E_TYPE_IREXT_FUNCTION_NAME(slice), E_TYPE_ACCESS_FUNCTION_NAME(slice), {E_TYPE_EXPAND_INFO_FUNCTION_NAME(slice), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(slice)}},
|
||||
{str8_lit("only"), 0, 1, 0, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(only_and_omit), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(only_and_omit)}},
|
||||
{str8_lit("omit"), 0, 1, 0, 0, 0, {E_TYPE_EXPAND_INFO_FUNCTION_NAME(only_and_omit), E_TYPE_EXPAND_RANGE_FUNCTION_NAME(only_and_omit)}},
|
||||
{str8_lit("text"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(text), EV_EXPAND_RULE_INFO_FUNCTION_NAME(text)},
|
||||
{str8_lit("disasm"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(disasm), EV_EXPAND_RULE_INFO_FUNCTION_NAME(disasm)},
|
||||
{str8_lit("memory"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(memory), EV_EXPAND_RULE_INFO_FUNCTION_NAME(memory)},
|
||||
{str8_lit("bitmap"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(bitmap), EV_EXPAND_RULE_INFO_FUNCTION_NAME(bitmap)},
|
||||
{str8_lit("checkbox"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(checkbox), 0},
|
||||
{str8_lit("color_rgba"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(color_rgba), EV_EXPAND_RULE_INFO_FUNCTION_NAME(color_rgba)},
|
||||
{str8_lit("geo3d"), 0, 0, 0, 0, 0, {0}, RD_VIEW_UI_FUNCTION_NAME(geo3d), EV_EXPAND_RULE_INFO_FUNCTION_NAME(geo3d)},
|
||||
};
|
||||
|
||||
//- rjf: fill lenses in ev expand rule map, rd view ui rule map
|
||||
@@ -12289,9 +12293,17 @@ rd_frame(void)
|
||||
for EachElement(idx, lens_table)
|
||||
{
|
||||
E_TypeFlags type_flags = 0;
|
||||
if(lens_table[idx].inherited)
|
||||
if(lens_table[idx].inherited_by_members)
|
||||
{
|
||||
type_flags |= E_TypeFlag_InheritedOnAccess;
|
||||
type_flags |= E_TypeFlag_InheritedByMembers;
|
||||
}
|
||||
if(lens_table[idx].inherited_by_elements)
|
||||
{
|
||||
type_flags |= E_TypeFlag_InheritedByElements;
|
||||
}
|
||||
if(lens_table[idx].array_like)
|
||||
{
|
||||
type_flags |= E_TypeFlag_ArrayLikeExpansion;
|
||||
}
|
||||
E_Expr *expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, 0);
|
||||
expr->type_key = e_type_key_cons(.kind = E_TypeKind_LensSpec,
|
||||
|
||||
+13
-12
@@ -92,15 +92,6 @@
|
||||
////////////////////////////////
|
||||
//~ rjf: feature cleanup, code dedup, code elimination pass:
|
||||
//
|
||||
// [ ] 'view rules' need to be rephrased as "function" calls in the expression language
|
||||
// [ ] need a formalization which takes unknown identifiers which are called, and tries
|
||||
// to use that to apply a IR-generation rule, which is keyed by that unknown
|
||||
// identifier
|
||||
// [ ] we need to select expressions as "parents" when possible, so that when using an
|
||||
// auto-view-rule (or similar context), leaf identifiers referring to e.g. members
|
||||
// of an expression's type resolve correctly (e.g. bitmap(base, width, height) being
|
||||
// used as a shorthand for bitmap(foo.base, foo.width, foo.height) when evaluating
|
||||
// foo).
|
||||
// [ ] *ALL* expressions in watch windows need to be editable.
|
||||
//
|
||||
// [ ] config hot-reloading, using cfg wins
|
||||
@@ -111,7 +102,6 @@
|
||||
// right-clicking a tab should be equivalent to spawning a command lister,
|
||||
// but only with commands that are directly
|
||||
//
|
||||
// [ ] r8 bitmap view rule seems incorrect?
|
||||
// [ ] crash bug, release mode - filter globals view (try with debugging raddbg, typing `dev` in globals view)
|
||||
//
|
||||
// [ ] stepping-onto a line with a conditional breakpoint, which fails, causes a
|
||||
@@ -121,6 +111,7 @@
|
||||
//
|
||||
// [ ] if a breakpoint matches the entry point's starting address, its hit count
|
||||
// is not correctly incremented.
|
||||
// [ ] odin's demo is busted - need to revert PDB conversion type index changes.
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: post-0.9.12 TODO notes
|
||||
@@ -133,8 +124,6 @@
|
||||
// [ ] fix light themes
|
||||
// [ ] make `array` view rule work with actual array types, to change their
|
||||
// size dynamically
|
||||
// [ ] single-line visualization busted with auto-view-rules applied, it seems...
|
||||
// not showing member variables, just commas, check w/ mohit
|
||||
// [ ] disasm starting address - need to use debug info for more correct
|
||||
// results...
|
||||
// [ ] linked list view rule
|
||||
@@ -382,6 +371,18 @@
|
||||
// menu, but you can't actually see it because the tooltip for the thread
|
||||
// draws on top of it, so you can't see the menu.
|
||||
// [x] double-click vs. single-click for folder navigation, see if we can infer
|
||||
// [x] 'view rules' need to be rephrased as "function" calls in the expression language
|
||||
// [x] need a formalization which takes unknown identifiers which are called, and tries
|
||||
// to use that to apply a IR-generation rule, which is keyed by that unknown
|
||||
// identifier
|
||||
// [x] we need to select expressions as "parents" when possible, so that when using an
|
||||
// auto-view-rule (or similar context), leaf identifiers referring to e.g. members
|
||||
// of an expression's type resolve correctly (e.g. bitmap(base, width, height) being
|
||||
// used as a shorthand for bitmap(foo.base, foo.width, foo.height) when evaluating
|
||||
// foo).
|
||||
// [x] single-line visualization busted with auto-view-rules applied, it seems...
|
||||
// not showing member variables, just commas, check w/ mohit
|
||||
// [x] r8 bitmap view rule seems incorrect?
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Build Options
|
||||
|
||||
@@ -51,7 +51,7 @@ frame(void)
|
||||
}
|
||||
}
|
||||
r_begin_frame();
|
||||
dr_begin_frame();
|
||||
dr_begin_frame(fnt_tag_zero());
|
||||
r_window_begin_frame(os_window, r_window);
|
||||
DR_Bucket *bucket = dr_bucket_make();
|
||||
DR_BucketScope(bucket) ProfScope("draw")
|
||||
@@ -77,7 +77,7 @@ frame(void)
|
||||
internal void
|
||||
entry_point(CmdLine *cmdline)
|
||||
{
|
||||
os_window = os_window_open(v2f32(1600, 900), 0, str8_lit("textperf"));
|
||||
os_window = os_window_open(r2f32p(0, 0, 1600, 900), OS_WindowFlag_UseDefaultPosition, str8_lit("textperf"));
|
||||
r_window = r_window_equip(os_window);
|
||||
os_window_first_paint(os_window);
|
||||
for(;!update(););
|
||||
|
||||
Reference in New Issue
Block a user