Exupery Return Optimisation
Last updated at 4:20 pm UTC on 6 February 2005
The current task is speeding up returns. I'm working on returns before sends because it will make it easier to optimise sends. Also I suspect that the current send performance is as good as the interpreters.
- DONE Store the method's address in the unused slot in MethodContexts. This will need to be blanked out when the method exits for the last time.Nil out all return addresses when initialising Exupery before enabling compiled code.
- DONE Jump to the address in the unused slot if it's an integer. The unused slot (receiverMap) is always nil in the current image.
- DONE Create separate entry points for each different return address. Store the address to return to before exiting the method.
- DONE Remove the big "case" statement of entry points from the method.
- DONE Move return logic into compiled code. Update the interpreters state variables so all the Slang code needs to do is reload the local registers. Most of the conditional logic is to deal with different types of exits, each exit has it's own compiled sequence.
- DONE Return directly to the next method if it is compiled as well.
- (The 0.05 release)
- Make returns safe. If a return has the wrong programCounter (it was single stepped in a debugger) then do something sensible (probably just return to the intepreter).