diff options
-rw-r--r-- | parser.c | 8 | ||||
-rw-r--r-- | stdlib/compiler.tl | 2 | ||||
-rw-r--r-- | txr.1 | 3 |
3 files changed, 11 insertions, 2 deletions
@@ -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 @@ -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 |