incremental compilation l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Incremental Compilation PowerPoint Presentation
Download Presentation
Incremental Compilation

Loading in 2 Seconds...

play fullscreen
1 / 13

Incremental Compilation - PowerPoint PPT Presentation


  • 252 Views
  • Uploaded on

Incremental Compilation. Jonathan Bachrach MIT AI Lab. Problem. Do less work than full recompile Produce same result as full recompile. Solution. Change something in source Change all output that would be different Leave others alone Track dependencies between output and source.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Incremental Compilation' - jacob


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
incremental compilation

Incremental Compilation

Jonathan Bachrach

MIT AI Lab

problem
Problem
  • Do less work than full recompile
  • Produce same result as full recompile
solution
Solution
  • Change something in source
    • Change all output that would be different
    • Leave others alone
  • Track dependencies between output and source
fun o dylan approach
Fun-O-Dylan Approach
  • Source broken up into source records
  • Compiler takes source records in and produces bits out
source records
Source Records
  • Source is broken up into sequence of source records
  • Each source record contains some contiguous source text
    • File
    • Top-level-form
compilation phases
Compilation Phases
  • Parsing => forms + bindings
  • Modeling => compile-time models
  • Conversion => IR
  • Optimization => IR (method dispatch …)
  • Code Gen => bits
  • Linking => bits
compilation records
Compilation Records
  • Contain compilation products
  • One compilation record per source record
top level forms
Top Level Forms
  • Object-oriented and syntactic representation of programmatic forms occurring at top level
    • init-world(); -- top level call
    • define method … end; -- method definition
    • define class … end; -- class definition
  • Registered in compilation records in order
  • Contains all information for each form
    • Signatures
    • Superclasses
    • Defined bindings
  • Definitions are binding defining top-level-forms
bindings
Bindings
  • Objects representing global variables
  • Contain
    • Name
    • Home module
    • Defining definitions
    • Dependencies
dependencies
Dependencies
  • Record bindings for given stage depended on
incremental recompilation
Incremental Recompilation
  • Remembers last source records
  • Computes source record diff to say which source records have changed or been added
  • When source record diffs
    • Compile it and
    • Rerun any phases of records dependent on it
      • by examining deps on all bindings defined by it
  • Can increase precision by decreasing size of record
    • From say file to top-level-form size
other systems
Other Systems
  • SmallEiffel
    • Eiffel to C compiler
    • Most time is spent in C compilation
    • Recompute all C each time
    • Only recompile C that diffs
interactive compilation
Interactive Compilation
  • Live incremental compilation
  • Must patch running system
  • Difficult in the face of optimization