slots: Don't coerce flots to integers in tuple slots. Add an initial value for bignums so they can be used as tuple slot types. Fixes #593.
parent
ffe1c510ae
commit
78db66a924
|
@ -197,7 +197,7 @@ bi
|
|||
"null?" "kernel" vocab-words delete-at
|
||||
|
||||
"fixnum" "math" create { } define-builtin
|
||||
"fixnum" "math" create ">fixnum" "math" create 1quotation "coercer" set-word-prop
|
||||
"fixnum" "math" create "integer>fixnum" "math" create 1quotation "coercer" set-word-prop
|
||||
|
||||
"bignum" "math" create { } define-builtin
|
||||
"bignum" "math" create ">bignum" "math" create 1quotation "coercer" set-word-prop
|
||||
|
|
|
@ -71,7 +71,6 @@ M: class instance-check-quot ( class -- quot )
|
|||
{
|
||||
{ [ dup object bootstrap-word eq? ] [ drop [ ] ] }
|
||||
{ [ dup "coercer" word-prop ] [ "coercer" word-prop ] }
|
||||
{ [ dup integer bootstrap-word eq? ] [ drop [ >integer ] ] }
|
||||
[ call-next-method ]
|
||||
} cond ;
|
||||
|
||||
|
@ -200,6 +199,7 @@ M: anonymous-intersection initial-value*
|
|||
{ [ dup "initial-value" word-prop ] [ dup "initial-value" word-prop t ] }
|
||||
{ [ \ f bootstrap-word over class<= ] [ f t ] }
|
||||
{ [ \ array-capacity bootstrap-word over class<= ] [ 0 t ] }
|
||||
{ [ bignum bootstrap-word over class<= ] [ 0 >bignum t ] }
|
||||
{ [ float bootstrap-word over class<= ] [ 0.0 t ] }
|
||||
{ [ string bootstrap-word over class<= ] [ "" t ] }
|
||||
{ [ array bootstrap-word over class<= ] [ { } t ] }
|
||||
|
|
Loading…
Reference in New Issue