Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!hsdndev!husc6!carlton From: carlton@husc10.harvard.edu (david carlton) Newsgroups: comp.lang.scheme Subject: Re: evaluating () should be an error Message-ID: Date: 30 Mar 91 07:38:09 GMT References: <1991Mar24.064144.4256@daffy.cs.wisc.edu> <515sis-d@@massey.ac.nz> Sender: news@husc6.harvard.edu Organization: Citizens for Boysenberry Jam Lines: 24 In-reply-to: E.Ireland@@massey.ac.nz's message of 24 Mar 91 22:14:02 GMT (In response to a discussion of return values of set!, etc.) A Scheme implementation that I am working on currently has many of the functions whose return values are undefined return pseudo-random integers, since it happens that an untagged pointer to an object is sitting in the return value register when they return, and untagged pointers look like integers. This will probably disappear soon, however, since when I wrote those pieces of code I didn't understand some things about Scheme compiling which I do now and which will make things much faster and which will almost all untagging. But I can well imagine that in an implementation which inlines these functions and which does fairly sophisticated register allocation it may happen that different values are 'returned' by such functions/special forms, since it may simply be more efficient in some instances to never touch the return value register, say, when compiling a certain instance of set!, and so whatever value happened to be sitting in the return value register when the set! happened will get returned, and that value could be the value of the previous expression, a scratch value, or really almost anything. david carlton carlton@husc10.harvard.edu