mate / sista
About sista
Sista is an adaptive recompiler based on Cog's JIT. The Sista version of Cog's JIT adds counter on each conditional jumps.
When a counter trips (i.e., the branch is executed more than N times), the JIT calls the method MethodContext>>#conditionalBranchCounterTrippedOn: on the active context. The user can then add an in-image adaptive recompiler, that recompiles the V-method editing its V-code. This adaptive recompiler has access to the inline cache data of the method through a primitive, and knows how many times the tripping condition has run its branches. It can then recompile the method to an extended V-code set, that the VM reuse in the JIT to generate better N-code.
This project requires Cog to be compiled with the SistaStackToRegisterMappingCogit.
