Skip to content

JIT that works (almost)

Pre-release
Pre-release
Compare
Choose a tag to compare
@0x7CFE 0x7CFE released this 17 Aug 15:59
· 1 commit to master since this release

Version 0.4 may be described in three words: JIT that works.

Current release completely refactors the VM logic and brings new instruction API that allows us to extract semantic information from method bytecodes. Huge amount of work was done in terms of code organization, readability and maintainability.

However, there are a lot of things to be done, so it's just the beginning.

Currently JIT provides eqal or better performance on almost all typical tasks excluding heavy usage of reflection and/or dyanmic method generation. Current JIT code is created in assumption that class and method hierarchy will not change over time. Of course this is a temporary limitation that should be fixed in later releases.

Another complex issue is fast evaluation of block return instruction. Current implementation uses exception API to perform far jump. This work OK but is terribly slow. I mean REALLY slow, 10 times slower than the software implementation and 40 times slower than implementation proposed in the fast_block_return branch. Latter uses -freg-struct-return technique which is uncommon in UNIX world and it's calling conventions. More portable implementation should pass return value using the stack (sret in terms of LLVM).

P.S.: We started filling our project wiki. Don't forget to check it out!