3-in-1 fix: an annoyance, a bug, and an inefficiency.
commit24fd98dfdbdd6c039957ade98fabb780c1514a95
authorDouglas Katzman <dougk@google.com>
Mon, 4 Apr 2016 03:29:35 +0000 (3 23:29 -0400)
committerDouglas Katzman <dougk@google.com>
Mon, 4 Apr 2016 03:36:02 +0000 (3 23:36 -0400)
tree56f31c4db765c5eeb1df97ce05fd07f5eb172ac6
parent261a26ec5037e1d62ab90dc7df4a72ff3844f8ae
3-in-1 fix: an annoyance, a bug, and an inefficiency.

- ACCESSOR-SLOT-BOUNDP failed to use QUIET-FUNCALL, so compiling
  (SLOT-BOUNDP my-obj 'A-SLOT) warned about nonexistence of
  #'(SB-PCL::SLOT-ACCESSOR :GLOBAL A-SLOT BOUNDP).

- ACCESSOR-SET-SLOT-VALUE misused %macroexpand on OBJECT when it meant
  to expand NEW-VALUE. To move NEW-VALUE leftward in evaluation order,
  we care whether _it_ has side-effects, not whether OBJECT does.
  Oddly enough, since this macro is typically invoked N levels deep
  into lexical rebindings from SETF and other transforms, it was likely
  that we could in fact elide a gensym, so it's hard to prove that this
  fixes anything, but it's clearly more correct now.

- Bypass the fdefn. Just load the GF and call through that.
  Since the trampoline has to load the GF anyway, prefetching helps.
  Generic functions, in particular these accessor functions, are
  as good as "known functions" which we allow as code header constants.
  (And GFs never change their identity, so it works)
src/pcl/slots-boot.lisp