Tweak to reduce image size; don't produce prototypes for tuples with all slots set to f
parent
d9bb18b193
commit
8321a41db0
|
@ -135,7 +135,8 @@ ERROR: bad-superclass class ;
|
||||||
dup boa-check-quot "boa-check" set-word-prop ;
|
dup boa-check-quot "boa-check" set-word-prop ;
|
||||||
|
|
||||||
: tuple-prototype ( class -- prototype )
|
: tuple-prototype ( class -- prototype )
|
||||||
[ all-slots [ initial>> ] map ] keep slots>tuple ;
|
[ all-slots [ initial>> ] map ] keep
|
||||||
|
over [ ] contains? [ slots>tuple ] [ 2drop f ] if ;
|
||||||
|
|
||||||
: define-tuple-prototype ( class -- )
|
: define-tuple-prototype ( class -- )
|
||||||
dup tuple-prototype "prototype" set-word-prop ;
|
dup tuple-prototype "prototype" set-word-prop ;
|
||||||
|
@ -304,7 +305,8 @@ M: tuple hashcode*
|
||||||
] recursive-hashcode ;
|
] recursive-hashcode ;
|
||||||
|
|
||||||
M: tuple-class new
|
M: tuple-class new
|
||||||
"prototype" word-prop (clone) ;
|
dup "prototype" word-prop
|
||||||
|
[ (clone) ] [ tuple-layout <tuple> ] ?if ;
|
||||||
|
|
||||||
M: tuple-class boa
|
M: tuple-class boa
|
||||||
[ "boa-check" word-prop call ]
|
[ "boa-check" word-prop call ]
|
||||||
|
|
Loading…
Reference in New Issue