Ok so I have an idea. Instead of creating a bunch of instructions and doing the expanded byte code, I just have basic block level expansion. There is basically an interface which can be created which creates the basic block writer which is a class which contains methods for the expanded byte code. It will have no optimizations or stack caching. Basically it will create expanded instruction handlers for a single basic block at a time. Then the handler can pass that elsewhere. For example my initial expanded handler would just do a very basic machine level translation to a target machine without any optimizations or even register caching. The purpose would be to have something that works first.


So I have some basic interfaces written up. I have an idea for basic blocks and such. Basic blocks need to be identified as a key, I could have a separate key interface but that would be a bit complicated since it would need to be created when it is referred to. So instead I am going to have an interface which can act as a key for the basic block reference.


What I need is a cached class which has a table generated by the class ExceptionHandlerTable for a given PC address. What I basically need is a PC validity test where for the entire size of the exception handler, all ranges are specified and produce these unique keys. These keys would be used for the basic blocks. They would all then be iterated at the end so that their machine code can be generated. Additionally what I need is a special enumeration for special basic blocks such as for synchronized.


I took a nap since I was up so early today. so


So I need to think of an algorithm for this.


I drew a picture I have an idea of what to do, just need to implement it nicely.