[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: must be recompiled



  I ask because it would be nice if we could share FAS files between
  different platforms.
This was my motivation when I discussed this with Bruno (via email).
Unfortunately I haven't gotten around to DOING anything about it yet.  
If I'm lucky someone else out there will beat me to it.  In the mean
while, if I answer this quickly perhaps I'll save Bruno the trouble.

The "must be recompiled" message results from differences between the 
loading environment and compiling ennvironment, described in the version 
expression at the top of the compiled file.  The version contains
1. clisp2 or clisp3
2. *jmpbuf-size*
3. *big-endian*
4. the date on which the compiler was last changed in an incompatible
way.  Different changes result in different incompatibilities and I
do not think we should hope to load files compiled by different 
compiler versions.  I only hope to eliminate incompatibilities from
the other three.

#1 is clisp2 if C can manipulate the SP stack pointer, otherwise clisp3.
#2 is a positive integer
#3 is T or NIL

#1,2,3 are all related to the format of compiled code in memory.  I
believe the compiler currently builds the compiled code in memory and
then writes it out to produce a compiled file.  Unfortunately this
loses some data that could be used to produce one compiled file for
all cases.  Ideally the compiler should build another structure with
the extra information.  That structure would be written to the
compiled file.  It would be translated into a run time version in
order to run it (this is what the loader would do too.)

Clisp3 interpreters use an extra word (maximum stack depth).
Obviously this extra data should be computed on machines that don't
need it if we want to use the compiled code on machines that do.

The compiled code contains in some places a number that is computed
by the compiler as (*jmpbuf-size* * x) + y.  If the compiler were
altered slightly, it could remember x and y, and store both of those
in the compiled file.  Then the loader could compute the right value
for the loading machine.  

#3 could be fixed by changing the loader (the #Y read macro) to swap
various bytes on machines that need it.

All of the necesssary info appears to be in the file compiler.lsp.
Unfortunately (for me), the comments, which I imagine would be quite
helpful, are in German.