From 720bcddf445b7cc6f009ae9c9e173f3bd39dcb92 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 16 Oct 2016 14:15:41 -0700 Subject: [PATCH] name-neatens --- c/mapping/mlr_dsl_ast.c | 14 +-- c/mapping/mlr_dsl_ast.h | 4 +- c/mapping/mlr_dsl_cst_statements.c | 8 +- c/mapping/mlr_dsl_stack_allocate.c | 44 ++++---- c/reg_test/expected/out | 174 ++++++++++++++--------------- 5 files changed, 122 insertions(+), 122 deletions(-) diff --git a/c/mapping/mlr_dsl_ast.c b/c/mapping/mlr_dsl_ast.c index 78f757887..6f9bc9613 100644 --- a/c/mapping/mlr_dsl_ast.c +++ b/c/mapping/mlr_dsl_ast.c @@ -18,9 +18,9 @@ mlr_dsl_ast_node_t* mlr_dsl_ast_node_alloc(char* text, mlr_dsl_ast_node_type_t t pnode->type = type; pnode->pchildren = NULL; - pnode->frame_relative_index = MD_UNUSED_INDEX; - pnode->upstack_frame_count = MD_UNUSED_INDEX; - pnode->absolute_index = MD_UNUSED_INDEX; + pnode->subframe_relative_index = MD_UNUSED_INDEX; + pnode->upstack_subframe_count = MD_UNUSED_INDEX; + pnode->frame_relative_index = MD_UNUSED_INDEX; pnode->frame_var_count = MD_UNUSED_INDEX; pnode->max_var_depth = MD_UNUSED_INDEX; @@ -177,12 +177,12 @@ static void mlr_dsl_ast_node_print_aux(mlr_dsl_ast_node_t* pnode, int level, FIL mlr_dsl_ast_node_describe_type(pnode->type), (pnode->pchildren != NULL) ? ":" : "."); + if (pnode->subframe_relative_index != MD_UNUSED_INDEX) + fprintf(o, " subframe_relative_index=%d", pnode->subframe_relative_index); + if (pnode->upstack_subframe_count != MD_UNUSED_INDEX) + fprintf(o, " upstack_subframe_count=%d", pnode->upstack_subframe_count); if (pnode->frame_relative_index != MD_UNUSED_INDEX) fprintf(o, " frame_relative_index=%d", pnode->frame_relative_index); - if (pnode->upstack_frame_count != MD_UNUSED_INDEX) - fprintf(o, " upstack_frame_count=%d", pnode->upstack_frame_count); - if (pnode->absolute_index != MD_UNUSED_INDEX) - fprintf(o, " absolute_index=%d", pnode->absolute_index); if (pnode->frame_var_count != MD_UNUSED_INDEX) fprintf(o, " frame_var_count=%d", pnode->frame_var_count); if (pnode->max_var_depth != MD_UNUSED_INDEX) diff --git a/c/mapping/mlr_dsl_ast.h b/c/mapping/mlr_dsl_ast.h index ccaa3d1aa..31a613372 100644 --- a/c/mapping/mlr_dsl_ast.h +++ b/c/mapping/mlr_dsl_ast.h @@ -85,9 +85,9 @@ typedef struct _mlr_dsl_ast_node_t { sllv_t* pchildren; // For bind-stack allocation only in local-var nodes: unused for any other node types. + int subframe_relative_index; + int upstack_subframe_count; int frame_relative_index; - int upstack_frame_count; - int absolute_index; // For bind-stack allocation only in statement-block nodes: unused for any other node types. int frame_var_count; int max_var_depth; diff --git a/c/mapping/mlr_dsl_cst_statements.c b/c/mapping/mlr_dsl_cst_statements.c index e00af95e8..41c904d23 100644 --- a/c/mapping/mlr_dsl_cst_statements.c +++ b/c/mapping/mlr_dsl_cst_statements.c @@ -646,8 +646,8 @@ static mlr_dsl_cst_statement_t* alloc_local_variable_definition(mlr_dsl_cst_t* p mlr_dsl_cst_statement_t* pstatement = alloc_blank(); mlr_dsl_ast_node_t* pname_node = pnode->pchildren->phead->pvvalue; mlr_dsl_ast_node_t* pvalue_node = pnode->pchildren->phead->pnext->pvvalue; - MLR_INTERNAL_CODING_ERROR_IF(pname_node->absolute_index == MD_UNUSED_INDEX); - pstatement->local_lhs_stack_frame_index = pname_node->absolute_index; + MLR_INTERNAL_CODING_ERROR_IF(pname_node->frame_relative_index == MD_UNUSED_INDEX); + pstatement->local_lhs_stack_frame_index = pname_node->frame_relative_index; pstatement->local_variable_name = pname_node->text; pstatement->prhs_evaluator = rval_evaluator_alloc_from_ast(pvalue_node, pcst->pfmgr, type_inferencing, context_flags); @@ -670,8 +670,8 @@ static mlr_dsl_cst_statement_t* alloc_local_variable_assignment(mlr_dsl_cst_t* p pstatement->pnode_handler = handle_local_variable_assignment; pstatement->local_lhs_variable_name = pleft->text; - MLR_INTERNAL_CODING_ERROR_IF(pleft->absolute_index == MD_UNUSED_INDEX); - pstatement->local_lhs_stack_frame_index = pleft->absolute_index; + MLR_INTERNAL_CODING_ERROR_IF(pleft->frame_relative_index == MD_UNUSED_INDEX); + pstatement->local_lhs_stack_frame_index = pleft->frame_relative_index; pstatement->prhs_evaluator = rval_evaluator_alloc_from_ast(pright, pcst->pfmgr, type_inferencing, context_flags); return pstatement; } diff --git a/c/mapping/mlr_dsl_stack_allocate.c b/c/mapping/mlr_dsl_stack_allocate.c index 1841d9d06..fd7a2a85c 100644 --- a/c/mapping/mlr_dsl_stack_allocate.c +++ b/c/mapping/mlr_dsl_stack_allocate.c @@ -572,15 +572,15 @@ static void stkalc_frame_group_mutate_node_for_define(stkalc_frame_group_t* pfra { char* op = "REUSE"; stkalc_frame_t* pframe = pframe_group->plist->phead->pvvalue; - pnode->upstack_frame_count = 0; - if (!stkalc_frame_test_and_get(pframe, pnode->text, &pnode->frame_relative_index)) { - pnode->frame_relative_index = stkalc_frame_add(pframe, desc, pnode->text); + pnode->upstack_subframe_count = 0; + if (!stkalc_frame_test_and_get(pframe, pnode->text, &pnode->subframe_relative_index)) { + pnode->subframe_relative_index = stkalc_frame_add(pframe, desc, pnode->text); op = "ADD"; } if (trace) { leader_print(pframe_group->plist->length); printf("%s %s %s @ %du%d\n", op, desc, pnode->text, - pnode->frame_relative_index, pnode->upstack_frame_count); + pnode->subframe_relative_index, pnode->upstack_subframe_count); } } @@ -590,19 +590,19 @@ static void stkalc_frame_group_mutate_node_for_write(stkalc_frame_group_t* pfram char* op = "REUSE"; int found = FALSE; // xxx comment: re loop. if not found, fall back to top frame. - pnode->upstack_frame_count = 0; - for (sllve_t* pe = pframe_group->plist->phead; pe != NULL; pe = pe->pnext, pnode->upstack_frame_count++) { + pnode->upstack_subframe_count = 0; + for (sllve_t* pe = pframe_group->plist->phead; pe != NULL; pe = pe->pnext, pnode->upstack_subframe_count++) { stkalc_frame_t* pframe = pe->pvvalue; - if (stkalc_frame_test_and_get(pframe, pnode->text, &pnode->frame_relative_index)) { + if (stkalc_frame_test_and_get(pframe, pnode->text, &pnode->subframe_relative_index)) { found = TRUE; // xxx dup break; } } if (!found) { - pnode->upstack_frame_count = 0; + pnode->upstack_subframe_count = 0; stkalc_frame_t* pframe = pframe_group->plist->phead->pvvalue; - pnode->frame_relative_index = stkalc_frame_add(pframe, desc, pnode->text); + pnode->subframe_relative_index = stkalc_frame_add(pframe, desc, pnode->text); // xxx temp op = "ADD"; } @@ -610,7 +610,7 @@ static void stkalc_frame_group_mutate_node_for_write(stkalc_frame_group_t* pfram if (trace) { leader_print(pframe_group->plist->length); printf("%s %s %s @ %du%d\n", op, desc, pnode->text, - pnode->frame_relative_index, pnode->upstack_frame_count); + pnode->subframe_relative_index, pnode->upstack_subframe_count); } } @@ -621,10 +621,10 @@ static void stkalc_frame_group_mutate_node_for_read(stkalc_frame_group_t* pframe char* op = "PRESENT"; int found = FALSE; // xxx comment: re loop. if not found, fall back to top frame. - int upstack_frame_count = 0; - for (sllve_t* pe = pframe_group->plist->phead; pe != NULL; pe = pe->pnext, upstack_frame_count++) { + int upstack_subframe_count = 0; + for (sllve_t* pe = pframe_group->plist->phead; pe != NULL; pe = pe->pnext, upstack_subframe_count++) { stkalc_frame_t* pframe = pe->pvvalue; - if (stkalc_frame_test_and_get(pframe, pnode->text, &pnode->frame_relative_index)) { + if (stkalc_frame_test_and_get(pframe, pnode->text, &pnode->subframe_relative_index)) { found = TRUE; // xxx dup break; } @@ -633,16 +633,16 @@ static void stkalc_frame_group_mutate_node_for_read(stkalc_frame_group_t* pframe // xxx if not found: go to the tail & use the "" entry if (!found) { stkalc_frame_t* plast = pframe_group->plist->ptail->pvvalue; - pnode->frame_relative_index = stkalc_frame_get(plast, ""); - upstack_frame_count = pframe_group->plist->length - 1; + pnode->subframe_relative_index = stkalc_frame_get(plast, ""); + upstack_subframe_count = pframe_group->plist->length - 1; op = "ABSENT"; } if (trace) { leader_print(pframe_group->plist->length); - printf("%s %s %s @ %du%d\n", desc, pnode->text, op, pnode->frame_relative_index, upstack_frame_count); + printf("%s %s %s @ %du%d\n", desc, pnode->text, op, pnode->subframe_relative_index, upstack_subframe_count); } - pnode->upstack_frame_count = upstack_frame_count; + pnode->upstack_subframe_count = upstack_subframe_count; } @@ -678,15 +678,15 @@ static void pass_2_for_node(mlr_dsl_ast_node_t* pnode, } } - if (pnode->frame_relative_index != MD_UNUSED_INDEX) { - pnode->absolute_index = var_count_below_frame + pnode->frame_relative_index; + if (pnode->subframe_relative_index != MD_UNUSED_INDEX) { + pnode->frame_relative_index = var_count_below_frame + pnode->subframe_relative_index; if (trace) { leader_print(frame_depth); printf("NODE %s %du%d -> %d\n", pnode->text, - pnode->frame_relative_index, - pnode->upstack_frame_count, - pnode->absolute_index); + pnode->subframe_relative_index, + pnode->upstack_subframe_count, + pnode->frame_relative_index); } } diff --git a/c/reg_test/expected/out b/c/reg_test/expected/out index 1b29d2271..06091fc4d 100644 --- a/c/reg_test/expected/out +++ b/c/reg_test/expected/out @@ -26358,8 +26358,8 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 @@ -26395,8 +26395,8 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="=", type=SREC_ASSIGNMENT: text="nr", type=FIELD_NAME. @@ -26438,12 +26438,12 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="unset", type=UNSET: text="indirect_field_name", type=INDIRECT_FIELD_NAME: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="=", type=SREC_ASSIGNMENT: text="j", type=FIELD_NAME. text="NR", type=CONTEXT_VARIABLE. @@ -26488,18 +26488,18 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="if_head", type=IF_HEAD: text="if", type=IF_ITEM: text="!=", type=OPERATOR: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="x", type=STRNUM_LITERAL. text="if_block", type=STATEMENT_BLOCK: frame_var_count=0 text="unset", type=UNSET: text="indirect_field_name", type=INDIRECT_FIELD_NAME: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=1 absolute_index=3 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=1 frame_relative_index=3 text="=", type=SREC_ASSIGNMENT: text="j", type=FIELD_NAME. text="NR", type=CONTEXT_VARIABLE. @@ -26540,16 +26540,16 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="=", type=INDIRECT_SREC_ASSIGNMENT: text=".", type=OPERATOR: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="_orig", type=STRNUM_LITERAL. - text="v", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="v", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="=", type=INDIRECT_SREC_ASSIGNMENT: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="other", type=STRNUM_LITERAL. a b i x y a_orig b_orig i_orig x_orig y_orig @@ -26584,12 +26584,12 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="=", type=INDIRECT_SREC_ASSIGNMENT: - text="v", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="v", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,pan=b,1=i,0.3467901443380824=x,0.7268028627434533=y a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,eks=a,pan=b,2=i,0.7586799647899636=x,0.5221511083334797=y @@ -26643,13 +26643,13 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="0", type=STRNUM_LITERAL. text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="if_head", type=IF_HEAD: text="if", type=IF_ITEM: text="=~", type=OPERATOR: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="^[xy]$", type=STRNUM_LITERAL. text="if_block", type=STATEMENT_BLOCK: frame_var_count=0 text="=", type=SREC_ASSIGNMENT: @@ -26657,7 +26657,7 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="+", type=OPERATOR: text="sum", type=FIELD_NAME. text="indirect_field_name", type=INDIRECT_FIELD_NAME: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=1 absolute_index=3 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=1 frame_relative_index=3 a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,sum=1.073593 a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,sum=1.280831 @@ -26714,13 +26714,13 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="0", type=STRNUM_LITERAL. text="for", type=FOR_SREC: frame_var_count=2 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="for_full_srec_block", type=STATEMENT_BLOCK: text="if_head", type=IF_HEAD: text="if", type=IF_ITEM: text="=~", type=OPERATOR: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="^[xy]$", type=STRNUM_LITERAL. text="if_block", type=STATEMENT_BLOCK: frame_var_count=0 text="=", type=SREC_ASSIGNMENT: @@ -26729,7 +26729,7 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="sum", type=FIELD_NAME. text="float", type=NON_SIGIL_NAME: text="indirect_field_name", type=INDIRECT_FIELD_NAME: - text="k", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=1 absolute_index=3 + text="k", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=1 frame_relative_index=3 a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,sum=1.073593 a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,sum=1.280831 @@ -26866,9 +26866,9 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="k1", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="k2", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="v", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 + text="k1", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="k2", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="v", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 text="oosvar_keylist", type=OOSVAR_KEYLIST: text="o", type=STRING_LITERAL. text="1", type=STRNUM_LITERAL. @@ -26879,9 +26879,9 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="n", type=STRING_LITERAL. text="3", type=STRNUM_LITERAL. text="4", type=STRNUM_LITERAL. - text="k2", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="k1", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="v", type=LOCAL_VARIABLE. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 + text="k2", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="k1", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="v", type=LOCAL_VARIABLE. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 mlr --opprint --from ./reg_test/input/abixy put -q @@ -27070,8 +27070,8 @@ MAIN BLOCK: text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=2 text="for", type=FOR_SREC: frame_var_count=1 text="variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="for_full_srec_block", type=STATEMENT_BLOCK: mlr -n put -v for (k, k in @*) {} @@ -27096,8 +27096,8 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=2 text="for", type=FOR_OOSVAR: frame_var_count=1 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="k", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="k", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27124,9 +27124,9 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_OOSVAR: frame_var_count=2 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="c", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27153,9 +27153,9 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_OOSVAR: frame_var_count=2 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27182,9 +27182,9 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=3 text="for", type=FOR_OOSVAR: frame_var_count=2 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27212,10 +27212,10 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="c", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="d", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="d", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27243,10 +27243,10 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="d", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="d", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27274,10 +27274,10 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="c", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27305,10 +27305,10 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="d", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="d", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27336,10 +27336,10 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="c", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -27367,10 +27367,10 @@ text="main_block", type=STATEMENT_BLOCK: frame_var_count=1 max_var_depth=4 text="for", type=FOR_OOSVAR: frame_var_count=3 text="key_and_value_variables", type=FOR_VARIABLES: text="key_variables", type=FOR_VARIABLES: - text="a", type=NON_SIGIL_NAME. frame_relative_index=0 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=2 - text="c", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 - text="c", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=3 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=2 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=3 text="empty_keylist", type=OOSVAR_KEYLIST: text="for_full_oosvar_block", type=STATEMENT_BLOCK: @@ -42690,36 +42690,36 @@ BLOCKED AST: FUNCTION DEFINITION: text="f", type=FUNC_DEF: frame_var_count=2 max_var_depth=2 text="f", type=NON_SIGIL_NAME: - text="x", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="x", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text="func_block", type=STATEMENT_BLOCK: text="return_value", type=RETURN_VALUE: text="**", type=OPERATOR: - text="x", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="x", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text="2", type=STRNUM_LITERAL. FUNCTION DEFINITION: text="g", type=FUNC_DEF: frame_var_count=2 max_var_depth=2 text="g", type=NON_SIGIL_NAME: - text="y", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="y", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text="func_block", type=STATEMENT_BLOCK: text="return_value", type=RETURN_VALUE: text="+", type=OPERATOR: - text="y", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="y", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text="1", type=STRNUM_LITERAL. SUBROUTINE DEFINITION: text="s", type=SUBR_DEF: frame_var_count=4 max_var_depth=4 text="s", type=NON_SIGIL_NAME: - text="a", type=NON_SIGIL_NAME. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 - text="b", type=NON_SIGIL_NAME. frame_relative_index=2 upstack_frame_count=0 absolute_index=2 - text="c", type=NON_SIGIL_NAME. frame_relative_index=3 upstack_frame_count=0 absolute_index=3 + text="a", type=NON_SIGIL_NAME. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=NON_SIGIL_NAME. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=2 + text="c", type=NON_SIGIL_NAME. subframe_relative_index=3 upstack_subframe_count=0 frame_relative_index=3 text="subr_block", type=STATEMENT_BLOCK: text="print", type=PRINT: text=".", type=OPERATOR: text=".", type=OPERATOR: - text="a", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 - text="b", type=LOCAL_VARIABLE. frame_relative_index=2 upstack_frame_count=0 absolute_index=2 - text="c", type=LOCAL_VARIABLE. frame_relative_index=3 upstack_frame_count=0 absolute_index=3 + text="a", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 + text="b", type=LOCAL_VARIABLE. subframe_relative_index=2 upstack_subframe_count=0 frame_relative_index=2 + text="c", type=LOCAL_VARIABLE. subframe_relative_index=3 upstack_subframe_count=0 frame_relative_index=3 text=">", type=FILE_WRITE: text="stdout", type=STDOUT: @@ -42731,12 +42731,12 @@ text="begin", type=BEGIN: frame_var_count=2 max_var_depth=2 text="a", type=STRING_LITERAL. text="0", type=STRNUM_LITERAL. text="local", type=LOCAL: - text="ell", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="ell", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text="1", type=STRNUM_LITERAL. text="print", type=PRINT: text=".", type=OPERATOR: text="local1 = ", type=STRNUM_LITERAL. - text="ell", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="ell", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text=">", type=FILE_WRITE: text="stdout", type=STDOUT: @@ -42754,7 +42754,7 @@ text="begin", type=BEGIN: frame_var_count=1 max_var_depth=1 text="print", type=PRINT: text=".", type=OPERATOR: text="local3 = ", type=STRNUM_LITERAL. - text="ell", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=0 + text="ell", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=0 text=">", type=FILE_WRITE: text="stdout", type=STDOUT: @@ -42767,12 +42767,12 @@ text="end", type=END: frame_var_count=2 max_var_depth=2 text="a", type=STRING_LITERAL. text="stream", type=STREAM: text="local", type=LOCAL: - text="emm", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="emm", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text="2", type=STRNUM_LITERAL. text="print", type=PRINT: text=".", type=OPERATOR: text="local2 = ", type=STRNUM_LITERAL. - text="emm", type=LOCAL_VARIABLE. frame_relative_index=1 upstack_frame_count=0 absolute_index=1 + text="emm", type=LOCAL_VARIABLE. subframe_relative_index=1 upstack_subframe_count=0 frame_relative_index=1 text=">", type=FILE_WRITE: text="stdout", type=STDOUT: @@ -42792,7 +42792,7 @@ text="end", type=END: frame_var_count=1 max_var_depth=1 text="print", type=PRINT: text=".", type=OPERATOR: text="local4 = ", type=STRNUM_LITERAL. - text="emm", type=LOCAL_VARIABLE. frame_relative_index=0 upstack_frame_count=0 absolute_index=0 + text="emm", type=LOCAL_VARIABLE. subframe_relative_index=0 upstack_subframe_count=0 frame_relative_index=0 text=">", type=FILE_WRITE: text="stdout", type=STDOUT: