A byte code reader provides verification while optimizing and creating an
internal SSA form to allow efficient machine code generation. Many
functions are combined in one component honoring the difficult time
constraints of just-in-time translation. This reader is engineered for
retargeting and thus expedites the implementation of a JIT for any
platform. The reader takes two single passes over the byte codes: a first
pass that builds a flow graph using any set of rules for node creation,
and maps definitions from the byte codes onto the flow graph nodes, and a
second pass that translates whatever is in the byte codes into optimized
machine code (or a traditional compiler intermediate form) with an
embedded SSA graph. Global verification and global optimization are
implemented while reading. Two data structures and a main program loop
are provided. The data structures are used to allow the creation of a
flow graph, and an exception handling (EH) graph.