tools.deploy.shaker: more compact next-method shaking
parent
449be040f8
commit
e42216a569
|
@ -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 ;
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue