mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-24 00:18:39 +00:00
neaten
This commit is contained in:
parent
e3d6f7cbe0
commit
9bc26d68e3
1 changed files with 18 additions and 2 deletions
|
|
@ -47,10 +47,26 @@
|
|||
// i = z; # LHS is local 4 at current level;
|
||||
// # RHS is unresolved -> slot 0 at current level.
|
||||
// } #
|
||||
//
|
||||
// Notes:
|
||||
//
|
||||
// * Pass 1 computes frame-relative indices and upstack-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 'b = 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
|
||||
// known until all AST nodes in the top-level block have been visited.
|
||||
//
|
||||
// * 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.
|
||||
// ================================================================
|
||||
|
||||
// xxx absent
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// xxx to do:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue