Pammer, S. O. (2023). Fast machine-code generation for stack-based languages [Diploma Thesis, Technische Universität Wien]. reposiTUm. https://doi.org/10.34726/hss.2023.108224
E194 - Institut für Information Systems Engineering
-
Date (published):
2023
-
Number of Pages:
66
-
Keywords:
compilers; code generation; stack-based; instruction selection; automata; tree-covering; tree-parsing; languages
en
Abstract:
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.