6 ms·
The Delphi compiler has incremental compilation, but by your definition it wouldn't. Delphi uses the source to figure out dependencies. That is, the compiler h
by barrkel 10y ago
The Delphi compiler has incremental compilation, but by your definition it wouldn't.
Delphi uses the source to figure out dependencies. That is, the compiler has make logic, and traces through the 'uses' declarations to recursively discover all the source and object files. It compares timestamps to discover which object files are out of date and need to be recompiled. Thus, if you touch a single file and do a compile, only a couple of files will be compiled - the main program source and the modified file. This dependency logic is in the compiler, not a separate make program.
If this isn't the compiler doing incremental compilation, I think we have a terminology problem. Because this is what is meant by incremental compilation as the term is applied to almost all production compilers, and if you persist in making a distinction, you may be confusing more than clarifying. ISTM that you're memoizing more parts of the compilation process than has historically been done in incremental compilers. It may be clearer to use a more qualified phrase to express this, rather than shift the generally accepted meaning of a term.
- Manishearth 10y agoI don't see where in pcwalton's comment he alludes that the Delphi compiler's definition of incremental compilation doesn't match his own. He explicitly says "Incremental compilation is when the compiler automatically figures out what needs to be recompiled". (He does say that production compilers don't have incremental compilation, but that's not a matter of definition, and I read that to mean "usually don't")
- coldtea 10y ago>He explicitly says "Incremental compilation is when the compiler automatically figures out what needs to be recompiled". He also says that merely using the separate files to deduce this (which the parent says is what Delphi does) is not incremental compilation.
- Manishearth 10y agoIt doesn't "merely use the separate files", it traverses the use statements. There's no manual splitting of .cpp and .h files. No manual management of dependencies.
- barrkel 10y agoRust is going down the path where recompilation is done on a finer granularity than files. I was objecting to setting that as the bar to meet for incremental compilation. It's technically impressive, but it will only be a win if the average compilation unit takes a noticeable amount of time to compile (this was rarely the case with Delphi). It may well be the case for Rust+LLVM.
- Manishearth 10y agoFair. I think Delphi counts, and I don't think that was the bar being set (but it's easy to see how it could be read that way). The C++ header file model is quite different in the amount of burden placed on the programmer over the Delphi use-statement model.