Use real fields for the first 8 registers

Most predicates need under 8 registers in their local stack frames
for their argument processing. For the first 8 registers, use
real Java fields so the access operations are getfield/setfield
bytecodes rather than getfield + arrayindex + arrayboundscheck.
This shaves a lot of machine instructions off the very common
push-register/pop-register code that appears within any given
predicate that was compiled from Prolog.

For the choice point stack frames custom classes are used for the
0-8 register cases, eliminating the Term[] that was used to track
the argument values... instead fields are used along with custom
code to copy the values back and forth using just getfield/setfield.

For registers above 8, the older style aregs array gets used, but
with the register index subtracted by 8 coming from am2j instead
of wasting space at the start of the array.  (This positions the
9th register at index 0.)
3 files changed