[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A plea for a new old language



At 12:48 PM -0400 5/9/03, Geoffrey Knauth wrote:
>On Friday, May 9, 2003, at 11:00 US/Eastern, Dan Sugalski wrote:
>>thinking about it it actually makes long-term expansion of the VM 
>>with backward compatibility easier, since if there are more 
>>lexically scoped things added later (say, event mask/level, or IO 
>>filters, or something) old code will still preserve them right on a 
>>call since the "make CPS thingie" op would get beefed up to know 
>>about the new things
>
>Is there a danger that "make CPS thingie," done on every call, could 
>become too heavyweight?

Potentially, but since we can't, at compile time, know if the code 
we're calling alters any of the stuff we're interested in, we need to 
preserve it all. OTOH, building a set of constructors that exclude 
particular pieces, since we don't care about them, isn't that tough.

The construction cost should actually be pretty small, as it's just a 
matter of snagging a bunch of pointers and saving them. (Though 
closing off the stack frames could be pricier, but that the compilers 
can do, and probably should anyway) Invoking the CPS thingie is also 
equally quick--restore some pointers and dispatch to the stored 
return location.

The bigger issue, for us at least, is the GC, since I think I'd want 
to special-case the pointer finding code, but that might not be an 
issue with some other tricks.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk