[comp.lang.misc] Pascal and CALLS/CALLG

sommar@enea.se (Erland Sommarskog) (12/11/90)

Also sprach Jim Giles (jlg@lanl.gov):
>Now, Pascal doesn't allow separate compilation.  So it _could_ use the
>faster call on those routines determined not to be recursive (which
>can be detected at compile time in Pascal).  In C, the same trick
>_could_ be used, but only if you put all your procedures into the
>same source file.

Wait, we're talking VAX here, and VAX Pascal does allow separate
compilation. VAX Pascal actually generates both CALLG and CALLS
instruction, and it is my impression that the former dominates.
I can't recall I have ever seen it use a static parameter block
for CALLG, but it always generates code to build the parameter
block on the stack at run time. Whether this really is any gain 
over a CALLS I don't know.
--
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se