tools.deploy.shaker: more compact next-method shaking
parent
449be040f8
commit
e42216a569
|
@ -1,4 +1,5 @@
|
||||||
USING: words ;
|
USING: kernel words ;
|
||||||
IN: generic
|
IN: generic
|
||||||
|
|
||||||
: next-method-quot ( method -- quot ) "next-method-quot" word-prop ;
|
: (call-next-method) ( method -- )
|
||||||
|
dup "next-method" word-prop execute ;
|
||||||
|
|
|
@ -443,17 +443,15 @@ SYMBOL: deploy-vocab
|
||||||
t "quiet" set-global
|
t "quiet" set-global
|
||||||
f output-stream set-global ;
|
f output-stream set-global ;
|
||||||
|
|
||||||
: unsafe-next-method-quot ( method -- quot )
|
: next-method* ( method -- quot )
|
||||||
[ "method-class" word-prop ]
|
[ "method-class" word-prop ]
|
||||||
[ "method-generic" word-prop ] bi
|
[ "method-generic" word-prop ] bi
|
||||||
next-method 1quotation ;
|
next-method ;
|
||||||
|
|
||||||
: compute-next-methods ( -- )
|
: compute-next-methods ( -- )
|
||||||
[ standard-generic? ] instances [
|
[ standard-generic? ] instances [
|
||||||
"methods" word-prop [
|
"methods" word-prop [
|
||||||
nip dup
|
nip dup next-method* "next-method" set-word-prop
|
||||||
unsafe-next-method-quot
|
|
||||||
"next-method-quot" set-word-prop
|
|
||||||
] assoc-each
|
] assoc-each
|
||||||
] each
|
] each
|
||||||
"vocab:tools/deploy/shaker/next-methods.factor" run-file ;
|
"vocab:tools/deploy/shaker/next-methods.factor" run-file ;
|
||||||
|
|
Loading…
Reference in New Issue