On Thu, Jun 13, 2002 at 04:37:37PM +0100, Christophe Rhodes wrote:
> On Thu, Jun 13, 2002 at 07:25:11AM -0500, William Harold Newman wrote:
> > I think we could borrow another idea from the water/Atlas school of
> > design (on yesterday's IRC discussion) to tidy up the patch by making
> > the package hacking more localized (shadowing each thing only once
> > instead of a dozen times) and by making a distinction between packages
> > to reflect a difference in function. Roughly:
> > * Stop using the SB-XC package to hold all the new BYTE machinery.
> > (I.e. BYTE, LDB, etc.) Put it someplace else, e.g. REIFIED-CL.
> > * Throughout package-data-list.lisp-expr, replace :USE "CL" with
> > :USE "REIFIED-CL".
> > * (Now SB-XC is used basically for things which need both host and
> > target versions, e.g. MOST-POSITIVE-SINGLE-FLOAT, where we want
> > to define a target version but don't want to overwrite the host
> > version. And REIFIED-CL is used for things where we can safely
> > "overwrite" (actually shadow) the host's machinery with augmented
> > machinery which still conforms exactly to ANSI CL, giving most of
> > our code a playpen where it can be oblivious to the cleverness
> > which was used to set up REIFIED-CL so that the reified host
> > uses SBCL-style representation of BYTE.)
> There is one minor catch with this -- it has to play nice with the
> genesis packaging tricks (automagically converting SB-XC symbols to be
> dumped as CL symbols, and the like). I think I would prefer, at least
> initially, to investigate moving the package-data.lisp-expr mechanism to
> a DEFPACKAGE-oriented mechanism (which would get us :SHADOWING-IMPORT
> for free), and then thinking about the above plan. But since both are
> probably good aims, I've no objection to it being done the other way
I agree genesis.lisp would need to be changed, but I think the change
would be very simple. Basically, in the proposed scheme the xc host's
"CL" package disappears before the main body of the cross-compiler
sees it. (CL is used by src/cold/ stuff to set up SB-REIFIED, which I
referred to as REIFIED-CL above. But code outside src/cold/ always
uses SB-REIFIED.) Thus from GENESIS' point of view, symbols that in
the old way were in CL are now expected in SB-REIFIED instead. So
genesis.lisp should never be asked to dump any
in-CL-but-not-in-SB-REIFIED symbols, and should handle SB-REIFIED
symbols exactly the way that it used to handle host CL symbols (i.e.
dumping them as target CL symbols).
So anything which used to check for "COMMON-LISP", e.g. the FIND in
PACKAGE-OK-FOR-TARGET-SYMBOL-P, now tests for "SB-REIFIED", but
basically otherwise acts the same.
William Harold Newman <william.newman@...>
Ave, computer - codituri te salutant!
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C