Fix another problem with call( inline caching

db4
Slava Pestov 2009-11-13 07:17:00 -06:00
parent 7377c96a21
commit 5470330c45
3 changed files with 13 additions and 3 deletions

View File

@ -127,8 +127,8 @@ M: object bump-effect-counter* drop f ;
bi ;
: bump-effect-counter? ( -- ? )
changed-effects get old-definitions get first assoc-intersect assoc-empty? not
new-definitions get first [ drop bump-effect-counter* ] assoc-any?
changed-effects get new-words get assoc-diff assoc-empty? not
changed-definitions get [ drop bump-effect-counter* ] assoc-any?
or ;
: bump-effect-counter ( -- )
@ -156,6 +156,7 @@ PRIVATE>
H{ } clone changed-effects set
H{ } clone outdated-generics set
H{ } clone outdated-tuples set
H{ } clone new-words set
H{ } clone new-classes set
[ finish-compilation-unit ] [ ] cleanup
] with-scope ; inline
@ -168,6 +169,7 @@ PRIVATE>
H{ } clone outdated-generics set
H{ } clone forgotten-definitions set
H{ } clone outdated-tuples set
H{ } clone new-words set
H{ } clone new-classes set
<definitions> new-definitions set
<definitions> old-definitions set

View File

@ -21,8 +21,16 @@ SYMBOL: changed-generics
SYMBOL: outdated-generics
SYMBOL: new-words
SYMBOL: new-classes
: new-word ( word -- )
dup new-words get set-in-unit ;
: new-word? ( word -- ? )
new-words get key? ;
: new-class ( word -- )
dup new-classes get set-in-unit ;

View File

@ -135,7 +135,7 @@ M: word reset-word
] tri ;
: <word> ( name vocab -- word )
2dup [ hashcode ] bi@ bitxor >fixnum (word) ;
2dup [ hashcode ] bi@ bitxor >fixnum (word) dup new-word ;
: gensym ( -- word )
"( gensym )" f \ gensym counter >fixnum (word) ;