From fdbe06cd26523f3ccc7670146a696a88e8c7fb87 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 19 Jun 2025 00:50:48 -0700 Subject: compiler/load: tlo version number increment, The new tail call optimization relies on a fix to the VM's block instruction. This means that .tlo files in which TCO has been applied might not run correctly with TXR 300 or older. For that reason, we bump up the version number. * parser.c (read_file_common): Accept version 8.0 files, while continuing to allow 6 and 7 regardless of minor number. We get picky about minor number so that in the future we can use a a minor number increment for backward compatible changes like this. We would only like to go to version 9 if the VM changes in such a way that we cannot load 8 any more. If we can still load 8.0, we would like to go to 8.1. * stdlib/compiler.tl (%tlo-ver%): Change to 8.0. * txr.1: Documented. --- parser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'parser.c') 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; -- cgit v1.2.3