given myself a few extra bits in the port attrs for future extensions

This commit is contained in:
Abdulaziz Ghuloum 2007-12-12 19:47:03 -05:00
parent cef06e3121
commit a6e1ce0658
2 changed files with 24 additions and 24 deletions

View File

@ -29,7 +29,7 @@
(define $set-port-size! set-$port-size!)
(define $set-port-attrs! set-$port-attrs!)
(define $make-port make-$port)
(define fast-attrs-mask #b01111111)
(define fast-attrs-mask #xFFF)
(define ($port-tag x) (if ($port? x) ($port-attrs x) 0))
(define ($port-fast-attrs x) (fxand ($port-tag x) fast-attrs-mask)))
@ -150,31 +150,31 @@
;;; everything above this line will turn into primitive
;;; ----------------------------------------------------------
(define input-port-tag #b000000001)
(define output-port-tag #b000000010)
(define textual-port-tag #b000000100)
(define binary-port-tag #b000001000)
(define fast-char-text-tag #b000010000)
(define fast-u7-text-tag #b000100000)
(define fast-u8-text-tag #b001100000)
(define r6rs-mode-tag #b010000000)
(define closed-port-tag #b100000000)
(define input-port-tag #b00000000000001)
(define output-port-tag #b00000000000010)
(define textual-port-tag #b00000000000100)
(define binary-port-tag #b00000000001000)
(define fast-char-text-tag #b00000000010000)
(define fast-u7-text-tag #b00000000100000)
(define fast-u8-text-tag #b00000001100000)
(define r6rs-mode-tag #b01000000000000)
(define closed-port-tag #b10000000000000)
(define port-type-mask #b000001111)
(define binary-input-port-bits #b000001001)
(define binary-output-port-bits #b000001010)
(define textual-input-port-bits #b000000101)
(define textual-output-port-bits #b000000110)
(define port-type-mask #b00000000001111)
(define binary-input-port-bits #b00000000001001)
(define binary-output-port-bits #b00000000001010)
(define textual-input-port-bits #b00000000000101)
(define textual-output-port-bits #b00000000000110)
(define fast-get-byte-tag #b000001001)
(define fast-get-char-tag #b000010101)
(define fast-get-utf8-tag #b000100101)
(define fast-get-latin-tag #b001100101)
(define fast-get-byte-tag #b00000000001001)
(define fast-get-char-tag #b00000000010101)
(define fast-get-utf8-tag #b00000000100101)
(define fast-get-latin-tag #b00000001100101)
(define fast-put-byte-tag #b000001010)
(define fast-put-char-tag #b000010110)
(define fast-put-utf8-tag #b000100110)
(define fast-put-latin-tag #b001100110)
(define fast-put-byte-tag #b00000000001010)
(define fast-put-char-tag #b00000000010110)
(define fast-put-utf8-tag #b00000000100110)
(define fast-put-latin-tag #b00000001100110)
(define (input-port-name p)
(if (input-port? p)

View File

@ -1 +1 @@
1229
1230