[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

issue LOAD-TIME-EVAL



At least one "wizard" at Lucid was thoroughly confused by the
    (CONS #1=(LOAD-TIME-VALUE (COMPUTE-IT)) #1#)
example.  Perhaps it needs to be fleshed out.

I liked Aaron Larson's comment on the matter:
   "I was under the impression that the only loophole permitting the 
    compiler to copy/substitute otherwise non EQ forms was with regard 
    to QUOTE."
That is, one might conceivable think of coalescing the two calls to
LOAD-TIME-VALUE  because of a sort of similarity to QUOTE.  But as
Aaron further noted, the compiler cannot reduce the calls to CONS
in the structurally isomorphic form:
   (EQ #1=(CONS 'A 'B) #1#)
So why should LOAD-TIME-VALUE be any different.


Also your comment about constraints on the interpreter could be helpful:
  ". . . but it's not legitimate to cache LOAD-TIME-VALUE forms and 
    resulting values and do a lookup based on EQness of source code 
    expressions."


-- JonL --