compiler.crossref: add next-method dependency
parent
a13c2fb856
commit
c438e84bd0
|
@ -72,9 +72,19 @@ TUPLE: depends-on-classes-disjoint class1 class2 ;
|
||||||
M: depends-on-classes-disjoint satisfied?
|
M: depends-on-classes-disjoint satisfied?
|
||||||
[ class1>> ] [ class2>> ] bi classes-intersect? not ;
|
[ class1>> ] [ class2>> ] bi classes-intersect? not ;
|
||||||
|
|
||||||
|
TUPLE: depends-on-next-method class generic next-method ;
|
||||||
|
|
||||||
|
: depends-on-next-method ( class generic next-method -- )
|
||||||
|
over depends-on-conditionally
|
||||||
|
\ depends-on-next-method add-conditional-dependency ;
|
||||||
|
|
||||||
|
M: depends-on-next-method satisfied?
|
||||||
|
[ [ class>> ] [ generic>> ] bi next-method ] [ next-method>> ] bi eq? ;
|
||||||
|
|
||||||
TUPLE: depends-on-method class generic method ;
|
TUPLE: depends-on-method class generic method ;
|
||||||
|
|
||||||
: depends-on-method ( class generic method -- )
|
: depends-on-method ( class generic method -- )
|
||||||
|
over depends-on-conditionally
|
||||||
\ depends-on-method add-conditional-dependency ;
|
\ depends-on-method add-conditional-dependency ;
|
||||||
|
|
||||||
M: depends-on-method satisfied?
|
M: depends-on-method satisfied?
|
||||||
|
|
|
@ -124,15 +124,15 @@ IN: stack-checker.transforms
|
||||||
|
|
||||||
\ 3|| t "no-compile" set-word-prop
|
\ 3|| t "no-compile" set-word-prop
|
||||||
|
|
||||||
\ (call-next-method) [
|
: add-next-method-dependency ( method -- )
|
||||||
[
|
|
||||||
[ "method-class" word-prop ]
|
[ "method-class" word-prop ]
|
||||||
[ "method-generic" word-prop ] bi
|
[ "method-generic" word-prop ] bi
|
||||||
depends-on-generic
|
2dup next-method
|
||||||
] [
|
depends-on-next-method ;
|
||||||
[ next-method-quot ]
|
|
||||||
[ '[ _ no-next-method ] ] bi or
|
\ (call-next-method) [
|
||||||
] bi
|
[ add-next-method-dependency ]
|
||||||
|
[ [ next-method-quot ] [ '[ _ no-next-method ] ] bi or ] bi
|
||||||
] 1 define-transform
|
] 1 define-transform
|
||||||
|
|
||||||
\ (call-next-method) t "no-compile" set-word-prop
|
\ (call-next-method) t "no-compile" set-word-prop
|
||||||
|
|
Loading…
Reference in New Issue