]> gitweb.factorcode.org Git - factor.git/commitdiff
slots: Don't coerce flots to integers in tuple slots. Add an initial value for bignum...
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 31 Jul 2012 01:16:44 +0000 (18:16 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 31 Jul 2012 01:16:44 +0000 (18:16 -0700)
core/bootstrap/primitives.factor
core/slots/slots.factor

index c5dd0ee3085c00b0c807688c82146a43ed7ea8a4..acbe1a34e9e561c63ef0abad8e16c448fb8d53f7 100755 (executable)
@@ -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
index 4c6731c93a640553b7ad60235e0c9b57c71295ba..e47f7ce422677330f6b3ecb470d82e2126ddcfe7 100644 (file)
@@ -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 ] }