This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Markus Denker - AOSTA
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Up next - Markus Denker on AOSTA. Markus is doing this work for Squeak. We already have JIT systems for the commercial systems, and even an (unreleased) JIT for Squeak. What this is about is "hotspotting". This is all done at the Smalltalk level, using the profile information created by the JIT compiler. The system would compile to optimized bytecode, but get turned off for debugging purposes. The main areas:
Profiled execution of (unoptimized) areas from the JIT
Collect type information from the PIC (Polymorphic Inline Cache). Needs to be readable at the Smalltalk level
Inlining (from the above)
Where is it? The design is done, but not tested, The bytecode transformations (to SSA) is done, and works in VisualWorks. The backend - a transformation out of SSA is being done now, with a simple code generator (In Squeak - works with some examples now). SSA stands for Static Simple Assignment.
Two steps:
Deconstruct the SSA
Generate Bytecode
The main problem that can crop up is that some optimizations end up with wrong results - you need to fix that up - which makes the algorithm more complex. There's an answer to this called the Phi-Congruency Method.
To do - lots - dynamic deoptimization (for debugging). Possible experiments:
AOSTA for Squeak with a JIT
Does it make sense for an interpreter?
Exupery as a backend?
With a byte code to byte code translator, what else is possible?
Enables more late binding
An API for changing the language semantics and implementation at runtime (for example, the meaning of inheritance)
Squeak has MetaClassTalk, but it's slow
iVARS are accessed via offsets
offsets calculated at compile time
makes changes and experiments harder
Make a MOP more practical
Allows a much simpler system
Bottom line - could enable a lot of things that aren't (directly) related to performance.