Do not compile some pieces of DEFSTRUCT-defined things at fasl load-time.
commitb9e25720b4a1bf2532c079a57fdf3589aa6907fd
authorDouglas Katzman <dougk@google.com>
Thu, 15 Oct 2015 02:49:02 +0000 (14 22:49 -0400)
committerDouglas Katzman <dougk@google.com>
Thu, 15 Oct 2015 02:53:18 +0000 (14 22:53 -0400)
treed79a8b415365059a9019517ecc8e44da7ae0b9d5
parent1da06339d3f584cf4ce738c2331d7052d1c365e7
Do not compile some pieces of DEFSTRUCT-defined things at fasl load-time.

A few things would formerly be compiled at load-time:
- a thunk for ALLOCATE-INSTANCE
- out-of-line slot setters for read-only slots

This was possibly the worst choice of when to compile.
Not only was the fast loader slowed down for the rarest of use-cases,
it might unexpectedly reference stuff that is as yet undefined,
depending on fasl load order (especially if we can parallelize).

A good choice would be do everything at compile-time, except that's not
how it works. A reasonable fallback is to compile at runtime, obeying the
principle of least surprise compared to all other method dispatch logic.
src/pcl/low.lisp
src/pcl/std-class.lisp
tests/clos.impure-cload.lisp