classes.tuple: don't run out of memory inside 'instances' quotation if optimizing compiler is off

db4
Slava Pestov 2009-09-02 05:19:20 -05:00
parent 988d845c61
commit 389f47086a
1 changed files with 4 additions and 6 deletions
core/classes/tuple

View File

@ -201,16 +201,14 @@ SYMBOL: outdated-tuples
slots>tuple ;
: outdated-tuple? ( tuple assoc -- ? )
over tuple? [
[ [ layout-of ] dip key? ]
[ drop class "forgotten" word-prop not ]
2bi and
] [ 2drop f ] if ;
[ [ layout-of ] dip key? ]
[ drop class "forgotten" word-prop not ]
2bi and ;
: update-tuples ( -- )
outdated-tuples get
dup assoc-empty? [ drop ] [
[ outdated-tuple? ] curry instances
[ [ tuple? ] instances ] dip [ outdated-tuple? ] curry filter
dup [ update-tuple ] map become
] if ;