Compilation

50 %
50 %
Information about Compilation

Published on November 30, 2008

Author: david.halliday

Source: slideshare.net

Description

This covers details of the processes of compilation. A lot of extra teaching support is required with these.
Originally written for AQA A level Computing (UK exam).

Compilation From code to executable By David Halliday

Stages from Source to Executable Compilation: source code ==> relocatable object code (binaries) Linking: many relocatable binaries (modules plus libraries) ==> one relocatable binary (with all external references satisfied) Loading: relocatable ==> absolute binary (with all code and data references bound to the addresses occupied in memory) Execution: control is transferred to the first instruction of the program

Compilation:

source code ==> relocatable object code (binaries)

Linking:

many relocatable binaries (modules plus libraries) ==> one relocatable binary (with all external references satisfied)

Loading:

relocatable ==> absolute binary (with all code and data references bound to the addresses occupied in memory)

Execution:

control is transferred to the first instruction of the program

Phases of the Compilation Process 1 Lexical analysis (scanning): the source text is broken into tokens. Syntactic analysis (parsing): tokens are combined to form syntactic structures, typically represented by a parse tree. The parser may be replaced by a syntax-directed editor, which directly generates a parse tree as a product of editing. Semantic analysis: intermediate code is generated for each syntactic structure. Type checking is performed in this phase.

Lexical analysis (scanning):

the source text is broken into tokens.

Syntactic analysis (parsing):

tokens are combined to form syntactic structures, typically represented by a parse tree.

The parser may be replaced by a syntax-directed editor, which directly generates a parse tree as a product of editing.

Semantic analysis:

intermediate code is generated for each syntactic structure.

Type checking is performed in this phase.

Phases of the Compilation Process 2 Machine-independent optimization: intermediate code is optimized to improve efficiency. Code generation: intermediate code is translated to relocatable object code for the target machine. Machine-dependent optimization: the machine code is optimized. On some systems (e.g., C under Unix), the compiler produces assembly code, which is then translated by an assembler.

Machine-independent optimization:

intermediate code is optimized to improve efficiency.

Code generation:

intermediate code is translated to relocatable object code for the target machine.

Machine-dependent optimization:

the machine code is optimized.

On some systems (e.g., C under Unix), the compiler produces assembly code, which is then translated by an assembler.

Add a comment

Related presentations

Related pages

dict.cc | compilation | Wörterbuch Englisch-Deutsch

Übersetzung für compilation im Englisch-Deutsch-Wörterbuch dict.cc.
Read more

compilation - Deutsch-Übersetzung - bab.la Englisch ...

Übersetzung für 'compilation' im kostenlosen Deutsch-Wörterbuch. Weitere Deutsch-Übersetzungen für: compilation address, compilation listing ...
Read more

dict.cc Wörterbuch :: compilation :: Deutsch-Englisch ...

Englisch-Deutsch-Übersetzung für compilation im Online-Wörterbuch dict.cc (Deutschwörterbuch).
Read more

Compilation - definition of compilation by The Free Dictionary

com·pi·la·tion (kŏm′pə-lā′shən) n. 1. The act of compiling. 2. Something, such as a report, anthology, or set of data, that is compiled ...
Read more

compilation Archives - Hornoxe.com

Fail Compilation Juli 2015 bis Februar 2016. TNL hat sich mal wieder etwas Zeit genommen und euch eine megafette Fail Compilation zusammengebastelt.
Read more

Compilation | Define Compilation at Dictionary.com

Compilation definition, the act of compiling: the compilation of documents. See more.
Read more

Ultimate Fails Compilation 2013 || Best Fails of the Year ...

The ULTIMATE fails compilation of the year! It has been a fantastic year for fails, here is the best picks from 2013 by FailArmy. Enjoy!
Read more

FailArmy - YouTube

Pool Fails Compilation || FailArmy - Duration: 3 minutes, 10 seconds. FailArmy. 81,586,435 views; 4 years ago; 18:13. Play next; Play now;
Read more

Compilation album - Wikipedia

A compilation album comprises tracks which are compiled from other recordings, either previously released or unreleased. The tracks may be from one or ...
Read more

Kompilation (Musik) – Wikipedia

Eine Kompilation (englisch compilation [ˌkɒmpɪˈleɪʃn̩], Verb: „compile“, deutsch: „zusammentragen“, „sammeln“) ist in der Musikindustrie ...
Read more