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

Constant-Function, and integration-level



   Date: Wed, 11 May 88 14:55 EDT
   From: ELIOT@cs.umass.edu
      From: Gail Zacharias <gz@spt.entity.COM>
      Regarding inlining, I think it is perfectly valid for a compiler to
      inline explicit constant references to compiled functions (i.e.
      references of the form '#<Function>) since there is nothing in common
      lisp that would allow you to tell the difference.

   TRACE is a Common Lisp function that allows you to see the difference.

No.  Common Lisp doesn't provide a way to trace disembodied functions.

I don't really understand the rest of your message.  The point I was trying to
make is that since most DEFUN'ed functions are constant, it's not very useful
to have to have a constant-function declaration for every DEFUN in your
program.  Rather, that should be the default (i.e. implementations should be
allowed to assume it), so that correct portable programs *must* explicitly
mark the exceptions.  NOTINLINE works fine for that purpose.

Regarding Rob MacLachlan's integration-level, I agree that the concept is
useful, but I disagree that it's something a program should be requesting for
itself - it's something a user is requesting for the program.  Put another
way, the integration level should not be sitting inside the program sources,
but rather be an argument to compile-file (or defsystem or an option on the
compile menu, or however it is the user usually goes about requesting a
compilation in his system).  Since a correct program should work the same
regardless of the integration level it was compiled with, and since the
tradeoffs will be different for different implementations, there is no useful
criterion that a portable program can use to select its 'preferred'
integration-level.