mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-22 15:37:59 +00:00
neaten
This commit is contained in:
parent
c2afceb78b
commit
f7db075d99
4 changed files with 226 additions and 216 deletions
|
|
@ -6,8 +6,6 @@
|
|||
#include "mapping/mlr_dsl_blocked_ast.h"
|
||||
#include "mapping/context_flags.h"
|
||||
|
||||
// xxx check 'frame' vs. 'subframe' throughout in comments as well as code
|
||||
|
||||
// ================================================================
|
||||
// This is a two-pass stack allocator for the Miller DSL.
|
||||
//
|
||||
|
|
@ -21,72 +19,91 @@
|
|||
// lookup to locate each local variable on the stack. For compute-intensive
|
||||
// work this resulted in 80% or more of the compute time being used for the
|
||||
// hashmap accesses. It doesn't make sense to always be asking "where is
|
||||
// variable 'a'"? at runtime (maybe ten million times) since this can be figured
|
||||
// out ahead of time.
|
||||
// variable 'a'"? at runtime (maybe ten million times doing hash-map lookups)
|
||||
// since this can be figured out ahead of time.
|
||||
//
|
||||
// The Miller DSL allows for recursive functions and subroutines, but within
|
||||
// those, stack layout is knowable at parse time.
|
||||
//
|
||||
// ----------------------------------------------------------------
|
||||
// TERMINOLOGY
|
||||
//
|
||||
// * A top-level statement block starts with 'begin', 'end', 'func', 'subr',
|
||||
// or is the remaining collection of statements outside of any of those which
|
||||
// is called the 'main' statement block.
|
||||
//
|
||||
// * A stack frame is all the locals for a top-level statement block including
|
||||
// anything local to a scoped block within the top-level block. For example,
|
||||
// locals may be defined within if/while/do-while blocks. Also, variables can
|
||||
// be local to a triple-fo, e.g. 'for (local i = 0; i < 10; i += 1) { ... }'.
|
||||
// As well, locals are bound to variables in for-loops over stream records
|
||||
// or out-of-stream variables: 'for (k, v in $*) { ... }' or
|
||||
// 'for ((k1, k2), v in @*) { ... }'. Lastly, function arguments are local
|
||||
// to the function/subroutine definition site.
|
||||
//
|
||||
// * A subframe is the locals defined within any of the above: locals
|
||||
// defined within an if/while/for/etc. block. Or, the locals defined
|
||||
// in the top-level block have their own subframe.
|
||||
//
|
||||
// ----------------------------------------------------------------
|
||||
// CONVENTION: Local variables are bound to indices within the stack frame, but,
|
||||
// local variable may be read before they are defined. Slot 0 of each frame is
|
||||
// an absent-null which is reserved for this purpose.
|
||||
//
|
||||
// ----------------------------------------------------------------
|
||||
// EXAMPLE:
|
||||
//
|
||||
// # ---- FUNC FRAME: defcount 7 {absent-RHS,a,b,c,i,j,y}
|
||||
// # To be noted below: absent-RHS is at slot 0 of top level.
|
||||
// # ---- FUNC TOP-LEVEL SUBFRAME 0: defcount 7 {absent-RHS,a,b,c,i,j,y}
|
||||
// # Absent-null-RHS is at slot 0 of top level.
|
||||
// func f(a, b, c) { # Args define locals 1,2,3 at current level.
|
||||
// local i = 24; # Explicitly define local 4 at current level.
|
||||
// j = 25; # Implicitly define local 5 at current level.
|
||||
// #
|
||||
// # ---- IF FRAME: defcount 1 {k}
|
||||
// if (a == 26) { # Read local 1, up 1 level.
|
||||
// # ---- IF-STATEMENT SUBFRAME 1: defcount 1 {k}
|
||||
// if (a == 26) { # Read of local 1, found at top level (subframe 0).
|
||||
// local k = 27; # Explicitly define local 0 at this level.
|
||||
// j = 28; # LHS is local 5 up one level.
|
||||
// j = 28; # LHS is local 5, found at top level.
|
||||
// #
|
||||
// # Note that the 'if' and the 'else' are both at subframe
|
||||
// # depth 1, while each defines a different number of locals.
|
||||
// # For this function the max variable depth is 9:
|
||||
// # 7 at top level plus 1 = 8 if the if is taken,
|
||||
// # 7 at top level plus 2 = 9 if the else is taken,
|
||||
// #
|
||||
// } else { # ---- ELSE FRAME: defcount 1 {n}
|
||||
// } else { # ---- ELSE-STATEMENT SUBFRAME 1: defcount 2 {n, u}
|
||||
// n = b; # Implicitly define local 0 at this level.
|
||||
// local u = 4; # Implicitly define local 1 at this level.
|
||||
// } #
|
||||
// #
|
||||
// y = 7; # LHS is local 6 at current level.
|
||||
// i = z; # LHS is local 4 at current level;
|
||||
// # RHS is unresolved -> slot 0 at current level.
|
||||
// # RHS is unresolved -> slot 0 at current level.
|
||||
// } #
|
||||
//
|
||||
// Notes:
|
||||
//
|
||||
// * Pass 1 computes frame-relative indices and upstack-level counts, xxx update x all
|
||||
// * Pass 1 computes frame-relative indices and subframe-level counts,
|
||||
// as in the example, for each local variable.
|
||||
//
|
||||
// * Pass 2 computes absolute indices for each local variable. These
|
||||
// aren't computable in pass 1 due to the example 'y = 7' assignment
|
||||
// above: the number of local variables in an upper level can change
|
||||
// after the invocation of a child level, so total frame size is not
|
||||
// after the invocation of a child level, so the total frame size is not
|
||||
// known until all AST nodes in the top-level block have been visited.
|
||||
//
|
||||
// * Pass 2 also computes the max depth, counting number of variables, so
|
||||
// that for each top-level block we can allocate an array of mlrvals which
|
||||
// will be reused on every invocation. (For recursive function calls this will
|
||||
// be dynamically allocated.)
|
||||
// will be reused on every invocation. (For recursive function calls an entire
|
||||
// frame be dynamically allocated.)
|
||||
//
|
||||
// * Slot 0 of the top level is reserved for an absent-null for unresolved
|
||||
// names on reads.
|
||||
//
|
||||
// * The tree-traversal order is done correctly so that if a variable is read
|
||||
// before it is defined, then read again after it is defined, then the first
|
||||
// read gets absent-null and the second gets the defined value. This also
|
||||
// requires the concrete-syntax-tree implementation to initialize the
|
||||
// stack to mv_absent on each invocation.
|
||||
// read gets absent-null and the second gets the defined value.
|
||||
// ================================================================
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// xxx to do:
|
||||
|
||||
// * maybe move ast from containers to mapping?
|
||||
|
||||
// * 'semantic analysis': use this to describe CST-build-time checks
|
||||
// * 'object binding': use this to describe linking func/subr defs and callsites
|
||||
// * separate verbosity for allocator? and invoke it in UT cases specific to this?
|
||||
// -> (note allocation marks in the AST will be printed regardless)
|
||||
|
||||
// ================================================================
|
||||
// Pass-1 stack-frame container: simply a hashmap from name to position on the
|
||||
// frame relative to the curly-braced statement block (top-level, for-loop,
|
||||
|
|
@ -100,7 +117,7 @@ typedef struct _stkalc_subframe_t {
|
|||
// ----------------------------------------------------------------
|
||||
// Pass-1 stack-frame methods
|
||||
|
||||
static stkalc_subframe_t* stkalc_subframe_alloc();
|
||||
static stkalc_subframe_t* stkalc_subframe_alloc();
|
||||
|
||||
static void stkalc_subframe_free(stkalc_subframe_t* pframe);
|
||||
|
||||
|
|
@ -135,7 +152,7 @@ static void stkalc_subframe_group_push(stkalc_subframe_group_t* pframe_group, st
|
|||
static stkalc_subframe_t* stkalc_subframe_group_pop(stkalc_subframe_group_t* pframe_group);
|
||||
|
||||
// Pass-1 stack-frame-group node-mutator methods: given an AST node containing a
|
||||
// local-variable usage they assign a frame-relative index and a frame-depth
|
||||
// local-variable usage they assign a subframe-relative index and a subframe-depth
|
||||
// counter (how many frames deep into the top-level statement block the node
|
||||
// is).
|
||||
|
||||
|
|
@ -208,6 +225,7 @@ static void leader_print(int depth);
|
|||
|
||||
void blocked_ast_allocate_locals(blocked_ast_t* paast, int trace) {
|
||||
|
||||
// Pass 1
|
||||
for (sllve_t* pe = paast->pfunc_defs->phead; pe != NULL; pe = pe->pnext) {
|
||||
pass_1_for_func_subr_block(pe->pvvalue, trace);
|
||||
}
|
||||
|
|
@ -224,6 +242,7 @@ void blocked_ast_allocate_locals(blocked_ast_t* paast, int trace) {
|
|||
pass_1_for_begin_end_block(pe->pvvalue, trace);
|
||||
}
|
||||
|
||||
// Pass 2
|
||||
for (sllve_t* pe = paast->pfunc_defs->phead; pe != NULL; pe = pe->pnext) {
|
||||
pass_2_for_top_level_block(pe->pvvalue, trace);
|
||||
}
|
||||
|
|
@ -249,7 +268,6 @@ static void pass_1_for_func_subr_block(mlr_dsl_ast_node_t* pnode, int trace) {
|
|||
}
|
||||
|
||||
MLR_INTERNAL_CODING_ERROR_IF(pnode->type != MD_AST_NODE_TYPE_SUBR_DEF && pnode->type != MD_AST_NODE_TYPE_FUNC_DEF);
|
||||
// xxx assert two children of desired type
|
||||
|
||||
stkalc_subframe_t* pframe = stkalc_subframe_alloc();
|
||||
stkalc_subframe_group_t* pframe_group = stkalc_subframe_group_alloc(pframe, trace);
|
||||
|
|
@ -407,7 +425,7 @@ static void pass_1_for_srec_for_loop(mlr_dsl_ast_node_t* pnode, stkalc_subframe_
|
|||
{
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("PUSH FRAME %s\n", pnode->text);
|
||||
printf("PUSH SUBFRAME %s\n", pnode->text);
|
||||
}
|
||||
stkalc_subframe_t* pnext_subframe = stkalc_subframe_alloc();
|
||||
stkalc_subframe_group_push(pframe_group, pnext_subframe);
|
||||
|
|
@ -429,7 +447,7 @@ static void pass_1_for_srec_for_loop(mlr_dsl_ast_node_t* pnode, stkalc_subframe_
|
|||
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("POP FRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
printf("POP SUBFRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +472,7 @@ static void pass_1_for_oosvar_key_only_for_loop(mlr_dsl_ast_node_t* pnode, stkal
|
|||
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("PUSH FRAME %s\n", pnode->text);
|
||||
printf("PUSH SUBFRAME %s\n", pnode->text);
|
||||
}
|
||||
stkalc_subframe_t* pnext_subframe = stkalc_subframe_alloc();
|
||||
stkalc_subframe_group_push(pframe_group, pnext_subframe);
|
||||
|
|
@ -468,7 +486,7 @@ static void pass_1_for_oosvar_key_only_for_loop(mlr_dsl_ast_node_t* pnode, stkal
|
|||
stkalc_subframe_free(stkalc_subframe_group_pop(pframe_group));
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("POP FRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
printf("POP SUBFRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -496,7 +514,7 @@ static void pass_1_for_oosvar_for_loop(mlr_dsl_ast_node_t* pnode, stkalc_subfram
|
|||
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("PUSH FRAME %s\n", pnode->text);
|
||||
printf("PUSH SUBFRAME %s\n", pnode->text);
|
||||
}
|
||||
stkalc_subframe_t* pnext_subframe = stkalc_subframe_alloc();
|
||||
stkalc_subframe_group_push(pframe_group, pnext_subframe);
|
||||
|
|
@ -514,7 +532,7 @@ static void pass_1_for_oosvar_for_loop(mlr_dsl_ast_node_t* pnode, stkalc_subfram
|
|||
stkalc_subframe_free(stkalc_subframe_group_pop(pframe_group));
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("POP FRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
printf("POP SUBFRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -529,7 +547,7 @@ static void pass_1_for_triple_for_loop(mlr_dsl_ast_node_t* pnode, stkalc_subfram
|
|||
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("PUSH FRAME %s\n", pnode->text);
|
||||
printf("PUSH SUBFRAME %s\n", pnode->text);
|
||||
}
|
||||
stkalc_subframe_t* pnext_subframe = stkalc_subframe_alloc();
|
||||
stkalc_subframe_group_push(pframe_group, pnext_subframe);
|
||||
|
|
@ -546,7 +564,7 @@ static void pass_1_for_triple_for_loop(mlr_dsl_ast_node_t* pnode, stkalc_subfram
|
|||
stkalc_subframe_free(stkalc_subframe_group_pop(pframe_group));
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("POP FRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
printf("POP SUBFRAME %s subframe_var_count=%d\n", pnode->text, pnode->subframe_var_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -561,7 +579,7 @@ static void pass_1_for_non_terminal_node(mlr_dsl_ast_node_t* pnode, stkalc_subfr
|
|||
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("PUSH FRAME %s\n", pchild->text);
|
||||
printf("PUSH SUBFRAME %s\n", pchild->text);
|
||||
}
|
||||
|
||||
stkalc_subframe_t* pnext_subframe = stkalc_subframe_alloc();
|
||||
|
|
@ -576,7 +594,7 @@ static void pass_1_for_non_terminal_node(mlr_dsl_ast_node_t* pnode, stkalc_subfr
|
|||
|
||||
if (trace) {
|
||||
leader_print(pframe_group->plist->length);
|
||||
printf("POP FRAME %s subframe_var_count=%d\n", pnode->text, pchild->subframe_var_count);
|
||||
printf("POP SUBFRAME %s subframe_var_count=%d\n", pnode->text, pchild->subframe_var_count);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -664,8 +682,9 @@ static void stkalc_subframe_group_mutate_node_for_define(stkalc_subframe_group_t
|
|||
}
|
||||
}
|
||||
|
||||
// 'x = 1' is one of two things: (1) already defined in a higher subframe and referenced in the current subframe;
|
||||
// (2) not defined in a higher subframe, in which case it is hereby defined in the current subframe.
|
||||
// 'x = 1' is one of two things: (1) already defined in a higher subframe and
|
||||
// referenced in the current subframe; (2) not defined in a higher subframe, in
|
||||
// which case it is hereby defined in the current subframe.
|
||||
static void stkalc_subframe_group_mutate_node_for_write(stkalc_subframe_group_t* pframe_group, mlr_dsl_ast_node_t* pnode,
|
||||
char* desc, int trace)
|
||||
{
|
||||
|
|
@ -759,19 +778,6 @@ static void pass_2_for_top_level_block(mlr_dsl_ast_node_t* pnode, int trace) {
|
|||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
// xxx elaborate:
|
||||
//
|
||||
// 0:3 (0..2)
|
||||
// 1:5 (3..7)
|
||||
// 2:4 (8..1)
|
||||
// here 1u0 means: abs9
|
||||
// here 1u1 means: abs4
|
||||
// here 1u2 means: abs1
|
||||
// * go to array slot vardef_subframe_index
|
||||
// * there find the var_count_below
|
||||
|
||||
// xxx this is crying out for a managed struct
|
||||
static void pass_2_for_node(mlr_dsl_ast_node_t* pnode,
|
||||
int subframe_depth, int var_count_below_subframe, int var_count_at_subframe, int* pmax_var_depth,
|
||||
int* subframe_var_count_belows, int max_subframe_depth,
|
||||
|
|
@ -787,7 +793,7 @@ static void pass_2_for_node(mlr_dsl_ast_node_t* pnode,
|
|||
subframe_var_count_belows[subframe_depth] = var_count_below_subframe;
|
||||
if (trace) {
|
||||
leader_print(subframe_depth);
|
||||
printf("FRAME [%s] var_count_below=%d var_count_at=%d max_var_depth_so_far=%d subframe_depth=%d\n",
|
||||
printf("SUBFRAME [%s] var_count_below=%d var_count_at=%d max_var_depth_so_far=%d subframe_depth=%d\n",
|
||||
pnode->text, var_count_below_subframe, var_count_at_subframe, *pmax_var_depth, subframe_depth);
|
||||
}
|
||||
subframe_depth++;
|
||||
|
|
|
|||
|
|
@ -25550,12 +25550,12 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [f]
|
|||
ADD PARAMETER a @ 1s0
|
||||
ADD PARAMETER b @ 2s0
|
||||
ADD PARAMETER c @ 3s0
|
||||
PUSH FRAME cond_block
|
||||
PUSH SUBFRAME cond_block
|
||||
READ nonesuch ABSENT @ 0s0
|
||||
ADD DEFINE val @ 0s1
|
||||
PUSH FRAME while_block
|
||||
PUSH FRAME if_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME while_block
|
||||
PUSH SUBFRAME if_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ v PRESENT @ 1s4
|
||||
|
|
@ -25564,30 +25564,30 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [f]
|
|||
READ c PRESENT @ 3s0
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME if subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME if subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
READ k PRESENT @ 0s4
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME elif subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ k PRESENT @ 0s4
|
||||
READ v PRESENT @ 1s4
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME elif subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
ADD DEFINE sum @ 0s3
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE i @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
REUSE WRITE i @ 0s4
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE j @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
|
|
@ -25596,14 +25596,14 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [f]
|
|||
READ i PRESENT @ 0s4
|
||||
READ j PRESENT @ 0s5
|
||||
REUSE WRITE sum @ 0s3
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
READ sum PRESENT @ 0s3
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME elif subframe_var_count=1
|
||||
POP FRAME while subframe_var_count=0
|
||||
POP FRAME cond subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=1
|
||||
POP SUBFRAME while subframe_var_count=0
|
||||
POP SUBFRAME cond subframe_var_count=1
|
||||
BLOCK f subframe_var_count=4 max_subframe_depth=6
|
||||
|
||||
ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [s]
|
||||
|
|
@ -25611,12 +25611,12 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [s]
|
|||
ADD PARAMETER a @ 1s0
|
||||
ADD PARAMETER b @ 2s0
|
||||
ADD PARAMETER c @ 3s0
|
||||
PUSH FRAME cond_block
|
||||
PUSH SUBFRAME cond_block
|
||||
READ nonesuch ABSENT @ 0s0
|
||||
ADD DEFINE val @ 0s1
|
||||
PUSH FRAME while_block
|
||||
PUSH FRAME if_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME while_block
|
||||
PUSH SUBFRAME if_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ v PRESENT @ 1s4
|
||||
|
|
@ -25625,30 +25625,30 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [s]
|
|||
READ c PRESENT @ 3s0
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME if subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME if subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
READ k PRESENT @ 0s4
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME elif subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ k PRESENT @ 0s4
|
||||
READ v PRESENT @ 1s4
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME elif subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
ADD DEFINE sum @ 0s3
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE i @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
REUSE WRITE i @ 0s4
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE j @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
|
|
@ -25657,51 +25657,51 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR DEFINITION BLOCK [s]
|
|||
READ i PRESENT @ 0s4
|
||||
READ j PRESENT @ 0s5
|
||||
REUSE WRITE sum @ 0s3
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
READ sum PRESENT @ 0s3
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME elif subframe_var_count=1
|
||||
POP FRAME while subframe_var_count=0
|
||||
POP FRAME cond subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=1
|
||||
POP SUBFRAME while subframe_var_count=0
|
||||
POP SUBFRAME cond subframe_var_count=1
|
||||
BLOCK s subframe_var_count=4 max_subframe_depth=6
|
||||
|
||||
ALLOCATING RELATIVE (PASS-1) LOCALS FOR begin BLOCK
|
||||
ADD FOR ABSENT s @ 0u0
|
||||
PUSH FRAME cond_block
|
||||
PUSH SUBFRAME cond_block
|
||||
READ nonesuch ABSENT @ 0s0
|
||||
ADD DEFINE val @ 0s1
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE idx @ 0s2
|
||||
READ idx PRESENT @ 0s2
|
||||
READ idx PRESENT @ 0s2
|
||||
REUSE WRITE idx @ 0s2
|
||||
READ idx PRESENT @ 0s2
|
||||
PUSH FRAME if_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME if_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
READ k PRESENT @ 0s4
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME if subframe_var_count=0
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME if subframe_var_count=0
|
||||
READ idx PRESENT @ 0s2
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ k PRESENT @ 0s4
|
||||
READ v PRESENT @ 1s4
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME elif subframe_var_count=0
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
READ idx PRESENT @ 0s2
|
||||
PUSH FRAME elif_block
|
||||
PUSH SUBFRAME elif_block
|
||||
ADD DEFINE sum @ 0s3
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE i @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
REUSE WRITE i @ 0s4
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE j @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
|
|
@ -25710,53 +25710,53 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR begin BLOCK
|
|||
READ i PRESENT @ 0s4
|
||||
READ j PRESENT @ 0s5
|
||||
REUSE WRITE sum @ 0s3
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
READ sum PRESENT @ 0s3
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME elif subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME cond subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME cond subframe_var_count=1
|
||||
BLOCK begin subframe_var_count=1 max_subframe_depth=6
|
||||
|
||||
ALLOCATING RELATIVE (PASS-1) LOCALS FOR MAIN BLOCK
|
||||
ADD FOR ABSENT s @ 0u0
|
||||
PUSH FRAME cond_block
|
||||
PUSH SUBFRAME cond_block
|
||||
READ nonesuch ABSENT @ 0s0
|
||||
ADD DEFINE val @ 0s1
|
||||
PUSH FRAME while_block
|
||||
PUSH FRAME if_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME while_block
|
||||
PUSH SUBFRAME if_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ v PRESENT @ 1s4
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME if subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME if subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
READ k PRESENT @ 0s4
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME elif subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ k PRESENT @ 0s4
|
||||
READ v PRESENT @ 1s4
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME elif subframe_var_count=0
|
||||
PUSH FRAME elif_block
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
PUSH SUBFRAME elif_block
|
||||
ADD DEFINE sum @ 0s3
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE i @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
REUSE WRITE i @ 0s4
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE j @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
|
|
@ -25765,51 +25765,51 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR MAIN BLOCK
|
|||
READ i PRESENT @ 0s4
|
||||
READ j PRESENT @ 0s5
|
||||
REUSE WRITE sum @ 0s3
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
READ sum PRESENT @ 0s3
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME elif subframe_var_count=1
|
||||
POP FRAME while subframe_var_count=0
|
||||
POP FRAME cond subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=1
|
||||
POP SUBFRAME while subframe_var_count=0
|
||||
POP SUBFRAME cond subframe_var_count=1
|
||||
BLOCK main_block subframe_var_count=1 max_subframe_depth=6
|
||||
|
||||
ALLOCATING RELATIVE (PASS-1) LOCALS FOR end BLOCK
|
||||
ADD FOR ABSENT s @ 0u0
|
||||
PUSH FRAME cond_block
|
||||
PUSH SUBFRAME cond_block
|
||||
READ nonesuch ABSENT @ 0s0
|
||||
ADD DEFINE val @ 0s1
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE idx @ 0s2
|
||||
READ idx PRESENT @ 0s2
|
||||
READ idx PRESENT @ 0s2
|
||||
REUSE WRITE idx @ 0s2
|
||||
READ idx PRESENT @ 0s2
|
||||
PUSH FRAME if_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME if_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
READ k PRESENT @ 0s4
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME if subframe_var_count=0
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME if subframe_var_count=0
|
||||
READ idx PRESENT @ 0s2
|
||||
PUSH FRAME elif_block
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME elif_block
|
||||
PUSH SUBFRAME for
|
||||
ADD FOR-BIND k @ 0s4
|
||||
ADD FOR-BIND v @ 1s4
|
||||
READ k PRESENT @ 0s4
|
||||
READ v PRESENT @ 1s4
|
||||
POP FRAME for subframe_var_count=2
|
||||
POP FRAME elif subframe_var_count=0
|
||||
POP SUBFRAME for subframe_var_count=2
|
||||
POP SUBFRAME elif subframe_var_count=0
|
||||
READ idx PRESENT @ 0s2
|
||||
PUSH FRAME elif_block
|
||||
PUSH SUBFRAME elif_block
|
||||
ADD DEFINE sum @ 0s3
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE i @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
READ i PRESENT @ 0s4
|
||||
REUSE WRITE i @ 0s4
|
||||
PUSH FRAME for
|
||||
PUSH SUBFRAME for
|
||||
ADD DEFINE j @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
READ j PRESENT @ 0s5
|
||||
|
|
@ -25818,27 +25818,27 @@ ALLOCATING RELATIVE (PASS-1) LOCALS FOR end BLOCK
|
|||
READ i PRESENT @ 0s4
|
||||
READ j PRESENT @ 0s5
|
||||
REUSE WRITE sum @ 0s3
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
READ sum PRESENT @ 0s3
|
||||
REUSE WRITE val @ 0s1
|
||||
READ val PRESENT @ 0s1
|
||||
POP FRAME elif subframe_var_count=1
|
||||
POP FRAME for subframe_var_count=1
|
||||
POP FRAME cond subframe_var_count=1
|
||||
POP SUBFRAME elif subframe_var_count=1
|
||||
POP SUBFRAME for subframe_var_count=1
|
||||
POP SUBFRAME cond subframe_var_count=1
|
||||
BLOCK end subframe_var_count=1 max_subframe_depth=6
|
||||
|
||||
ALLOCATING ABSOLUTE (PASS-2) LOCALS FOR DEFINITION BLOCK [f]
|
||||
FRAME [f] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth=0
|
||||
SUBFRAME [f] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth=0
|
||||
NODE a 1s0 (0:0) -> 1
|
||||
NODE b 2s0 (0:0) -> 2
|
||||
NODE c 3s0 (0:0) -> 3
|
||||
FRAME [cond_block] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=1
|
||||
SUBFRAME [cond_block] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=1
|
||||
NODE val 0s1 (0:0,1:4) -> 4
|
||||
NODE nonesuch 0s0 (0:0,1:4) -> 0
|
||||
FRAME [while_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=2
|
||||
FRAME [if_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=3
|
||||
FRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [while_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=2
|
||||
SUBFRAME [if_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE v 1s4 (0:0,1:4,2:5,3:5,4:5) -> 6
|
||||
NODE val 0s1 (0:0,1:4,2:5,3:5,4:5) -> 4
|
||||
|
|
@ -25847,24 +25847,24 @@ FRAME [f] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth
|
|||
NODE b 2s0 (0:0,1:4,2:5,3:5,4:5) -> 2
|
||||
NODE c 3s0 (0:0,1:4,2:5,3:5,4:5) -> 3
|
||||
NODE val 0s1 (0:0,1:4,2:5,3:5,4:5) -> 4
|
||||
FRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
FRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
FRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
FRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE v 1s4 (0:0,1:4,2:5,3:5,4:5) -> 6
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE v 1s4 (0:0,1:4,2:5,3:5,4:5) -> 6
|
||||
FRAME [elif_block] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=3
|
||||
SUBFRAME [elif_block] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=3
|
||||
NODE sum 0s3 (0:0,1:4,2:5,3:5) -> 5
|
||||
FRAME [for] var_count_below=6 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [for] var_count_below=6 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
FRAME [for] var_count_below=7 var_count_at=1 max_var_depth_so_far=8 subframe_depth=5
|
||||
SUBFRAME [for] var_count_below=7 var_count_at=1 max_var_depth_so_far=8 subframe_depth=5
|
||||
NODE j 0s5 (0:0,1:4,2:5,3:5,4:6,5:7) -> 7
|
||||
NODE j 0s5 (0:0,1:4,2:5,3:5,4:6,5:7) -> 7
|
||||
NODE j 0s5 (0:0,1:4,2:5,3:5,4:6,5:7) -> 7
|
||||
|
|
@ -25878,16 +25878,16 @@ FRAME [f] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth
|
|||
NODE val 0s1 (0:0,1:4,2:5,3:5) -> 4
|
||||
|
||||
ALLOCATING ABSOLUTE (PASS-2) LOCALS FOR DEFINITION BLOCK [s]
|
||||
FRAME [s] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth=0
|
||||
SUBFRAME [s] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth=0
|
||||
NODE a 1s0 (0:0) -> 1
|
||||
NODE b 2s0 (0:0) -> 2
|
||||
NODE c 3s0 (0:0) -> 3
|
||||
FRAME [cond_block] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=1
|
||||
SUBFRAME [cond_block] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=1
|
||||
NODE val 0s1 (0:0,1:4) -> 4
|
||||
NODE nonesuch 0s0 (0:0,1:4) -> 0
|
||||
FRAME [while_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=2
|
||||
FRAME [if_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=3
|
||||
FRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [while_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=2
|
||||
SUBFRAME [if_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=5 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE v 1s4 (0:0,1:4,2:5,3:5,4:5) -> 6
|
||||
NODE val 0s1 (0:0,1:4,2:5,3:5,4:5) -> 4
|
||||
|
|
@ -25896,24 +25896,24 @@ FRAME [s] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth
|
|||
NODE b 2s0 (0:0,1:4,2:5,3:5,4:5) -> 2
|
||||
NODE c 3s0 (0:0,1:4,2:5,3:5,4:5) -> 3
|
||||
NODE val 0s1 (0:0,1:4,2:5,3:5,4:5) -> 4
|
||||
FRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
FRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
FRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
FRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=5 var_count_at=0 max_var_depth_so_far=7 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=2 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE v 1s4 (0:0,1:4,2:5,3:5,4:5) -> 6
|
||||
NODE k 0s4 (0:0,1:4,2:5,3:5,4:5) -> 5
|
||||
NODE v 1s4 (0:0,1:4,2:5,3:5,4:5) -> 6
|
||||
FRAME [elif_block] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=3
|
||||
SUBFRAME [elif_block] var_count_below=5 var_count_at=1 max_var_depth_so_far=7 subframe_depth=3
|
||||
NODE sum 0s3 (0:0,1:4,2:5,3:5) -> 5
|
||||
FRAME [for] var_count_below=6 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
SUBFRAME [for] var_count_below=6 var_count_at=1 max_var_depth_so_far=7 subframe_depth=4
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
NODE i 0s4 (0:0,1:4,2:5,3:5,4:6) -> 6
|
||||
FRAME [for] var_count_below=7 var_count_at=1 max_var_depth_so_far=8 subframe_depth=5
|
||||
SUBFRAME [for] var_count_below=7 var_count_at=1 max_var_depth_so_far=8 subframe_depth=5
|
||||
NODE j 0s5 (0:0,1:4,2:5,3:5,4:6,5:7) -> 7
|
||||
NODE j 0s5 (0:0,1:4,2:5,3:5,4:6,5:7) -> 7
|
||||
NODE j 0s5 (0:0,1:4,2:5,3:5,4:6,5:7) -> 7
|
||||
|
|
@ -25927,36 +25927,36 @@ FRAME [s] var_count_below=0 var_count_at=4 max_var_depth_so_far=4 subframe_depth
|
|||
NODE val 0s1 (0:0,1:4,2:5,3:5) -> 4
|
||||
|
||||
ALLOCATING ABSOLUTE (PASS-2) LOCALS FOR DEFINITION BLOCK [begin]
|
||||
FRAME [begin] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_depth=0
|
||||
FRAME [cond_block] var_count_below=1 var_count_at=1 max_var_depth_so_far=2 subframe_depth=1
|
||||
SUBFRAME [begin] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_depth=0
|
||||
SUBFRAME [cond_block] var_count_below=1 var_count_at=1 max_var_depth_so_far=2 subframe_depth=1
|
||||
NODE val 0s1 (0:0,1:1) -> 1
|
||||
NODE nonesuch 0s0 (0:0,1:1) -> 0
|
||||
FRAME [for] var_count_below=2 var_count_at=1 max_var_depth_so_far=3 subframe_depth=2
|
||||
SUBFRAME [for] var_count_below=2 var_count_at=1 max_var_depth_so_far=3 subframe_depth=2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
FRAME [if_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=3 subframe_depth=3
|
||||
FRAME [for] var_count_below=3 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
SUBFRAME [if_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=3 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=3 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
FRAME [elif_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
FRAME [for] var_count_below=3 var_count_at=2 max_var_depth_so_far=5 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=3 var_count_at=2 max_var_depth_so_far=5 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:3,4:3) -> 4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:3,4:3) -> 4
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
FRAME [elif_block] var_count_below=3 var_count_at=1 max_var_depth_so_far=5 subframe_depth=3
|
||||
SUBFRAME [elif_block] var_count_below=3 var_count_at=1 max_var_depth_so_far=5 subframe_depth=3
|
||||
NODE sum 0s3 (0:0,1:1,2:2,3:3) -> 3
|
||||
FRAME [for] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=4
|
||||
SUBFRAME [for] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
FRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=6 subframe_depth=5
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=6 subframe_depth=5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:3,4:4,5:5) -> 5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:3,4:4,5:5) -> 5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:3,4:4,5:5) -> 5
|
||||
|
|
@ -25970,36 +25970,36 @@ FRAME [begin] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_d
|
|||
NODE val 0s1 (0:0,1:1,2:2,3:3) -> 1
|
||||
|
||||
ALLOCATING ABSOLUTE (PASS-2) LOCALS FOR DEFINITION BLOCK [main_block]
|
||||
FRAME [main_block] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_depth=0
|
||||
FRAME [cond_block] var_count_below=1 var_count_at=1 max_var_depth_so_far=2 subframe_depth=1
|
||||
SUBFRAME [main_block] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_depth=0
|
||||
SUBFRAME [cond_block] var_count_below=1 var_count_at=1 max_var_depth_so_far=2 subframe_depth=1
|
||||
NODE val 0s1 (0:0,1:1) -> 1
|
||||
NODE nonesuch 0s0 (0:0,1:1) -> 0
|
||||
FRAME [while_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=2 subframe_depth=2
|
||||
FRAME [if_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=2 subframe_depth=3
|
||||
FRAME [for] var_count_below=2 var_count_at=2 max_var_depth_so_far=4 subframe_depth=4
|
||||
SUBFRAME [while_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=2 subframe_depth=2
|
||||
SUBFRAME [if_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=2 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=2 var_count_at=2 max_var_depth_so_far=4 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:2,4:2) -> 2
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:2,4:2) -> 3
|
||||
NODE val 0s1 (0:0,1:1,2:2,3:2,4:2) -> 1
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:2,4:2) -> 3
|
||||
NODE val 0s1 (0:0,1:1,2:2,3:2,4:2) -> 1
|
||||
FRAME [elif_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
FRAME [for] var_count_below=2 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=2 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:2,4:2) -> 2
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:2,4:2) -> 2
|
||||
FRAME [elif_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
FRAME [for] var_count_below=2 var_count_at=2 max_var_depth_so_far=4 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=2 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=2 var_count_at=2 max_var_depth_so_far=4 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:2,4:2) -> 2
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:2,4:2) -> 3
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:2,4:2) -> 2
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:2,4:2) -> 3
|
||||
FRAME [elif_block] var_count_below=2 var_count_at=1 max_var_depth_so_far=4 subframe_depth=3
|
||||
SUBFRAME [elif_block] var_count_below=2 var_count_at=1 max_var_depth_so_far=4 subframe_depth=3
|
||||
NODE sum 0s3 (0:0,1:1,2:2,3:2) -> 2
|
||||
FRAME [for] var_count_below=3 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
SUBFRAME [for] var_count_below=3 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:2,4:3) -> 3
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:2,4:3) -> 3
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:2,4:3) -> 3
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:2,4:3) -> 3
|
||||
FRAME [for] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=5
|
||||
SUBFRAME [for] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:2,4:3,5:4) -> 4
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:2,4:3,5:4) -> 4
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:2,4:3,5:4) -> 4
|
||||
|
|
@ -26013,36 +26013,36 @@ FRAME [main_block] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subfr
|
|||
NODE val 0s1 (0:0,1:1,2:2,3:2) -> 1
|
||||
|
||||
ALLOCATING ABSOLUTE (PASS-2) LOCALS FOR DEFINITION BLOCK [end]
|
||||
FRAME [end] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_depth=0
|
||||
FRAME [cond_block] var_count_below=1 var_count_at=1 max_var_depth_so_far=2 subframe_depth=1
|
||||
SUBFRAME [end] var_count_below=0 var_count_at=1 max_var_depth_so_far=1 subframe_depth=0
|
||||
SUBFRAME [cond_block] var_count_below=1 var_count_at=1 max_var_depth_so_far=2 subframe_depth=1
|
||||
NODE val 0s1 (0:0,1:1) -> 1
|
||||
NODE nonesuch 0s0 (0:0,1:1) -> 0
|
||||
FRAME [for] var_count_below=2 var_count_at=1 max_var_depth_so_far=3 subframe_depth=2
|
||||
SUBFRAME [for] var_count_below=2 var_count_at=1 max_var_depth_so_far=3 subframe_depth=2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
FRAME [if_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=3 subframe_depth=3
|
||||
FRAME [for] var_count_below=3 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
SUBFRAME [if_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=3 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=3 var_count_at=1 max_var_depth_so_far=4 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
FRAME [elif_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
FRAME [for] var_count_below=3 var_count_at=2 max_var_depth_so_far=5 subframe_depth=4
|
||||
SUBFRAME [elif_block] var_count_below=3 var_count_at=0 max_var_depth_so_far=4 subframe_depth=3
|
||||
SUBFRAME [for] var_count_below=3 var_count_at=2 max_var_depth_so_far=5 subframe_depth=4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:3,4:3) -> 4
|
||||
NODE k 0s4 (0:0,1:1,2:2,3:3,4:3) -> 3
|
||||
NODE v 1s4 (0:0,1:1,2:2,3:3,4:3) -> 4
|
||||
NODE idx 0s2 (0:0,1:1,2:2) -> 2
|
||||
FRAME [elif_block] var_count_below=3 var_count_at=1 max_var_depth_so_far=5 subframe_depth=3
|
||||
SUBFRAME [elif_block] var_count_below=3 var_count_at=1 max_var_depth_so_far=5 subframe_depth=3
|
||||
NODE sum 0s3 (0:0,1:1,2:2,3:3) -> 3
|
||||
FRAME [for] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=4
|
||||
SUBFRAME [for] var_count_below=4 var_count_at=1 max_var_depth_so_far=5 subframe_depth=4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
NODE i 0s4 (0:0,1:1,2:2,3:3,4:4) -> 4
|
||||
FRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=6 subframe_depth=5
|
||||
SUBFRAME [for] var_count_below=5 var_count_at=1 max_var_depth_so_far=6 subframe_depth=5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:3,4:4,5:5) -> 5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:3,4:4,5:5) -> 5
|
||||
NODE j 0s5 (0:0,1:1,2:2,3:3,4:4,5:5) -> 5
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ HYGIENE FOR 4.6.0:
|
|||
* clean up local-stack macrofuncs (hide ifdeffing from callsites)
|
||||
* xxxes
|
||||
|
||||
* 'semantic analysis': use this to describe CST-build-time checks
|
||||
* 'object binding': use this to describe linking func/subr defs and callsites
|
||||
* separate verbosity for allocator? and invoke it in UT cases specific to this?
|
||||
-> (note allocation marks in the AST will be printed regardless)
|
||||
|
||||
----------------------------------------------------------------
|
||||
DOC FOR 4.6.0:
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@ static char * test_numbers() {
|
|||
printf("newval log(x) = %s\n", mv_describe_val(valplogx));
|
||||
printf("newval 2*log(x) = %s\n", mv_describe_val(valp2logx));
|
||||
|
||||
printf("XXX %s\n", mt_describe_type(valp2.type));
|
||||
mu_assert_lf(valp2.type == MT_FLOAT);
|
||||
mu_assert_lf(valp4.type == MT_FLOAT);
|
||||
mu_assert_lf(valpx.type == MT_FLOAT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue