Number: 1088 Date: 11-May-84 16':36':41 Submitter: JonL.pa Source: JonL.pa Subject: RECOMPILE, but not BCOMPL, fails to obey DONTCOPY. Lisp Version: 7-May-84 21':48':06 Description: Several places in the CMLARRAY file have DONTCOPY declarations, but the stuff underneath them winds up in the .DCOM anyway. E.g. (DECLARE': EVAL@COMPILE DONTCOPY (FNS FOO)) for a function FOO that is already defined by a more vanilla (FNS FOO) earlier in the coms. [At least it looks like the second FNS is getting compiled now -- it didn''t used to be compiled, but the expr code was stuck into the .dcom file]' ' Another example': (DECLARE': COPYWHEN (NEQ COMPILEMODE ''D) ... (FNS \NONDADDARITH.TRAMPOLINE) ...) causes the CODE for \NONDADDARITH.TRAMPOLINE to be installed when loading the .dcom file.' ' But the interesting thing is that BCOMPL doesn''t have there error -- only when the file is RECOMPILE''d (or BRECOMPILE''d), such as CLEANUP would do.' ' -----' ' Date': 11 May 84 00':55 PST' From': JonL.pa' Subject': Catch 22': Lossage of RECOMPILE on DONTCOPY forms' To': LispCore^' ' Be wary if you use the idiom described below':' ' It appears that RECOMPILE -- but not TCOMPL -- ignores DONTCOPY declarations for FNS. Thus the old idiom often used to have an expr version of a function defined while compiling a file':' ' (... (FNS FOO)' (DECLARE': EVAL@COMPILE DONTCOPY (FNS FOO)) ' ...)' ' leads to two copies of compiled FOO in the .DCOM file. [Well at least this is better than some time ago when the second copy was in EXPR form!]' ' The "Catch 22" of it all is that TCOMPL -- but not RECOMPILE -- fails to output any code for a FNS in a command' ' (... (DECLARE': EVAL@COMPILE (FNS FOO))' ...)' ' Thus whether you use the first form or the second form of this "idiom", you will be schrod by one of the two compilation methods (results are same for BRECOMPILE and BCOMPL too).' ' -- JonL --' ' Workaround: (1) Have the more important (FNS FOO) come after the lesser important one; (2) Be prepared to live with extra, spurious FNS in the .DCOM file and in the loaded environment. Test Case: (COMS (FNS FOO) (DECLARE': EVAL@COMPILE DONTCOPY (FNS FOO))) Edit-By: Sannella.PA Edit-Date: 21-May-84 16':06':01 Attn: Kaplan,Masinter Assigned To: In/By: Disposition: System: Programming Environment Subsystem: File Package Machine: 1100 Disk: Microcode Version: 5121 Memory Size: 3584 File Server: Server Software Version: Difficulty: Moderate Frequency: Everytime Impact: Moderate Priority: Perhaps Status: Open Problem Type: Bug Source Files: