Ar an ceathrú lá déag de mí Lúnasa, scríobh Stephen J. Turnbull:
> > > Doing this with an eval-when-compile is kind of evil, since it makes
> > > the semantics of compiled code different from interpreted code.
> >
> > Hmm? Not in a significant way;
>
> Eh? Interpreted code *won't work correctly in 21.5* as I understand
> it. No? Or is that only in the case of the "needed patches" you
> refer to above?
1) Interpreted code that uses the multiple-values functions consistently
will continue to work in as far as it ever did in 21.4, and will work
correctly in 21.5-with-multiple-values.
2) Code compiled by 21.4, that uses the multiple-values functions, and
without patch http://mid.gmane.org/19070.60359.500812.167386＠parhasard.net,
will have subtle problems when run in 21.5 with the multiple-values patch.
This is because it assumes that #'values is an alias for #'list, and that
#'values-list is an alias for #'identity, and that these aliases are
available at runtime. Most of the package changes just remove the third
assumption, and the forms that deal with multiple values (the expansion of
#'multiple-value-bind, most relevantly) continue to get presented with
lists.
3) Code compiled by 21.4 and executed by it, that uses the multiple-values
functions, will work correctly in as far as it ever did.
4) Code compiled by 21.5-with-multiple-values and executed by it, that uses
the multiple-values functions, will work correctly.
5) Code compiled by 21.5-with-multiple-values and executed by 21.4, that uses
the multiple-values functions, will throw an error at the start of the file.
6) Code compiled by 21.5-without-multiple-values, that uses the
multiple-values functions, will work as far as it ever did.
(Also, by “telling people” I meant telling the beta testers encountering the
subtle problems in 2) how to address them, not talking with Vin or Norbert.)
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches

Ar an ceathrú lá déag de mí Lúnasa, scríobh Stephen J. Turnbull:
> Aidan Kehoe writes:
>
> > 2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
> >
> > * ilisp-snd.el:
> > Transform #'values calls to #'list calls at compile time if the
> > current XEmacs doesn't support true multiple values.
>
> Wouldn't it be better to do this in the 21.4 byte-compiler? (I'm
> referring to the whole sequence of package patches.)
Right, that’s what
http://mid.gmane.org/19070.60359.500812.167386＠parhasard.net does.
However, Norbert’s quicker about making modified packages available than Vin
is about making modified 21.4 versions available (something which is as it
should be), and I’m more comfortable telling people who encounter the
incompatibility to install a package from the beta/experimental directory
than to wait until there’s a 21.4 release and there are new .tar.gz files
for all the affected packages.
Some of the package patches are distinct, though. They are examples where
multiple-value-bind was never conceptually correct (that is, there wasn’t a
corresponding #'values call, just one to #'list or something analogous), and
#'destructuring-bind or a non-erroring analogue is better code in those
contexts.
> The only code we really care about here, I think, is the code we put into
> the packages. Users who want to share across versions will just have to
> upgrade their 21.4.
That reminds me; the multiple-values patch makes #'throw into a special
form, since it needs to examine its arguments into a way that functions
don’t (#'throw is also a special form, sorry, special operator in Common
Lisp, for the same reason.) It also has a special bytecode for throw. Now,
code compiled by 21.5 with the multiple-values patch that uses the
multiple-values functionality will refuse to run on 21.4; which is fair
enough, as far as I can see. Code that uses #'throw (that is, most code), is
also affected, though there is a separate check at the beginning of every
file; I wonder is it reasonable to add a minimal patch to 21.4 to support
the throw bytecode.
> Doing this with an eval-when-compile is kind of evil, since it makes
> the semantics of compiled code different from interpreted code.
Hmm? Not in a significant way; it’s just that the alias now takes effect at
compile time, not runtime, something we know worked fine in 21.5 for years.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches