Skip to main content

2011 | OriginalPaper | Buchkapitel

6. Intermediate-Code Generation

verfasst von : Torben Ægidius Mogensen

Erschienen in: Introduction to Compiler Design

Verlag: Springer London

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

The final goal of a compiler is to get programs written in a high-level language to run on a computer. This means that, eventually, the program will have to be expressed as machine code which can run on the computer. This does not mean that we need to translate directly from the high-level abstract syntax to machine code. Many compilers use a medium-level language as a stepping-stone between the high-level language and the very low-level machine code. Such stepping-stone languages are called intermediate code. We will generate intermediate code using translation functions for each syntactic category, similar to the functions we used for interpretation and type checking. We generate code for a syntactic construct independently of the constructs around it, except that the parameters of a translation function may hold information about the context (such as symbol tables) and the result of a translation function may (in addition to the generated code) hold information about how the generated code interfaces with its context (such as which variables it uses).

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
Note that the coordinate system, following computer-science tradition, is rotated 90° clockwise compared to mathematical tradition.
 
Literatur
1.
Zurück zum Zitat Aït-Kaci, H.: Warren’s Abstract Machine—A Tutorial Reconstruction. MIT Press, Cambridge (1991) Aït-Kaci, H.: Warren’s Abstract Machine—A Tutorial Reconstruction. MIT Press, Cambridge (1991)
2.
Zurück zum Zitat Appel, A.W.: Compiling with Continuations. Cambridge University Press, Cambridge (1992) Appel, A.W.: Compiling with Continuations. Cambridge University Press, Cambridge (1992)
3.
Zurück zum Zitat Jones, S.L.P., Lester, D.: Implementing Functional Languages—A Tutorial. Prentice Hall, Reading (1992) Jones, S.L.P., Lester, D.: Implementing Functional Languages—A Tutorial. Prentice Hall, Reading (1992)
5.
Zurück zum Zitat Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999) Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)
6.
Zurück zum Zitat Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Mateo (1997) Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Mateo (1997)
Metadaten
Titel
Intermediate-Code Generation
verfasst von
Torben Ægidius Mogensen
Copyright-Jahr
2011
Verlag
Springer London
DOI
https://doi.org/10.1007/978-0-85729-829-4_6