Fix tuple class redefinition not updating constructor
parent
cece726e54
commit
1a43d30d54
|
@ -61,6 +61,11 @@ M: pair (bitfield-quot) ( spec -- quot )
|
||||||
|
|
||||||
\ set-slots [ <reversed> [get-slots] ] 1 define-transform
|
\ set-slots [ <reversed> [get-slots] ] 1 define-transform
|
||||||
|
|
||||||
\ construct-boa [
|
: [construct] ( word quot -- newquot )
|
||||||
dup tuple-size [ <tuple-boa> ] 2curry
|
>r dup +inlined+ depends-on dup tuple-size r> 2curry ;
|
||||||
] 1 define-transform
|
|
||||||
|
\ construct-boa
|
||||||
|
[ [ <tuple-boa> ] [construct] ] 1 define-transform
|
||||||
|
|
||||||
|
\ construct-empty
|
||||||
|
[ [ <tuple> ] [construct] ] 1 define-transform
|
||||||
|
|
|
@ -59,7 +59,7 @@ M: tuple class class-of-tuple ;
|
||||||
] unless
|
] unless
|
||||||
] when 2drop ;
|
] when 2drop ;
|
||||||
|
|
||||||
GENERIC: tuple-size ( class -- size ) foldable
|
GENERIC: tuple-size ( class -- size )
|
||||||
|
|
||||||
M: tuple-class tuple-size "slot-names" word-prop length 2 + ;
|
M: tuple-class tuple-size "slot-names" word-prop length 2 + ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue