summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-02-09 15:07:58 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-02-09 15:07:58 -0800
commit42e924796096757b05bb2a2a6b205699e5f292ee (patch)
treec4cd389866a7bf98dcd2bab1d6be31afcbcc8bf4 /struct.c
parent219f2443f6fa50a85d4c29d2a2202f2258b916ac (diff)
downloadtxr-42e924796096757b05bb2a2a6b205699e5f292ee.tar.gz
txr-42e924796096757b05bb2a2a6b205699e5f292ee.tar.bz2
txr-42e924796096757b05bb2a2a6b205699e5f292ee.zip
Extend functionality of sys:expand-with-free-refs.
This function's return list now has two additional elements. The first two elements give, respectively, the free variables and functions which occur in the form: variables and functions which have no lexical binding. As before, these lists omit the variables which do have bindings in the specified environment that is passed as an argument. The two new elements give, respectively, all variable and function references emanating out of the form, regardless of whether they have bindings in the form's surrounding lexical environment or whether they are free. The function also takes a new argument: an additional environment beyond which the erasure of bindings doesn't take place. * eval.c (squash_menv_deleting_range): New static function. (gather_free_refs): Do not intercept non-deferrable warnings. (gather_free_refs_nw): New static function. (expand_with_free_refs): Expand the form twice, the second time with a collapsed environment which has been stripped of all macros and of all var shadowing entries in a specified range, using the squash_menv_deleting_range function. The second pass yields the extra variables and functions. Also take a second env argument for this purpose. (eval_init): Register sys:expand-with-free-refs as a three argument function with one optional argument.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions