mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-13 13:01:25 -07:00
memory view fixups for new visualization systems; breakpoint editing work
This commit is contained in:
@@ -117,6 +117,7 @@ E_ExprKindTable:
|
||||
{ LeafBytecode Null 0 "bytecode" "" "" "" }
|
||||
{ LeafMember Null 0 "member" "" "" "" }
|
||||
{ LeafStringLiteral Null 0 "string_literal" "" "" "" }
|
||||
{ LeafBool Null 0 "B32" "" "" "" }
|
||||
{ LeafU64 Null 0 "U64" "" "" "" }
|
||||
{ LeafF64 Null 0 "F64" "" "" "" }
|
||||
{ LeafF32 Null 0 "F32" "" "" "" }
|
||||
|
||||
@@ -1221,6 +1221,14 @@ e_irtree_and_type_from_expr(Arena *arena, E_Expr *expr)
|
||||
result.mode = E_Mode_Value;
|
||||
}break;
|
||||
|
||||
//- rjf: leaf bools
|
||||
case E_ExprKind_LeafBool:
|
||||
{
|
||||
result.root = e_irtree_const_u(arena, expr->value.u64);
|
||||
result.type_key = expr->type_key;
|
||||
result.mode = E_Mode_Value;
|
||||
}break;
|
||||
|
||||
//- rjf: leaf U64s
|
||||
case E_ExprKind_LeafU64:
|
||||
{
|
||||
|
||||
+26
-1
@@ -789,6 +789,7 @@ e_append_strings_from_expr(Arena *arena, E_Expr *expr, String8List *out)
|
||||
str8_list_pushf(arena, out, "\"%S\"", expr->string);
|
||||
}break;
|
||||
case E_ExprKind_LeafU64:
|
||||
case E_ExprKind_LeafBool:
|
||||
{
|
||||
str8_list_pushf(arena, out, "%I64u", expr->value.u64);
|
||||
}break;
|
||||
@@ -1297,12 +1298,14 @@ e_parse_expr_from_text_tokens__prec(Arena *arena, String8 text, E_TokenArray *to
|
||||
case E_TokenKind_Identifier:
|
||||
{
|
||||
B32 mapped_identifier = 0;
|
||||
B32 identifier_is_constant_value = 0;
|
||||
B32 identifier_type_is_possibly_dynamically_overridden = 0;
|
||||
B32 identifier_looks_like_type_expr = 0;
|
||||
RDI_LocationKind loc_kind = RDI_LocationKind_NULL;
|
||||
RDI_LocationReg loc_reg = {0};
|
||||
RDI_LocationRegPlusU16 loc_reg_u16 = {0};
|
||||
String8 loc_bytecode = {0};
|
||||
U64 constant_value = 0;
|
||||
REGS_RegCode reg_code = 0;
|
||||
REGS_AliasCode alias_code = 0;
|
||||
E_TypeKey type_key = zero_struct;
|
||||
@@ -1589,6 +1592,22 @@ e_parse_expr_from_text_tokens__prec(Arena *arena, String8 text, E_TokenArray *to
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: try basic constants
|
||||
if(mapped_identifier == 0 && str8_match(token_string, str8_lit("true"), 0))
|
||||
{
|
||||
mapped_identifier = 1;
|
||||
identifier_is_constant_value = 1;
|
||||
type_key = e_type_key_basic(E_TypeKind_Bool);
|
||||
constant_value = 1;
|
||||
}
|
||||
if(mapped_identifier == 0 && str8_match(token_string, str8_lit("false"), 0))
|
||||
{
|
||||
mapped_identifier = 1;
|
||||
identifier_is_constant_value = 1;
|
||||
type_key = e_type_key_basic(E_TypeKind_Bool);
|
||||
constant_value = 0;
|
||||
}
|
||||
|
||||
//- rjf: attach on map
|
||||
if(mapped_identifier != 0)
|
||||
{
|
||||
@@ -1599,7 +1618,13 @@ e_parse_expr_from_text_tokens__prec(Arena *arena, String8 text, E_TokenArray *to
|
||||
{
|
||||
default:
|
||||
{
|
||||
if(identifier_looks_like_type_expr)
|
||||
if(identifier_is_constant_value)
|
||||
{
|
||||
atom = e_push_expr(arena, E_ExprKind_LeafBool, token_string.str);
|
||||
atom->value.u64 = constant_value;
|
||||
atom->type_key = type_key;
|
||||
}
|
||||
else if(identifier_looks_like_type_expr)
|
||||
{
|
||||
E_TokenArray type_parse_tokens = e_token_array_make_first_opl(it-1, it_opl);
|
||||
E_Parse type_parse = e_parse_type_from_text_tokens(arena, text, &type_parse_tokens);
|
||||
|
||||
@@ -14,7 +14,7 @@ str8_lit_comp("CharLiteral"),
|
||||
str8_lit_comp("Symbol"),
|
||||
};
|
||||
|
||||
String8 e_expr_kind_strings[45] =
|
||||
String8 e_expr_kind_strings[46] =
|
||||
{
|
||||
str8_lit_comp("Nil"),
|
||||
str8_lit_comp("Ref"),
|
||||
@@ -50,6 +50,7 @@ str8_lit_comp("Ternary"),
|
||||
str8_lit_comp("LeafBytecode"),
|
||||
str8_lit_comp("LeafMember"),
|
||||
str8_lit_comp("LeafStringLiteral"),
|
||||
str8_lit_comp("LeafBool"),
|
||||
str8_lit_comp("LeafU64"),
|
||||
str8_lit_comp("LeafF64"),
|
||||
str8_lit_comp("LeafF32"),
|
||||
@@ -78,7 +79,7 @@ str8_lit_comp("Insufficient evaluation machine stack space."),
|
||||
str8_lit_comp("Malformed bytecode."),
|
||||
};
|
||||
|
||||
E_OpInfo e_expr_kind_op_info_table[45] =
|
||||
E_OpInfo e_expr_kind_op_info_table[46] =
|
||||
{
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
@@ -124,6 +125,7 @@ E_OpInfo e_expr_kind_op_info_table[45] =
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Null, 0, str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("") },
|
||||
{ E_OpKind_Binary, 13, str8_lit_comp(""), str8_lit_comp("="), str8_lit_comp("") },
|
||||
};
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ E_ExprKind_Ternary,
|
||||
E_ExprKind_LeafBytecode,
|
||||
E_ExprKind_LeafMember,
|
||||
E_ExprKind_LeafStringLiteral,
|
||||
E_ExprKind_LeafBool,
|
||||
E_ExprKind_LeafU64,
|
||||
E_ExprKind_LeafF64,
|
||||
E_ExprKind_LeafF32,
|
||||
@@ -157,9 +158,9 @@ E_InterpretationCode_COUNT,
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 e_token_kind_strings[6];
|
||||
extern String8 e_expr_kind_strings[45];
|
||||
extern String8 e_expr_kind_strings[46];
|
||||
extern String8 e_interpretation_code_display_strings[11];
|
||||
extern E_OpInfo e_expr_kind_op_info_table[45];
|
||||
extern E_OpInfo e_expr_kind_op_info_table[46];
|
||||
extern U8 e_kind_basic_byte_size_table[56];
|
||||
extern String8 e_kind_basic_string_table[56];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user