On Wed, May 22, 2002 at 10:43:23PM +0200, Antonio Martínez wrote:
> I made the following changes to SBCL to try and avoid interactive
> building (diffs below):
> - added a RESTART-CASE to COMPILE-STEM in src/cold/shared.lisp,
> with a RECOMPILE restart. If something goes wrong, I edit the
> file and then call the recompile restart with fingers crossed.
> (This was marked as a FIXME.)
> - added appropriate IGNORE declaration to src/code/late-type.lisp.
> I think the last change, which I haven't done yet (someone who knows
> the source wouldn't long, but I'm still trying to grok DEFINE-VOP),
> would be:
> - in src/compiler/target/nlx.lisp, in the SAVE-DYNAMIC-STATE and
> RESTORE-DYNAMIC-STATE VOPS, the EVAL provokes an unused variable
> For now, I just press the CONTINUE button and the build finishes
> Here are the diffs, which I may have buggered up, since I don't do
> diffs very often. If so, just flame me, and I'll see if I can send
> better diffs.
I just merged them in 0.7.4.2.
Since you weren't sure about how best to do the diffs, I'll give some
suggestions. The diffs are correctly formatted, and they work, but
it's generally better to submit diffs in a format which includes
context, i.e. either "context" format or "unified" format. (You can
select those formats by using "-c" or "-u" options to "diff" or "cvs
In the diff format you used, the change for late-type.lisp.diff looks
> (declare (ignore type1))
which means "insert this text *at* line 2152". A unified diff (in this
case output from "cvs diff -u" in my changed version) looks like
@@ -2166,6 +2166,7 @@
(values nil certain?))))))
(!define-type-method (union :complex-=) (type1 type2)
+ (declare (ignore type1))
(if (some #'hairy-type-p (union-type-types type2))
(values nil nil)
(values nil t)))
meaning "insert this text *in* *this* *context* *near* line 2166". The
difference is important when other changes are made to the file
between the time you make the patch and the time the patch is applied
(like the way that Christophe Rhodes patched late-type.lisp in
sbcl-0.7.4.1). In that case, the unified diff has a pretty good chance
of staying correct, and if not has a pretty good chance of failing
with an error message; while absolute diff just blindly creates
nonsense by inserting the line in the old absolute location (which now
has the wrong context) without issuing an error message. E.g. after
the changes in sbcl-0.7.4.1, line 2152 of late-type.lisp is no longer
in any function body, so a DECLARE isn't legal there. The context diff
shows what things look like at line 2166, which is where I ended up
putting the new DECLARE, which I assume is the change you intended.
Also, though for two files it doesn't really matter, if someday you do
something complicated which changes many files, you'll probably want
to make a single patch file updating all changed files by using "cvs
diff" (or, IIRC, "diff -r"). This saves a little time per file both
for the person creating the patch (who can create the whole thing in a
single "cvs diff" or "diff" command) and for the person applying the
patch (who can apply the whole thing with a single "patch" command).
However, none of this nitpicking about patch formats should suggest
that the patch isn't appreciated. Thank you!
William Harold Newman <william.newman@...>
"When I am picking problems to work on, ones that stumped John von
Neumann go at the bottom of the stack."
-- <http://www.daviddfriedman.com/laws_order/index.shtml>, ch. 8
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C