Ian Piumarta wrote:
Helge,
I wonder what a J2-NCM VM could do...
[snip]
What does cost (a *lot*) is block activation, since I have to go through the maps to find the initial nPC based on the intial vPC stored in the closure. (For compiled methods this cost is only paid when flushing a context out of the context cache, which happens relatively infrequently.) My #1 request would therefore be to have block bodies compiled into their own CompiledMethods, separate from the home method. (Or does NCM do this already??? I've not been following the thread very closely.)
I haven't looked at Tim's NCM implementation yet (Hi, Tim!), butI know that the VisualWorks implementation has something called a CompiledBlock, which shares a common superclass with CompiledMethod (namely, CompiledCode). I think this is essentially what you requested.
Tim and I worked together on a project (that shall remain nameless) where we modified the Squeak VM in a way very similar to Tim's current NCM implementation (well, actually Tim and Don Charnley reworked the VM, and I reworked the CompiledMethod class). It **is** cleaner and more elegant, and makes CompiledMethods more easily extensible.
--Alan
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Alan Lovejoy Content-Disposition: attachment; filename="vcard.vcf"
Attachment converted: Anon:vcard.vcf 12 (TEXT/ttxt) (00007A78)
squeak-dev@lists.squeakfoundation.org