Equality of Recursive Structures [Was: Closure Compiler in 3.9
?]
bryce at kampjes.demon.co.uk
bryce at kampjes.demon.co.uk
Tue May 15 22:24:31 UTC 2007
Tony Garnock-Jones writes:
> Hi Colin,
>
> Colin Putney wrote:
> > Lex suggested that the stack could be constructed such that the
> > invocation of #someMessage constructs an activation context whose sender
> > slot points directly to the context for #entryPoint. We'd then have a
> > tree rather than a stack, and barring a reference escaping via
> > thisContext, the context for #doSomething is now garbage. Returning from
> > #someMessage to #entryPoint will now take one bytecode instead of two.
>
> That'd be ideal. (I still see it as a stack - just not a dense
> representation!) I've looked at the VM before to see if it would be
> difficult to introduce tail-call frame elision at that level, and it
> was. I'm sorry to say I haven't got a patch to submit :-(
commonSend and internalActivateNewMethod would be worth looking
at if you're trying to create a tail send bytecode.
Be careful about context recycling, you don't want to accidentally
allow some other context to be recycled because the tail call has
removed a context from the stack.
Bryce
More information about the Squeak-dev
mailing list
|