fix the maximum range for type-masks
This commit is contained in:
parent
25419f9a9a
commit
6334dfb939
|
@ -11,7 +11,7 @@
|
|||
;;
|
||||
;; - - Details - -
|
||||
;;
|
||||
;; Type masks are represented with a simple 31-bit fixnum.
|
||||
;; Type masks are represented with a simple 30-bit fixnum.
|
||||
;;
|
||||
;; If a bit flag in a Type's bitmask is set to 1, it means the Type
|
||||
;; _may_ overlap with the values described by that bit flag.
|
||||
|
@ -51,10 +51,13 @@
|
|||
;; type mask predicate
|
||||
(define-syntax type-mask? (make-rename-transformer #'fixnum?))
|
||||
|
||||
;; define the max size of type masks
|
||||
;; define the max size of type masks -- if we limit the size to
|
||||
;; 30 we are guaranteed to be a fixnum on 32 and 64 bit machines.
|
||||
;; (30 is the max number of bits available in a 2's complement
|
||||
;; tagged integer on a 32-bit machine)
|
||||
(module const racket/base
|
||||
(provide max-mask-size)
|
||||
(define max-mask-size 31))
|
||||
(define max-mask-size 30))
|
||||
(require 'const (for-syntax 'const))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user