compiler.crossref: add next-method dependency

release
Slava Pestov 2010-01-30 04:12:09 +13:00
parent a13c2fb856
commit c438e84bd0
2 changed files with 18 additions and 8 deletions

View File

@ -72,9 +72,19 @@ TUPLE: depends-on-classes-disjoint class1 class2 ;
M: depends-on-classes-disjoint satisfied?
[ 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 ;
: depends-on-method ( class generic method -- )
over depends-on-conditionally
\ depends-on-method add-conditional-dependency ;
M: depends-on-method satisfied?

View File

@ -124,15 +124,15 @@ IN: stack-checker.transforms
\ 3|| t "no-compile" set-word-prop
\ (call-next-method) [
[
: add-next-method-dependency ( method -- )
[ "method-class" word-prop ]
[ "method-generic" word-prop ] bi
depends-on-generic
] [
[ next-method-quot ]
[ '[ _ no-next-method ] ] bi or
] bi
2dup next-method
depends-on-next-method ;
\ (call-next-method) [
[ add-next-method-dependency ]
[ [ next-method-quot ] [ '[ _ no-next-method ] ] bi or ] bi
] 1 define-transform
\ (call-next-method) t "no-compile" set-word-prop