Number: 1177 Date: 21-May-84 17':10':56 Submitter: Sannella.PA Source: Kaplan.pa Subject: Compiler optimizes LOADTIMECONSTANT out Lisp Version: Description: ' Date': 14 May 84 18':09 PDT' From': Kaplan.pa' Subject': Lisp': LOADTIMECONSTANT glitches (compiler?)' To': LispSupport.pa' cc': Kaplan.pa' ' Lisp System Date': 6-May-84 20':31':11' Machine': Dorado (Ahwahnee)' Microcode version': 24,4' Memory size': 10000' Frequency': Always' Impact': Serious' ' ...' ' Also, the compiler seems to do over-eager optimizations around loadtimeconstant. I tried' (PROGN (LOADTIMECONSTANT (SETQ XXX NIL)) (FOO))' as a way of getting XXX initialized. The SETQ got evaluated when the defintion was compiled to CORE, but not when it was compiled to a file, and not when the file was loaded. Looking at the compiled file, it seems like the expression got optimized away, presumably because the compiler thought that the LOADTIMECONSTANT was for effect only and the LOADTIMECONSTANT macro returned an effect-free constant.' ' I think that in such a case, the compiler should arrange for the constant expression to be evaluated at compile time, even if the value is then thrown on the floor--not stuck into the compiled code.' ' ' Workaround: Test Case: Edit-By: Sannella.PA Edit-Date: 27-Jun-84 14':17':44 Attn: Assigned To: In/By: Disposition: I think this is a feature, and decline. LMM, 7Jun84. System: Language Support Subsystem: Compiler, Code Format Machine: Disk: Microcode Version: Memory Size: File Server: Server Software Version: Difficulty: Hard Frequency: Everytime Impact: Annoying Priority: Perhaps Status: Declined Problem Type: Bug Source Files: