X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/e82044bca1b6cfe495de93abbff727a5b41359b8..d5fdd49e70b734b791eb907706f92da5775e2a8b:/src/output-impl.lisp diff --git a/src/output-impl.lisp b/src/output-impl.lisp index 7c3f436..96cfa20 100644 --- a/src/output-impl.lisp +++ b/src/output-impl.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -55,15 +55,27 @@ (ensure-sequencer-item sequencer name)) constraint))) (with-slots (constraints) sequencer - (pushnew converted-constraint constraints :test #'equal)))) + (pushnew converted-constraint constraints)))) (defmethod add-sequencer-item-function ((sequencer sequencer) name function) (let ((item (ensure-sequencer-item sequencer name))) (pushnew function (sequencer-item-functions item)))) (defmethod invoke-sequencer-items ((sequencer sequencer) &rest arguments) - (dolist (item (merge-lists (reverse (sequencer-constraints sequencer)))) - (dolist (function (reverse (sequencer-item-functions item))) - (apply function arguments)))) + #+debug + (format *debug-io* "~@<;; ~@;Constraints: ~_~ + ~<~@{~< * ~;~@{~S~^, ~:_~}~:>~:@_~}~:>~:>" + (mapcar (lambda (constraint) + (mapcar #'sequencer-item-name constraint)) + (sequencer-constraints sequencer))) + (let ((seen (make-hash-table))) + (dolist (item (merge-lists (reverse (sequencer-constraints sequencer)))) + (setf (gethash item seen) t) + (dolist (function (reverse (sequencer-item-functions item))) + (apply function arguments))) + (maphash (lambda (name item) + (unless (gethash item seen) + (warn "Unused output item ~S" name))) + (sequencer-table sequencer)))) ;;;----- That's all, folks --------------------------------------------------