Add in-flvector, in-fxvector to TR base environment

original commit: 11bfdce6859a2615a7456a7f30123771eeee528e
This commit is contained in:
Asumu Takikawa 2014-02-11 01:28:31 -05:00
parent 95afd01fde
commit 1a916e17f8
2 changed files with 13 additions and 1 deletions

View File

@ -218,4 +218,9 @@
;; for `define-runtime-module-path`
[(make-template-identifier 'combine-module-path 'racket/runtime-path)
(-> -Variable-Reference -Module-Path -Resolved-Module-Path)]
;; in-fxvector, in-flvector
[(make-template-identifier 'in-fxvector* 'racket/fixnum)
(-> -FxVector (-seq -Fixnum))]
[(make-template-identifier 'in-flvector* 'racket/flonum)
(-> -FlVector (-seq -Flonum))]
)

View File

@ -1961,7 +1961,7 @@
-Void]
[tc-e (place-message-allowed? 'msg) -Boolean]
;; fxvectors
;; fxvectors & flvectors
[tc-e (let ()
(define fx1 (fxvector 0 500 34))
(define fx2 (make-fxvector 20 3))
@ -1970,6 +1970,13 @@
(fxvector-length fx1)
(fxvector-copy fx2 0 5))
-FxVector]
[tc-e (let ()
(define s1 (in-flvector (flvector 1.0 2.0 3.0)))
(define f1 (sequence-ref s1 0))
(define s2 (in-fxvector (fxvector 1 2 3)))
(define f2 (sequence-ref s2 2))
(list f1 f2))
(-lst* -Flonum -Fixnum)]
;; for/hash, for*/hash - PR 14306
[tc-e (for/hash: : (HashTable Symbol String)