E194 - Institut für Information Systems Engineering
Number of Pages:
compilers; code generation; stack-based; instruction selection; automata; tree-covering; tree-parsing; languages
This work investigates implementation techniques for fast instruction selection in the context of stack-based languages. Using tree-parsing and the iburg implementation thereof as a starting point, this work is looking into solving the bottle-necks of iburg's tree-parsing approach: The need to construct expression trees and the need for a two-pass algorithm. This work implements a generator that produces a finite-state machine from tree-parsing rules and associated actions, which only requires a single pass and no tree-construction. The performance of a manually written code generator, iburg's tree parsing and an automaton-based approach is measured and compared. The generated automaton produces results of similar quality as a hand-written code generator.