|
From: Christophe R. <cs...@ca...> - 2021-01-22 20:49:42
|
Douglas Katzman <do...@go...> writes: > There are other constructs which are more terrifying to me than gensym. > e.g. anywhere in src/compiler/dump or src/compiler/ir1util that use > TYPECASE, it's probably using the wrong TYPEP - the CL: one, for testing > target objects. How can we deal with that? > I'm not saying gensyms aren't important, but I don't see how using _our_ > gensym can ever be the wrong thing, but I can see clear ways that using the > host's TYPEP could be wrong. Right, I don't think using the host's gensym or ours can ever lead to a miscompile, but the hope in getting to reproducible, identical files is that more subtle miscompiles / semantics changes show up in fasls in a robust way. The way that using our gensym can lead to differences in fasls is that the host CL expanding a host macro is allowed to run the expander function an arbitrary number of times. If that host macro uses SBCL's gensym, then SBCL's gensym counter will be incremented an arbitrary number of times, leading to differences in numbering when cross-compiler macros are expanded and used. Again, not a thing that actually affects the semantics of the resulting code, but a visible binary difference in output files. Cheers, Christophe |