[Newcompiler] Implementing bytecode for closur

Marcus Denker denker at iam.unibe.ch
Thu Apr 26 20:49:58 UTC 2007


On 26.04.2007, at 21:02, <bryce at kampjes.demon.co.uk> wrote:

> Marcus Denker writes:
>
>> And on the plus side, this bytecode could be used in persephone to
>> inline getters/setters on self ;-)
>
> Simple getters and setters are currently implemented as primitives
> by the Squeak VM. The primitive implementation will work even if
> they're not accessed via self.

yes, the only thing to save would be the lookup... the idea would be:
we can (vitually) copy down all the methods, then "self something" the
method that is called is known exactly as long as the hierarchy does
not change.

In a system like persephone, which is in essense a system where bytecode
is generated on demand and then cached (an AST=to=bytecode JIT), we
can thus inline self sends to save an activation (for complete  
methods) or
a lookup (for primitives), as we can flush the generated bytecode as  
soon
as the hierarchy changes.

It could even go in the direction of AOSta, the AST can be annotated  
with
type info, and we do have framework for instrumenting send-sides with  
the
code to do that purely on the Bytecode/AST level.... kind of AOSta where
the type data is not read from the VM's PICs but gathered by in-image
annotation. I have doubts if that will provide a performance improvement
all-in-all, but it would be cool expreriment to do.

	Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3947 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/newcompiler/attachments/20070426/3105e308/smime.bin


More information about the Newcompiler mailing list