Fix tuple class redefinition not updating constructor

db4
Slava Pestov 2008-01-12 18:00:28 -05:00
parent cece726e54
commit 1a43d30d54
2 changed files with 9 additions and 4 deletions

View File

@ -61,6 +61,11 @@ M: pair (bitfield-quot) ( spec -- quot )
\ set-slots [ <reversed> [get-slots] ] 1 define-transform
\ construct-boa [
dup tuple-size [ <tuple-boa> ] 2curry
] 1 define-transform
: [construct] ( word quot -- newquot )
>r dup +inlined+ depends-on dup tuple-size r> 2curry ;
\ construct-boa
[ [ <tuple-boa> ] [construct] ] 1 define-transform
\ construct-empty
[ [ <tuple> ] [construct] ] 1 define-transform

View File

@ -59,7 +59,7 @@ M: tuple class class-of-tuple ;
] unless
] when 2drop ;
GENERIC: tuple-size ( class -- size ) foldable
GENERIC: tuple-size ( class -- size )
M: tuple-class tuple-size "slot-names" word-prop length 2 + ;