Abstract
It is common practice in compilers to use tables to represent data, and then automatically generate code based on those tables (often known as "table-driven code"). Many compilers use machine description tables from which is automatically generated parts of the code generator, and there are often small pieces of table-driven code within a compiler. Sometimes these tables are very useful, but other times the tables themselves can become a maintenance nightmare. This paper uses examples from several SGI compilers to try and enumerate some guidelines for designing good tables and table-driven code.
- C. A. R. Hoare. "Hints on programming language design". Technical Report CS-73-403, Stanford University Computer Science Department, December 1973. Google ScholarDigital Library
- http://open64.sourceforge.net/.Google Scholar
- David L. Parnas. "On the Criteria To Be Used in Decomposing Systems into Modules". In Communications of the ACM, December 1972. Google ScholarDigital Library
Index Terms
- Some suggestions for the use of tables in compilers
Recommendations
Modular Compilers Based on Monad Transformers
ICCL '98: Proceedings of the 1998 International Conference on Computer LanguagesThe monadic style of language specification has the advantages of modularity and extensibility: it is simple to add or change features in an interpreter to reflect modifications in the source language. It has proven difficult to extend the method to ...
GrayC: Greybox Fuzzing of Compilers and Analysers for C
ISSTA 2023: Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and AnalysisFuzzing of compilers and code analysers has led to a large number of bugs being found and fixed in widely-used frameworks such as LLVM, GCC and Frama-C. Most such fuzzing techniques have taken a blackbox approach, with compilers and code analysers ...
A facility for the downward extension of a high-level language
Proceedings of the 1982 SIGPLAN symposium on Compiler constructionThis paper presents a method whereby a high-level language can be extended to provide access to all the capabilities of the underlying hardware and operating system of a machine. In essence, it is a facility that allows a user to make special purpose ...
Comments