[Seaside] Importing halo's from Monticello

John Pierce john.raymond.pierce at gmail.com
Sat Jun 4 01:44:19 CEST 2005


> It's not about how temps work, it's about how literals work. When an
> expression like #(nil) is compiled, a new Array object is created and
> stored in the CompiledMethod object. Every time you invoke the
> method, that same instance gets used. This is different from {nil},
> which creates a new Array every time, or [nil], which creates a new
> BlockContext every time.
> 
> So effectively the cache is inside the CompiledMethod object itself;
> if you change the source and recompile, the cache will get wiped out
> (which is exactly what you want).


Pretty freaky! I never cease to be amazed by this super cool programming 
environment. You are right! What a handy dandy trick. I wonder if that is an 
implementation feature of Squeak or if all Smalltalks exhibit that behavior. 
Anyways, I updated InstanceEncoder on SqueakMap with your caching 
optimization. Thanks for providing explanation of the technique.

Regards,

John


-- 
It's easy to have a complicated idea. It's very very hard to have a simple 
idea. -- Carver Mead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20050603/bad30392/attachment.htm


More information about the Seaside mailing list