From bfc81fe0cb680d95ae8fc91ec94562d2df6e12e4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 18 Apr 2018 06:17:48 -0700 Subject: compiler: bump object file version. The instruction set architecture has changed due to the redimensioning of the frame display, so we must bump up the major number. * share/txr/stdlib/compiler.tl (%tlo-ver%): Change to (1 0). * parser.c (read_file_common): Refuse to load if major number isn't 1. --- parser.c | 4 ++-- share/txr/stdlib/compiler.tl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parser.c b/parser.c index 93d9703c..14bad41e 100644 --- a/parser.c +++ b/parser.c @@ -629,9 +629,9 @@ static val read_file_common(val stream, val error_stream, val compiled) if (compiled && first) { val major = car(form); - if (gt(major, zero)) + if (neq(major, one)) uw_throwf(error_s, - lit("cannot load ~s; it was compiled by a newer implementation"), + lit("cannot load ~s; version number mismatch"), stream, nao); big_endian = caddr(form); first = nil; diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index f649b8e9..8b705835 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -1397,7 +1397,7 @@ (defvarl %big-endian% (equal (ffi-put 1 (ffi uint32)) #b'00000001')) -(defvarl %tlo-ver% ^(0 0 ,%big-endian%)) +(defvarl %tlo-ver% ^(1 0 ,%big-endian%)) (defun open-compile-streams (in-path out-path) (let* ((rsuff (r$ %file-suff-rx% in-path)) -- cgit v1.2.3