issue #358: Rename all of the words depends-on-* to add-depends-on*

db4
Doug Coleman 2012-06-20 23:55:24 -07:00
parent efbdf222a7
commit 1c3deddf61
15 changed files with 61 additions and 61 deletions

View File

@ -127,7 +127,7 @@ ERROR: local-allocation-error ;
; ;
MACRO: (simple-local-allot) ( c-type -- quot ) MACRO: (simple-local-allot) ( c-type -- quot )
[ depends-on-c-type ] [ add-depends-on-c-type ]
[ dup '[ _ heap-size _ c-type-align (local-allot) ] ] bi ; [ dup '[ _ heap-size _ c-type-align (local-allot) ] ] bi ;
: [hairy-local-allot] ( c-type initial -- quot ) : [hairy-local-allot] ( c-type initial -- quot )

View File

@ -139,11 +139,11 @@ M: struct-bit-slot-spec (writer-quot)
drop [ >c-ptr ] ; drop [ >c-ptr ] ;
MACRO: read-struct-slot ( slot -- ) MACRO: read-struct-slot ( slot -- )
dup type>> depends-on-c-type dup type>> add-depends-on-c-type
(reader-quot) ; (reader-quot) ;
MACRO: write-struct-slot ( slot -- ) MACRO: write-struct-slot ( slot -- )
dup type>> depends-on-c-type dup type>> add-depends-on-c-type
(writer-quot) ; (writer-quot) ;
PRIVATE> PRIVATE>

View File

@ -58,14 +58,14 @@ GENERIC: cleanup* ( node -- node/nodes )
: record-predicate-folding ( #call -- ) : record-predicate-folding ( #call -- )
>predicate-folding< pick literal?>> >predicate-folding< pick literal?>>
[ [ literal>> ] 2dip depends-on-instance-predicate ] [ [ literal>> ] 2dip add-depends-on-instance-predicate ]
[ [ class>> ] 2dip depends-on-class-predicate ] [ [ class>> ] 2dip add-depends-on-class-predicate ]
if ; if ;
: record-folding ( #call -- ) : record-folding ( #call -- )
dup word>> predicate? dup word>> predicate?
[ record-predicate-folding ] [ record-predicate-folding ]
[ word>> depends-on-definition ] [ word>> add-depends-on-definition ]
if ; if ;
: cleanup-folding ( #call -- nodes ) : cleanup-folding ( #call -- nodes )
@ -74,15 +74,15 @@ GENERIC: cleanup* ( node -- node/nodes )
! Method inlining ! Method inlining
: add-method-dependency ( #call -- ) : add-method-dependency ( #call -- )
dup method>> word? [ dup method>> word? [
[ [ class>> ] [ word>> ] bi depends-on-generic ] [ [ class>> ] [ word>> ] bi add-depends-on-generic ]
[ [ class>> ] [ word>> ] [ method>> ] tri depends-on-method ] [ [ class>> ] [ word>> ] [ method>> ] tri add-depends-on-method ]
bi bi
] [ drop ] if ; ] [ drop ] if ;
: record-inlining ( #call -- ) : record-inlining ( #call -- )
dup method>> dup method>>
[ add-method-dependency ] [ add-method-dependency ]
[ word>> depends-on-definition ] if ; [ word>> add-depends-on-definition ] if ;
: cleanup-inlining ( #call -- nodes ) : cleanup-inlining ( #call -- nodes )
[ record-inlining ] [ body>> cleanup ] bi ; [ record-inlining ] [ body>> cleanup ] bi ;

View File

@ -91,7 +91,7 @@ M: #push remove-dead-code*
] [ drop f ] if ; ] [ drop f ] if ;
: remove-flushable-call ( #call -- node ) : remove-flushable-call ( #call -- node )
[ word>> depends-on-flushable ] [ word>> add-depends-on-flushable ]
[ in-d>> <#drop> remove-dead-code* ] [ in-d>> <#drop> remove-dead-code* ]
bi ; bi ;

View File

@ -28,7 +28,7 @@ GENERIC: finalize* ( node -- nodes )
: splice-final ( quot -- nodes ) splice-quot finalize ; : splice-final ( quot -- nodes ) splice-quot finalize ;
: splice-predicate ( word -- nodes ) : splice-predicate ( word -- nodes )
[ depends-on-definition ] [ def>> splice-final ] bi ; [ add-depends-on-definition ] [ def>> splice-final ] bi ;
M: #copy finalize* drop f ; M: #copy finalize* drop f ;

View File

@ -314,7 +314,7 @@ generic-comparison-ops [
dup literal>> classoid? dup literal>> classoid?
[ [
literal>> literal>>
[ depends-on-class ] [ add-depends-on-class ]
[ predicate-output-infos ] [ predicate-output-infos ]
bi bi
] [ 2drop object-info ] if ] [ 2drop object-info ] if

View File

@ -32,26 +32,26 @@ M: #push propagate-before
: set-value-infos ( infos values -- ) : set-value-infos ( infos values -- )
[ set-value-info ] 2each ; [ set-value-info ] 2each ;
GENERIC: depends-on-class ( obj -- ) GENERIC: add-depends-on-class ( obj -- )
M: class depends-on-class M: class add-depends-on-class
depends-on-conditionally ; add-depends-on-conditionally ;
M: maybe depends-on-class M: maybe add-depends-on-class
class>> depends-on-class ; class>> add-depends-on-class ;
M: anonymous-union depends-on-class M: anonymous-union add-depends-on-class
members>> [ depends-on-class ] each ; members>> [ add-depends-on-class ] each ;
M: anonymous-intersection depends-on-class M: anonymous-intersection add-depends-on-class
participants>> [ depends-on-class ] each ; participants>> [ add-depends-on-class ] each ;
M: #declare propagate-before M: #declare propagate-before
#! We need to force the caller word to recompile when the #! We need to force the caller word to recompile when the
#! classes mentioned in the declaration are redefined, since #! classes mentioned in the declaration are redefined, since
#! now we're making assumptions but their definitions. #! now we're making assumptions but their definitions.
declaration>> [ declaration>> [
[ depends-on-class ] [ add-depends-on-class ]
[ <class-info> swap refine-value-info ] [ <class-info> swap refine-value-info ]
bi bi
] assoc-each ; ] assoc-each ;
@ -123,7 +123,7 @@ M: #declare propagate-before
#! class definition itself. #! class definition itself.
[ in-d>> first value-info ] [ in-d>> first value-info ]
[ "predicating" word-prop ] bi* [ "predicating" word-prop ] bi*
[ nip depends-on-conditionally ] [ nip add-depends-on-conditionally ]
[ predicate-output-infos 1array ] 2bi ; [ predicate-output-infos 1array ] 2bi ;
: default-output-value-infos ( #call word -- infos ) : default-output-value-infos ( #call word -- infos )

View File

@ -167,7 +167,7 @@ ERROR: bad-partial-eval quot word ;
: inline-new ( class -- quot/f ) : inline-new ( class -- quot/f )
dup tuple-class? [ dup tuple-class? [
dup tuple-layout dup tuple-layout
[ depends-on-tuple-layout ] [ add-depends-on-tuple-layout ]
[ drop all-slots [ initial>> literalize ] [ ] map-as ] [ drop all-slots [ initial>> literalize ] [ ] map-as ]
[ nip ] [ nip ]
2tri 2tri
@ -318,7 +318,7 @@ M\ set intersect [ intersect-quot ] 1 define-partial-eval
! We want to constant-fold calls to heap-size, and recompile those ! We want to constant-fold calls to heap-size, and recompile those
! calls when a C type is redefined ! calls when a C type is redefined
\ heap-size [ \ heap-size [
[ depends-on-c-type ] [ heap-size '[ _ ] ] bi [ add-depends-on-c-type ] [ heap-size '[ _ ] ] bi
] 1 define-partial-eval ] 1 define-partial-eval
! Eliminates a few redundant checks here and there ! Eliminates a few redundant checks here and there

View File

@ -38,7 +38,7 @@ TUPLE: alien-callback-params < alien-node-params xt ;
return-prep-quot infer-quot-here ; return-prep-quot infer-quot-here ;
: pop-return ( params -- params ) : pop-return ( params -- params )
pop-literal [ depends-on-c-type ] [ nip >>return ] bi ; pop-literal [ add-depends-on-c-type ] [ nip >>return ] bi ;
: pop-library ( params -- params ) : pop-library ( params -- params )
pop-literal nip >>library ; pop-literal nip >>library ;
@ -47,7 +47,7 @@ TUPLE: alien-callback-params < alien-node-params xt ;
pop-literal nip >>function ; pop-literal nip >>function ;
: pop-params ( params -- params ) : pop-params ( params -- params )
pop-literal [ [ depends-on-c-type ] each ] [ nip >>parameters ] bi ; pop-literal [ [ add-depends-on-c-type ] each ] [ nip >>parameters ] bi ;
: pop-abi ( params -- params ) : pop-abi ( params -- params )
pop-literal nip >>abi ; pop-literal nip >>abi ;

View File

@ -85,7 +85,7 @@ GENERIC: apply-object ( obj -- )
M: wrapper apply-object M: wrapper apply-object
wrapped>> wrapped>>
[ dup word? [ depends-on-effect ] [ drop ] if ] [ dup word? [ add-depends-on-effect ] [ drop ] if ]
[ push-literal ] [ push-literal ]
bi ; bi ;

View File

@ -30,26 +30,26 @@ SYMBOLS: effect-dependency conditional-dependency definition-dependency ;
] [ 3drop ] if ] [ 3drop ] if
] if ; ] if ;
: depends-on-effect ( word -- ) : add-depends-on-effect ( word -- )
effect-dependency depends-on ; effect-dependency depends-on ;
: depends-on-conditionally ( word -- ) : add-depends-on-conditionally ( word -- )
conditional-dependency depends-on ; conditional-dependency depends-on ;
: depends-on-definition ( word -- ) : add-depends-on-definition ( word -- )
definition-dependency depends-on ; definition-dependency depends-on ;
GENERIC: depends-on-c-type ( c-type -- ) GENERIC: add-depends-on-c-type ( c-type -- )
M: void depends-on-c-type drop ; M: void add-depends-on-c-type drop ;
M: c-type-word depends-on-c-type depends-on-definition ; M: c-type-word add-depends-on-c-type add-depends-on-definition ;
M: array depends-on-c-type M: array add-depends-on-c-type
[ word? ] filter [ depends-on-definition ] each ; [ word? ] filter [ add-depends-on-definition ] each ;
M: pointer depends-on-c-type M: pointer add-depends-on-c-type
to>> depends-on-c-type ; to>> add-depends-on-c-type ;
! Generic words that the current quotation depends on ! Generic words that the current quotation depends on
SYMBOL: generic-dependencies SYMBOL: generic-dependencies
@ -57,7 +57,7 @@ SYMBOL: generic-dependencies
: ?class-or ( class class/f -- class' ) : ?class-or ( class class/f -- class' )
[ class-or ] when* ; [ class-or ] when* ;
: depends-on-generic ( class generic -- ) : add-depends-on-generic ( class generic -- )
generic-dependencies get dup generic-dependencies get dup
[ [ ?class-or ] change-at ] [ 3drop ] if ; [ [ ?class-or ] change-at ] [ 3drop ] if ;
@ -73,7 +73,7 @@ GENERIC: satisfied? ( dependency -- ? )
TUPLE: depends-on-class-predicate class1 class2 result ; TUPLE: depends-on-class-predicate class1 class2 result ;
: depends-on-class-predicate ( class1 class2 result -- ) : add-depends-on-class-predicate ( class1 class2 result -- )
\ depends-on-class-predicate add-conditional-dependency ; \ depends-on-class-predicate add-conditional-dependency ;
M: depends-on-class-predicate satisfied? M: depends-on-class-predicate satisfied?
@ -84,7 +84,7 @@ M: depends-on-class-predicate satisfied?
TUPLE: depends-on-instance-predicate object class result ; TUPLE: depends-on-instance-predicate object class result ;
: depends-on-instance-predicate ( object class result -- ) : add-depends-on-instance-predicate ( object class result -- )
\ depends-on-instance-predicate add-conditional-dependency ; \ depends-on-instance-predicate add-conditional-dependency ;
M: depends-on-instance-predicate satisfied? M: depends-on-instance-predicate satisfied?
@ -95,8 +95,8 @@ M: depends-on-instance-predicate satisfied?
TUPLE: depends-on-next-method class generic next-method ; TUPLE: depends-on-next-method class generic next-method ;
: depends-on-next-method ( class generic next-method -- ) : add-depends-on-next-method ( class generic next-method -- )
over depends-on-conditionally over add-depends-on-conditionally
\ depends-on-next-method add-conditional-dependency ; \ depends-on-next-method add-conditional-dependency ;
M: depends-on-next-method satisfied? M: depends-on-next-method satisfied?
@ -107,8 +107,8 @@ M: depends-on-next-method satisfied?
TUPLE: depends-on-method class generic method ; TUPLE: depends-on-method class generic method ;
: depends-on-method ( class generic method -- ) : add-depends-on-method ( class generic method -- )
over depends-on-conditionally over add-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?
@ -119,8 +119,8 @@ M: depends-on-method satisfied?
TUPLE: depends-on-tuple-layout class layout ; TUPLE: depends-on-tuple-layout class layout ;
: depends-on-tuple-layout ( class layout -- ) : add-depends-on-tuple-layout ( class layout -- )
[ drop depends-on-conditionally ] [ drop add-depends-on-conditionally ]
[ \ depends-on-tuple-layout add-conditional-dependency ] 2bi ; [ \ depends-on-tuple-layout add-conditional-dependency ] 2bi ;
M: depends-on-tuple-layout satisfied? M: depends-on-tuple-layout satisfied?
@ -128,8 +128,8 @@ M: depends-on-tuple-layout satisfied?
TUPLE: depends-on-flushable word ; TUPLE: depends-on-flushable word ;
: depends-on-flushable ( word -- ) : add-depends-on-flushable ( word -- )
[ depends-on-conditionally ] [ add-depends-on-conditionally ]
[ \ depends-on-flushable add-conditional-dependency ] bi ; [ \ depends-on-flushable add-conditional-dependency ] bi ;
M: depends-on-flushable satisfied? M: depends-on-flushable satisfied?
@ -137,8 +137,8 @@ M: depends-on-flushable satisfied?
TUPLE: depends-on-final class ; TUPLE: depends-on-final class ;
: depends-on-final ( word -- ) : add-depends-on-final ( word -- )
[ depends-on-conditionally ] [ add-depends-on-conditionally ]
[ \ depends-on-final add-conditional-dependency ] bi ; [ \ depends-on-final add-conditional-dependency ] bi ;
M: depends-on-final satisfied? M: depends-on-final satisfied?

View File

@ -147,7 +147,7 @@ M: declared-effect (undeclared-known) known>> (undeclared-known) ;
: inline-word ( word -- ) : inline-word ( word -- )
commit-literals commit-literals
[ depends-on-definition ] [ add-depends-on-definition ]
[ declare-input-effects ] [ declare-input-effects ]
[ [
dup inline-recursive-label [ dup inline-recursive-label [

View File

@ -48,7 +48,7 @@ IN: stack-checker.known-words
( value -- ) apply-word/effect ; ( value -- ) apply-word/effect ;
: non-inline-word ( word -- ) : non-inline-word ( word -- )
dup depends-on-effect dup add-depends-on-effect
{ {
{ [ dup "shuffle" word-prop ] [ infer-shuffle-word ] } { [ dup "shuffle" word-prop ] [ infer-shuffle-word ] }
{ [ dup "special" word-prop ] [ infer-special ] } { [ dup "special" word-prop ] [ infer-special ] }

View File

@ -127,7 +127,7 @@ IN: stack-checker.transforms
[ "method-class" word-prop ] [ "method-class" word-prop ]
[ "method-generic" word-prop ] bi [ "method-generic" word-prop ] bi
2dup next-method 2dup next-method
depends-on-next-method ; add-depends-on-next-method ;
\ (call-next-method) [ \ (call-next-method) [
[ add-next-method-dependency ] [ add-next-method-dependency ]
@ -140,7 +140,7 @@ IN: stack-checker.transforms
\ boa [ \ boa [
dup tuple-class? [ dup tuple-class? [
dup tuple-layout dup tuple-layout
[ depends-on-tuple-layout ] [ add-depends-on-tuple-layout ]
[ [ "boa-check" word-prop [ ] or ] dip ] 2bi [ [ "boa-check" word-prop [ ] or ] dip ] 2bi
'[ @ _ <tuple-boa> ] '[ @ _ <tuple-boa> ]
] [ ] [

View File

@ -30,14 +30,14 @@ PREDICATE: typed-word < word "typed-word" word-prop >boolean ;
: typed-stack-effect? ( effect -- ? ) : typed-stack-effect? ( effect -- ? )
[ object = ] all? not ; [ object = ] all? not ;
: depends-on-unboxing ( class -- ) : add-depends-on-unboxing ( class -- )
[ dup tuple-layout depends-on-tuple-layout ] [ dup tuple-layout add-depends-on-tuple-layout ]
[ depends-on-final ] [ add-depends-on-final ]
bi ; bi ;
: (unboxer) ( type -- quot ) : (unboxer) ( type -- quot )
dup unboxable-tuple-class? [ dup unboxable-tuple-class? [
dup depends-on-unboxing dup add-depends-on-unboxing
all-slots [ all-slots [
[ name>> reader-word 1quotation ] [ name>> reader-word 1quotation ]
[ class>> (unboxer) ] bi compose [ class>> (unboxer) ] bi compose
@ -57,7 +57,7 @@ PREDICATE: typed-word < word "typed-word" word-prop >boolean ;
: (unboxed-types) ( type -- types ) : (unboxed-types) ( type -- types )
dup unboxable-tuple-class? dup unboxable-tuple-class?
[ [
dup depends-on-unboxing dup add-depends-on-unboxing
all-slots [ class>> (unboxed-types) ] map concat all-slots [ class>> (unboxed-types) ] map concat
] ]
[ 1array ] if ; [ 1array ] if ;
@ -83,7 +83,7 @@ DEFER: make-boxer
: boxer ( type -- quot ) : boxer ( type -- quot )
dup unboxable-tuple-class? dup unboxable-tuple-class?
[ [
dup depends-on-unboxing dup add-depends-on-unboxing
[ all-slots [ class>> ] map make-boxer ] [ all-slots [ class>> ] map make-boxer ]
[ [ boa ] curry ] [ [ boa ] curry ]
bi compose bi compose