(j3.2006) Compilation cascades

Robert Corbett Robert.Corbett
Wed Aug 27 20:18:36 EDT 2008


Van Snyder wrote:
> Van Snyder wrote:
> 
> 
>>We compare .mod files to avoid compilation cascades.
>>
>>I noticed that if I add a PRINT statement to a module procedure, several
>>processors produce a different .mod file.
>>
>>This seems a bit bizarre.  Is it really necessary?
>>
>>Some processors put a time stamp in the .mod file, but we've figured out
>>how to get around that.
> 
> 
> Robert Corbett commented
> 
> ! Some compilers put representations of the code for module procedures
> ! in the .mod files they generate.  This allows inlining module
> ! procedures, which are often short.  It is not necessary, but it can
> ! be a big performance advantage.  Of course, if you use such a compiler,
> ! the compilation cascades are pretty much necessary for correct
> ! operation.  If a module procedure that has been inlined has been
> ! modified, all files that include procedure references that
> ! reference one of the module procedures must be recompiled.
> 
> That would explain why the .mod file would be different no matter what
> change I make.  Why would the .mod file be different only if I inserted
> a PRINT statement (or deleted them all)?

What kinds of changes can you make that leave the .mod file unchanged?
You are correct that most, but not all, changes would alter the ,mod
file if you are using one of the compilers that writes representations
of the code of module procedures as part of the .mod file.

Bob Corbett




More information about the J3 mailing list