diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-04-05 06:43:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-04-05 06:43:10 -0700 |
commit | 34efdb8b2e45eb6543a8fbaadf8867ee58870677 (patch) | |
tree | 6feeb4ac8fedb92fbda651407fb4493a732653ad /tests/016 | |
parent | 4561d4e6be6ffa6ef7b282b9a72ce966625382c3 (diff) | |
download | txr-34efdb8b2e45eb6543a8fbaadf8867ee58870677.tar.gz txr-34efdb8b2e45eb6543a8fbaadf8867ee58870677.tar.bz2 txr-34efdb8b2e45eb6543a8fbaadf8867ee58870677.zip |
compile-file: handle gensyms and such.
* parser.c (read_file_common): The entire compiled
representation is now one big list. We must walk the list to
visit the individual compiled top-level forms.
* share/txr/stdlib/compiler.tl (compile-file): Collect all the
compiled top-level forms into one list, and emit it as one
object. This way, gensym references among the items will
resolve; for instance tests/012/man-or-boy.tl now compiles.
That file defines a function named by a gensym, and a macro
which expands to calls to that function. These end up in
separate top-level forms and have to resolve.
Because we are emitting everything as one big object, we
cannot rely on (in-package ...) forms influencing the reading
of the symbols. So we create a dummy package and switch to
that during the writing, which forces all symbols to be fully
qualified.
Diffstat (limited to 'tests/016')
0 files changed, 0 insertions, 0 deletions