5 Okay so this refactor is going nicely. I do like that all the instructions
6 have been pre-planned out. This time right now almost all of the encodings
7 have code to write them to the output stream, and this handles the bulk of
8 the instructions. So I really do not need to worry about how the instructions
9 are written out for the time being. I pretty much just have to pick the right
10 instructions to use and their correct encoding of course. Once those are
11 translated, I am going to need to add a pre-counted flag to the stack state
12 slots so that way useless counting/uncounting is removed especially with
13 method arguments and such. But in the long run at least my second
14 constructor should end up being much shorter since if I will stop counting
15 the locals for uncounting there would be no need to clear them. Additionally
16 this can handle constant classes and strings as well.
20 Actually, since on the stack I might need to uncount the field instances
21 there might be no way to do that. So what I need is that when a field is read
22 it will store the value into temporary register which is then read from.
26 Actually, since I already allocated the instruction space and it will be tough
27 to move things around, I figure what I can do for field puts and stores is
28 that if the register argument is -1 it will be treated as: store it in the
33 Just realized the stack map states since now that I have caching and such,
34 that information would be lost for any jump target. When initializing from
35 nothing, I need to setup the proper state with no caches.
39 Actually I was thinking, I do not need to do any of the freeze jump label
40 stuff really. What I can do instead of just create a mapping of which
41 instructions jump to a given point. If an instruction is jumped to from a
42 future point (a loop), at that point before I create the Java label I can
43 undo the caches and counts on the stack then resume from there. I think
44 that would be the simplest way to go without requiring back processing
45 or otherwise. This of course would be for any jump including exception