diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-10-26 07:25:51 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-10-26 07:25:51 -0700 |
commit | 9733bb6dad3b0c430a82b2592d5519383479cb86 (patch) | |
tree | b894ea6b0a6022e2f5700b1a3e362c721977d9b3 /parser.c | |
parent | c4d91d0128dd998a73d216fe7bb0132c41d901bc (diff) | |
download | txr-9733bb6dad3b0c430a82b2592d5519383479cb86.tar.gz txr-9733bb6dad3b0c430a82b2592d5519383479cb86.tar.bz2 txr-9733bb6dad3b0c430a82b2592d5519383479cb86.zip |
compiler: use symtab caching for global lexicals.
* parser.c (read_file_common): Allow version three
object files.
* share/txr/stdlib/compiler.tl (compiler comp-var): If a
global variable isn't special, then treat it via the getlx
instruction. The symbol gets added to the symtab, and
referenced by index number.
(compiler comp-setq): Similarly, treat a non-special
global variable using the setlx instruction.
(%tlo-ver%): We bump the major version of .tlo files
from 2 to 3, since old txr executables won't recognize
these new instructions. However, we are backward compatible;
hence read_file_common still allows version 2.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -636,7 +636,7 @@ static val read_file_common(val stream, val error_stream, val compiled) if (compiled && first) { val major = car(form); - if (lt(major, one) || gt(major, two)) + if (lt(major, one) || gt(major, three)) uw_throwf(error_s, lit("cannot load ~s: version number mismatch"), stream, nao); |