Lines Matching defs:method
18 ;; Lastly, to override TinyCLOS method creation, two functions are
49 (add-method compute-apply-generic
50 (make-method (list <multi-generic>)
51 (lambda (call-next-method generic)
60 (add-method compute-methods
61 (make-method (list <multi-generic>)
62 (lambda (call-next-method generic)
65 (filter-in (lambda (method)
66 (let check-applicable ([list1 (method-specializers method)]
76 (let ([cmms (compute-method-more-specific? generic)])
79 (add-method compute-method-more-specific?
80 (make-method (list <multi-generic>)
81 (lambda (call-next-method generic)
83 (let loop ((specls1 (method-specializers m1))
84 (specls2 (method-specializers m2))
117 (define multi-add-method
118 (lambda (generic method)
122 (let filter-in-method ([methods (slot-ref generic 'methods)])
124 (list method)
125 (let ([l1 (length (method-specializers method))]
126 [l2 (length (method-specializers (##sys#slot methods 0)))])
128 (cons (##sys#slot methods 0) (filter-in-method (##sys#slot methods 1))))
130 (cons method methods))
132 (let check-method ([ms1 (method-specializers method)]
133 [ms2 (method-specializers (##sys#slot methods 0))])
135 (cons method (##sys#slot methods 1))) ;; skip the method already in the generic
137 (check-method (##sys#slot ms1 1) (##sys#slot ms2 1)))
139 (cons (##sys#slot methods 0) (filter-in-method (##sys#slot methods 1))))))))))))
143 (define (multi-add-global-method val sym specializers proc)
145 (multi-add-method generic (make-method specializers proc))
149 ;; (define old-add-method ##tinyclos#add-method)
151 (set! ##tinyclos#add-method multi-add-method)
152 (set! ##tinyclos#add-global-method multi-add-global-method)