src/class-output.lisp: Output effective methods directly from the class.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 15 Aug 2015 15:24:29 +0000 (16:24 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 15 Aug 2015 15:24:29 +0000 (16:24 +0100)
Earlier there was a bug where effective methods and method entries were
emitted twice, because there were two paths to them: one directly from
the class, and one via method entry points.  To resolve this, I removed
the path directly from the class.

This turns out to have been the wrong choice, because method entries are
found once for each chain, so there are still duplicates in classes with
more than one chain carrying methods.  So don't iterate from method
entries to effective methods, and reinstate the direct path from the
top-level class.

src/class-output.lisp

index 53812c9..c74daa8 100644 (file)
                    sequencer))
 
 (defmethod hook-output progn ((class sod-class) reason sequencer)
-  (with-slots (ilayout vtables methods) class
+  (with-slots (ilayout vtables methods effective-methods) class
     (hook-output ilayout reason sequencer)
     (dolist (method methods) (hook-output method reason sequencer))
+    (dolist (method effective-methods) (hook-output method reason sequencer))
     (dolist (vtable vtables) (hook-output vtable reason sequencer))))
 
 ;;;--------------------------------------------------------------------------
   (with-slots (entries) vtmsgs
     (dolist (entry entries) (hook-output entry reason sequencer))))
 
-(defmethod hook-output progn ((entry method-entry) reason sequencer)
-  (with-slots (method) entry
-    (hook-output method reason sequencer)))
-
 (defmethod hook-output progn ((entry method-entry)
                              (reason (eql 'vtmsgs))
                              sequencer)