Compilation

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Compilation - Presentation Transcript

    1. Compilation From code to executable By David Halliday
    2. 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
    3. 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.
    4. 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.

    + David HallidayDavid Halliday, 2 years ago

    custom

    103 views, 0 favs, 0 embeds more stats

    This covers the steps of compilation. This does req more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 103
      • 103 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 2
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories