From: Mark Wooding Date: Sat, 15 Aug 2015 15:24:29 +0000 (+0100) Subject: src/class-output.lisp: Output effective methods directly from the class. X-Git-Tag: 0.2.0~82 X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/08713508fa747fae29e357e8079038bd6fcc4e0b src/class-output.lisp: Output effective methods directly from the class. 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. --- diff --git a/src/class-output.lisp b/src/class-output.lisp index 53812c9..c74daa8 100644 --- a/src/class-output.lisp +++ b/src/class-output.lisp @@ -110,9 +110,10 @@ 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)))) ;;;-------------------------------------------------------------------------- @@ -278,10 +279,6 @@ (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)