extend eval viz blocks & windowed row build path with optional member info - use to extend watch type info visualization with size/offset information

This commit is contained in:
Ryan Fleury
2024-02-01 10:59:55 -08:00
parent d6608adf60
commit 28fdd791ae
12 changed files with 99 additions and 53 deletions
+6
View File
@@ -44,6 +44,7 @@ eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push){
internal String8
eval_bytecode_from_oplist(Arena *arena, EVAL_OpList *list){
ProfBeginFunction();
// allocate output
U64 size = list->encoded_size;
U8 *str = push_array_no_zero(arena, U8, size);
@@ -94,6 +95,7 @@ eval_bytecode_from_oplist(Arena *arena, EVAL_OpList *list){
String8 result = {0};
result.size = size;
result.str = str;
ProfEnd();
return(result);
}
@@ -761,6 +763,7 @@ eval_type_from_type_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVA
internal EVAL_IRTreeAndType
eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, EVAL_Expr *expr, EVAL_ErrorList *eout)
{
ProfBeginFunction();
EVAL_IRTreeAndType result = {0};
result.tree = &eval_irtree_nil;
@@ -1535,11 +1538,13 @@ eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdb
}break;
}
ProfEnd();
return(result);
}
internal void
eval_oplist_from_irtree(Arena *arena, EVAL_IRTree *tree, EVAL_OpList *out){
ProfBeginFunction();
U32 op = tree->op;
switch (op){
case RADDBG_EvalOp_Stop:
@@ -1604,4 +1609,5 @@ eval_oplist_from_irtree(Arena *arena, EVAL_IRTree *tree, EVAL_OpList *out){
}
}break;
}
ProfEnd();
}
+2
View File
@@ -6,6 +6,7 @@
internal EVAL_Result
eval_interpret(EVAL_Machine *machine, String8 bytecode){
ProfBeginFunction();
EVAL_Result result = {0};
// TODO(allen): We could scan the bytecode and figure out the
@@ -626,5 +627,6 @@ eval_interpret(EVAL_Machine *machine, String8 bytecode){
}
scratch_end(scratch);
ProfEnd();
return(result);
}
+4
View File
@@ -316,6 +316,7 @@ eval_token_array_from_chunk_list(Arena *arena, EVAL_TokenChunkList *list)
internal EVAL_TokenArray
eval_token_array_from_text(Arena *arena, String8 text)
{
ProfBeginFunction();
Temp scratch = scratch_begin(&arena, 1);
//- rjf: lex loop
@@ -486,6 +487,7 @@ eval_token_array_from_text(Arena *arena, String8 text)
//- rjf: chunk list -> array & return
EVAL_TokenArray array = eval_token_array_from_chunk_list(arena, &tokens);
scratch_end(scratch);
ProfEnd();
return array;
}
@@ -663,6 +665,7 @@ eval_parse_type_from_text_tokens(Arena *arena, EVAL_ParseCtx *ctx, String8 text,
internal EVAL_ParseResult
eval_parse_expr_from_text_tokens__prec(Arena *arena, EVAL_ParseCtx *ctx, String8 text, EVAL_TokenArray *tokens, S64 max_precedence)
{
ProfBeginFunction();
Temp scratch = scratch_begin(&arena, 1);
EVAL_Token *it = tokens->v;
EVAL_Token *it_opl = tokens->v + tokens->count;
@@ -1465,6 +1468,7 @@ eval_parse_expr_from_text_tokens__prec(Arena *arena, EVAL_ParseCtx *ctx, String8
result.last_token = it;
result.expr = atom;
scratch_end(scratch);
ProfEnd();
return result;
}