diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-04-06 06:49:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-04-06 06:49:23 -0700 |
commit | 8a9159263d4ca1b174a60476e3863c45d9e63cc1 (patch) | |
tree | 102511afd760aaf388c753a10f273a5a64bfd829 /Makefile | |
parent | 668b7ab58822dd14ac54061373a09a1311748acf (diff) | |
download | txr-8a9159263d4ca1b174a60476e3863c45d9e63cc1.tar.gz txr-8a9159263d4ca1b174a60476e3863c45d9e63cc1.tar.bz2 txr-8a9159263d4ca1b174a60476e3863c45d9e63cc1.zip |
stdlib: all code read under sys package.
Another part of the preparation for an upcoming change.
All library code is now read in the sys package, so any
symbols that are interned (local variables and whatnot)
are in sys and will not be exposed to user code.
We have to overcome some annoyances to achieve this:
- We have to stay away from the symbols exp or var,
because they are now sys:exp and sys:var with their
special meaning.
- Instances in which a symbol of the same name exists
in both sys and usr present a problem; the plain
symbol now is the usr one. For instance rplaca
will refer to sys:rplaca, so a small amount of
code has to explicitly use usr:rplaca.
* Makefile (COMPILE_TL): Change to the sys package before
compiling library code.
* lisplib.c (lisplib_try_load): Bind *package* to the system
package.
* share/txr/stdlib/asm.tl, share/txr/stdlib/compiler.tl:
Remove in-package macro invocation; we don't need this since
all files are loaded or compiled in the sys package.
* share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl,
share/txr/stdlib/conv.tl, share/txr/stdlib/doloop.tl,
share/txr/stdlib/error.tl, share/txr/stdlib/error.tl,
share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl,
share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl,
share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl,
share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl,
share/txr/stdlib/package.tl, share/txr/stdlib/path-test.tl,
share/txr/stdlib/place.tl, share/txr/stdlib/pmac.tl,
share/txr/stdlib/socket.tl, share/txr/stdlib/stream-wrap.tl,
share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl,
share/txr/stdlib/termios.tl, share/txr/stdlib/trace.tl
share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl,
share/txr/stdlib/ver.tl, share/txr/stdlib/with-resources.tl,
share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl:
Deal with the various usr versus sys symbol issues.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -144,7 +144,8 @@ endef define COMPILE_TL $(call ABBREV,TXR) -$(call SH,$(TXR) -e "(compile-file \"$<\" \"$@.tmp\")") +$(call SH,$(TXR) -e \ + "(progn (in-package sys) (compile-file \"$<\" \"$@.tmp\"))") $(call SH,mv $@.tmp $@) endef |