|Incremental compilation and type checking email@example.com (Gabriele Farina) (2008-06-30)|
|Re: Incremental compilation and type checking firstname.lastname@example.org (Eliot Miranda) (2008-07-02)|
|From:||Gabriele Farina <email@example.com>|
|Date:||Mon, 30 Jun 2008 23:41:40 -0700 (PDT)|
|Posted-Date:||02 Jul 2008 00:18:22 EDT|
I'm going to start writing a compiler for a typed OO language (similar
to Java or JS 2.0). This is my first real compiler and I'd like to ask
you some questions hoping u can help me out in designing the compiler
What I want to do is to support incremental and multithreaded
compilation, so I can compile each class file separately in an object
and recompile only the files that have been changed between different
My idea is to compile each file in its own thread, generating an
itermediate object code which contains a data section and an header
section. In the data section I'll put the bytecode and the required
tables (class table, constants table, etc ...), and in the header
section I'll put some additional informations related to type
dependencies. During compilation I'll do a partial type check when
possible, reserving type checking for externally defined types while
linking the object files.
Linking will be done by one single thread, doing the final checks and
mergin them together the data sections (adding offsets to the tables
Do you think that this could work ?
I'm asking about type checking because I've no idea how it is handled
by multithreaded compilers.
In general it would be great if someone can provide me some links to
useful documentation about this topic.
Return to the
Search the comp.compilers archives again.