tools.deploy.shaker: more compact next-method shaking

db4
Slava Pestov 2009-08-23 19:18:12 -05:00
parent 449be040f8
commit e42216a569
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,5 @@
USING: words ;
USING: kernel words ;
IN: generic
: next-method-quot ( method -- quot ) "next-method-quot" word-prop ;
: (call-next-method) ( method -- )
dup "next-method" word-prop execute ;

View File

@ -443,17 +443,15 @@ SYMBOL: deploy-vocab
t "quiet" set-global
f output-stream set-global ;
: unsafe-next-method-quot ( method -- quot )
: next-method* ( method -- quot )
[ "method-class" word-prop ]
[ "method-generic" word-prop ] bi
next-method 1quotation ;
next-method ;
: compute-next-methods ( -- )
[ standard-generic? ] instances [
"methods" word-prop [
nip dup
unsafe-next-method-quot
"next-method-quot" set-word-prop
nip dup next-method* "next-method" set-word-prop
] assoc-each
] each
"vocab:tools/deploy/shaker/next-methods.factor" run-file ;