Move flvector types with other indexing functions.

original commit: d75d6c7ee4e0cabee27689353041387a1512ed48
This commit is contained in:
Vincent St-Amour 2011-07-06 17:50:46 -04:00
parent 9e995978e1
commit 7761a92cca
2 changed files with 17 additions and 17 deletions

View File

@ -10,7 +10,7 @@
racket/promise racket/system
(only-in string-constants/private/only-once maybe-print-message)
(only-in racket/match/runtime match:error matchable? match-equality-test)
racket/unsafe/ops)
racket/unsafe/ops racket/flonum)
(utils tc-utils)
(types union convenience)
(rename-in (types abbrev numeric-tower) [-Number N] [-Boolean B] [-Symbol Sym]))
@ -267,6 +267,22 @@
[make-vector (-poly (a) (cl-> [(index-type) (-vec (Un -Integer a))]
[(index-type a) (-vec a)]))]
;; flvector ops
[flvector? (make-pred-ty -FlVector)]
[flvector (->* (list) -Flonum -FlVector)]
[make-flvector (cl->* (-> index-type -FlVector)
(-> index-type -Flonum -FlVector))]
[flvector-length (-> -FlVector -NonNegFixnum)]
[flvector-ref (-> -FlVector index-type -Flonum)]
[flvector-set! (-> -FlVector index-type -Flonum -Void)]
[unsafe-flvector-length (-> -FlVector -NonNegFixnum)]
[unsafe-flvector-ref (-> -FlVector index-type -Flonum)]
[unsafe-flvector-set! (-> -FlVector index-type -Flonum -Void)]
[bytes-ref (-> -Bytes index-type -Byte)]
[unsafe-bytes-ref (-> -Bytes index-type -Byte)]
[bytes-set! (-> -Bytes index-type index-type -Void)]

View File

@ -1861,19 +1861,3 @@
[unsafe-make-flrectangular make-flrectangular-type]
[unsafe-flreal-part flreal-part-type]
[unsafe-flimag-part flimag-part-type]
;; flvector ops
[flvector? (make-pred-ty -FlVector)]
[flvector (varop -Flonum -FlVector)]
[make-flvector (cl->* (-> -Int -FlVector)
(-> -Int -Flonum -FlVector))]
[flvector-length (-> -FlVector -NonNegFixnum)]
[flvector-ref (-> -FlVector -Int -Flonum)]
[flvector-set! (-> -FlVector -Int -Flonum -Void)]
[unsafe-flvector-length (-> -FlVector -NonNegFixnum)]
[unsafe-flvector-ref (-> -FlVector -Int -Flonum)]
[unsafe-flvector-set! (-> -FlVector -Int -Flonum -Void)]