summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parser.c8
-rw-r--r--stdlib/compiler.tl2
-rw-r--r--txr.13
3 files changed, 11 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index bac9483b..4bb88467 100644
--- a/parser.c
+++ b/parser.c
@@ -863,10 +863,16 @@ static val read_file_common(val self, val stream, val error_stream, val compiled
if (compiled && first) {
val major = car(form);
- if (neq(major, num_fast(6)) && neq(major, num_fast(7)))
+ val minor = cadr(form);
+
+ if (lt(major, num_fast(6)) || gt(major, num_fast(8)) ||
+ (major == num_fast(8) && minor != zero))
+ {
uw_throwf(error_s,
lit("cannot load ~s: version number mismatch"),
stream, nao);
+ }
+
big_endian = caddr(form);
first = nil;
version_form = form;
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl
index 6a5e189f..fc0e9140 100644
--- a/stdlib/compiler.tl
+++ b/stdlib/compiler.tl
@@ -2566,7 +2566,7 @@
(defvarl %big-endian% (equal (ffi-put 1 (ffi uint32)) #b'00000001'))
-(defvarl %tlo-ver% ^(7 0 ,%big-endian%))
+(defvarl %tlo-ver% ^(8 0 ,%big-endian%))
(defvarl %package-manip% '(make-package delete-package
use-package unuse-package
diff --git a/txr.1 b/txr.1
index b5a442e7..3a63ff71 100644
--- a/txr.1
+++ b/txr.1
@@ -95099,6 +95099,9 @@ Version 261 introduces JSON
syntax. Compiled code which contains embedded JSON literals
is not loadable by \*(TX 260 and older.
+Version 301 produces version 8.0 files and loads version 8.0
+files, as well as version 6 and 7 files regardless of minor number.
+
.SS* Recommendations for Unused Variable Diagnostics
By default, the