Removed useless requires.

original commit: 8b60085a177d40b8a494e8f5aafe7fe52022d225
This commit is contained in:
Vincent St-Amour 2010-09-10 17:19:40 -04:00
parent 71d2819cba
commit 99b35249ab
78 changed files with 78 additions and 78 deletions

View File

@ -8,6 +8,6 @@ apply-plus.rkt line 13 col 7 - * - apply-map
#lang typed/racket
#:optimize
(require racket/unsafe/ops)
(apply + (map add1 (list 1 2 3)))
(apply * (map add1 (list 1 2 3)))

View File

@ -8,6 +8,6 @@ begin-float.rkt line 13 col 8 - * - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(begin (- 2.0 3.0)
(* 2.0 3.0))

View File

@ -6,7 +6,7 @@ binary-fixnum.rkt line 12 col 3 - bitwise-and - binary fixnum
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(: f (All (X) ((Vectorof X) -> Natural)))
(define (f v)
(bitwise-and (vector-length v) 1))

View File

@ -7,5 +7,5 @@ binary-nonzero-fixnum.rkt line 11 col 1 - modulo - binary nonzero fixnum
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(modulo (vector-length '#(1 2 3)) 2)

View File

@ -10,7 +10,7 @@ box.rkt line 19 col 1 - unbox - box
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(: x (Boxof Integer))
(define x (box 1))

View File

@ -6,6 +6,6 @@ cross-module-struct2.rkt line 11 col 1 - x-x - struct ref
#lang typed/scheme #:optimize
(require (file "cross-module-struct.rkt") racket/unsafe/ops)
(require (file "cross-module-struct.rkt"))
(define a (make-x 1))
(x-x a)

View File

@ -9,7 +9,7 @@ dead-else.rkt line 17 col 14 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(display (if (number? 3)
(+ 2.0 3.0)
(+ 4.0 5.0)))

View File

@ -9,7 +9,7 @@ dead-then.rkt line 18 col 14 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(display (if (number? "eh")
(+ 2.0 3.0)
(+ 4.0 5.0)))

View File

@ -7,6 +7,6 @@ define-begin-float.rkt line 12 col 18 - * - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(define a (begin (display (- 2.0 3.0))
(* 2.0 3.0)))

View File

@ -5,5 +5,5 @@ define-call-float.rkt line 9 col 17 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(define x (cons (+ 1.0 2.0) 3.0))

View File

@ -5,5 +5,5 @@ define-float.rkt line 9 col 11 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(define x (+ 1.0 2.0))

View File

@ -5,5 +5,5 @@ define-pair.rkt line 9 col 11 - car - pair
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(define x (car '(1 3)))

View File

@ -6,5 +6,5 @@ double-float.rkt line 10 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 2.0 2.0 2.0)

View File

@ -6,5 +6,5 @@ exact-inexact.rkt line 10 col 1 - exact->inexact - int to float
#lang typed/scheme
#:optimize
(require racket/flonum)
(exact->inexact (expt 10 100)) ; must not be a fixnum

View File

@ -8,5 +8,5 @@ fixnum-comparison.rkt line 12 col 1 - < - binary fixnum
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(< (vector-length '#(1 2 3)) (string-length "asdf"))

View File

@ -6,5 +6,5 @@ float-comp.rkt line 10 col 1 - < - binary float comp
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(< 1.0 2.0)

View File

@ -6,7 +6,7 @@ float-fun.rkt line 12 col 3 - + - binary float
#lang typed/racket
#:optimize
(require racket/unsafe/ops)
(: f (Float -> Float))
(define (f x)
(+ x 1.0))

View File

@ -9,6 +9,6 @@ float-promotion.rkt line 14 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops racket/flonum)
(+ (modulo 1 1) 2.0)
(+ (expt 100 100) 2.0)

View File

@ -6,5 +6,5 @@ flvector-length.rkt line 10 col 1 - flvector-length - flvector-length
#lang typed/scheme
#:optimize
(require racket/unsafe/ops racket/flonum)
(require racket/flonum)
(flvector-length (flvector 0.0 1.2))

View File

@ -6,5 +6,5 @@ fx-fl.rkt line 10 col 1 - exact->inexact - fixnum to float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(exact->inexact 1)

View File

@ -18,6 +18,6 @@ in-bytes.rkt line 22 col 0 - (letrec-values (((for-loop) (lambda (fold-var pos)
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(for: ((i : Integer #"123"))
(display i))

View File

@ -18,6 +18,6 @@ in-list.rkt line 22 col 0 - (letrec-values (((for-loop) (lambda (fold-var pos) (
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(for: ((i : Natural '(1 2 3)))
(display i))

View File

@ -18,6 +18,6 @@ in-string.rkt line 22 col 0 - (letrec-values (((for-loop) (lambda (fold-var pos)
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(for: ((i : Char "123"))
(display i))

View File

@ -18,6 +18,6 @@ in-vector.rkt line 22 col 0 - (letrec-values (((for-loop) (lambda (fold-var pos)
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(for: ((i : Integer (vector 1 2 3)))
(display i))

View File

@ -5,5 +5,5 @@
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(< 1.0 2)

View File

@ -29,7 +29,7 @@ invalid-unboxed-let.rkt line 38 col 11 - (#%app + t1 t1) - unboxed inexact compl
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let ((t1 (+ 1.0+2.0i 2.0+4.0i)) ; can be unboxed
(t2 (+ 3.0+6.0i 4.0+8.0i)) ; can't be unboxed

View File

@ -19,7 +19,7 @@ invalid-unboxed-let2.rkt line 26 col 2 - (#%app + t1 t2) - unboxed inexact compl
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; unboxing of let bindings does not currently work with multiple values
(let-values (((t1 t2) (values (+ 1.0+2.0i 2.0+4.0i) (+ 3.0+6.0i 4.0+8.0i))))

View File

@ -7,5 +7,5 @@ known-vector-length.rkt line 11 col 6 - vector-length - known-length vector-leng
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 2 (vector-length (ann (vector 1 2) (Vector Integer Integer))))

View File

@ -8,6 +8,6 @@ let-float.rkt line 13 col 3 - * - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let ((x (+ 3.0 2.0)))
(* 9.0 x))

View File

@ -8,7 +8,7 @@ let-rhs.rkt line 13 col 0 - (let-values (((x) (#%app + (quote 1.0) (quote 2.0)))
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let ((x (+ 1.0 2.0)))
x)

View File

@ -8,7 +8,7 @@ literal-int.rkt line 13 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 1 2.0)
1

View File

@ -9,6 +9,6 @@ magnitude.rkt line 14 col 0 - (#%app magnitude (quote 3.0+4.0i)) - unboxed inexa
#lang typed/racket/base
#:optimize
(require racket/unsafe/ops)
(magnitude 3.0+4.0i)

View File

@ -8,6 +8,6 @@ make-flrectangular.rkt line 13 col 1 - make-flrectangular - binary float comp
#lang typed/scheme
#:optimize
(require racket/unsafe/ops racket/flonum)
(require racket/flonum)
(make-rectangular 1.0 2.2)
(make-flrectangular 1.0 2.2)

View File

@ -22,7 +22,7 @@ make-polar.rkt line 33 col 40 - imag-part - unboxed inexact complex
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; top level
(make-polar 1.0 1.0)

View File

@ -10,6 +10,6 @@ maybe-exact-complex.rkt line 15 col 0 - (#%app + (quote 1.0+2.0i) (quote 2+4i))
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 1.0+2.0i 2+4i)

View File

@ -12,7 +12,7 @@ mpair.rkt line 27 col 7 - mcar - mutable pair
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(: x (MPairof Integer Float))
(define x (mcons 1 1.0))
(mcar x)

View File

@ -6,5 +6,5 @@ n-ary-float.rkt line 10 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 1.0 2.0 3.0)

View File

@ -7,5 +7,5 @@ nested-float.rkt line 11 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 2.0 (+ 3.0 4.0))

View File

@ -7,5 +7,5 @@ nested-float2.rkt line 11 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 2.0 (* 3.0 4.0))

View File

@ -44,7 +44,7 @@ nested-let-loop.rkt line 49 col 6 - loop1 - unboxed let loop
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let: loop1 : Inexact-Complex
((x : (Listof Inexact-Complex) '(1.0+2.0i 2.0+4.0i))

View File

@ -7,5 +7,5 @@ nested-pair1.rkt line 11 col 1 - car - pair
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(car (cdr '(1 2)))

View File

@ -7,5 +7,5 @@ nested-pair2.rkt line 11 col 1 - car - pair
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(car (cdr (cons 3 (cons (cons 2 '()) 1))))

View File

@ -26,7 +26,7 @@ nested-unboxed-let.rkt line 33 col 4 - (#%app + x (quote 3.0+6.0i)) - unboxed in
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let ((x (+ 1.0+2.0i 2.0+3.0i)))
(let ((x (+ x 2.0+3.0i)))

View File

@ -35,7 +35,7 @@ one-arg-arith.rkt line 55 col 1 - max - unary number
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(- 12)
(- 12.0)

View File

@ -5,7 +5,7 @@ pair-fun.rkt line 13 col 7 - car - pair
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(: f ((Listof Integer) -> Integer))
(define (f x)
(if (null? x)

View File

@ -25,7 +25,7 @@ real-part-loop.rkt line 31 col 6 - loop - unboxed let loop
#lang typed/racket/base
#:optimize
(require racket/unsafe/ops)
(ann
(let loop ([v 0.0+1.0i])

View File

@ -6,5 +6,5 @@ simple-float.rkt line 10 col 1 - + - binary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(+ 2.0 3.0)

View File

@ -6,5 +6,5 @@ simple-pair.rkt line 10 col 1 - car - pair
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(car (cons 1 2))

View File

@ -11,7 +11,7 @@ sqrt-segfault.rkt line 22 col 0 - (let-values (((mag) (let-values (((val) (#%app
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; from the nbody-generic benchmark.
;; the result of sqrt was an Inexact-Complex, so inexact complex opts kicked

View File

@ -5,7 +5,7 @@ sqrt.rkt line 11 col 3 - sqrt - unary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(: f (Nonnegative-Float -> Nonnegative-Float))
(define (f x)
(sqrt x))

View File

@ -9,7 +9,7 @@
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(string-length "eh")
(bytes-length #"eh")

View File

@ -7,7 +7,7 @@ structs.rkt line 14 col 1 - set-pt-y! - struct set
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(define-struct: pt ((x : Integer) (y : Integer)) #:mutable)
(define a (pt 3 4))
(pt-x a)

View File

@ -7,5 +7,5 @@ unary-fixnum-nested.rkt line 11 col 1 - abs - unary fixnum
#lang typed/scheme
#:optimize
(require racket/unsafe/ops racket/fixnum)
(abs (bitwise-not (length '(1 2 3))))

View File

@ -6,5 +6,5 @@ unary-fixnum.rkt line 10 col 1 - bitwise-not - unary fixnum
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(bitwise-not 4)

View File

@ -6,5 +6,5 @@ unary-float.rkt line 10 col 1 - sin - unary float
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(sin 2.0)

View File

@ -50,7 +50,7 @@ unboxed-for.rkt line 55 col 0 - (letrec-values (((for-loop) (lambda (sum pos) (i
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(for/fold: : Inexact-Complex ((sum : Inexact-Complex 0.0+0.0i))
((i : Inexact-Complex '(1.0+2.0i 2.0+4.0i)))

View File

@ -23,7 +23,7 @@ unboxed-let-functions1.rkt line 30 col 3 - f - call to fun with unboxed args
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; simple case, function with single complex arg
(let ((f (lambda: ((x : Inexact-Complex)) (+ x 3.0+6.0i))))

View File

@ -29,7 +29,7 @@ unboxed-let-functions2.rkt line 37 col 3 - f - call to fun with unboxed args
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; function with multiple complex args
(let ((f (lambda: ((x : Inexact-Complex) (y : Inexact-Complex))

View File

@ -23,7 +23,7 @@ unboxed-let-functions3.rkt line 31 col 3 - f - call to fun with unboxed args
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; function with a mix of complex and non-complex args
(let ((f (lambda: ((x : Inexact-Complex) (y : Float))

View File

@ -23,7 +23,7 @@ unboxed-let-functions4.rkt line 31 col 3 - f - call to fun with unboxed args
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; function with a mix of complex and non-complex args, non-complex first
(let ((f (lambda: ((y : Float) (x : Inexact-Complex))

View File

@ -12,7 +12,7 @@ unboxed-let-functions5.rkt line 22 col 12 - (#%app + (quote 1.0+2.0i) (quote 2.0
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; invalid: f "escapes", according to our analysis
(letrec: ((f : (Inexact-Complex -> Inexact-Complex)

View File

@ -28,7 +28,7 @@ unboxed-let-functions6.rkt line 33 col 6 - loop - unboxed let loop
#lang typed/scheme
#:optimize
(require racket/unsafe/ops racket/flonum)
(let: loop : Inexact-Complex ((z : Inexact-Complex 0.0+0.0i)
(l : (Listof Integer) '(1 2 3)))

View File

@ -26,7 +26,7 @@ unboxed-let-functions7.rkt line 31 col 6 - loop - unboxed let loop
#lang typed/scheme
#:optimize
(require racket/unsafe/ops racket/flonum)
(let: loop : Inexact-Complex ((z : Inexact-Complex 0.0+0.0i)
(l : (Listof Integer) '(1 2 3)))

View File

@ -11,7 +11,7 @@ unboxed-let-functions8.rkt line 16 col 0 - (letrec-values (((f) (lambda (x) (#%a
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(letrec: ((f : (Inexact-Complex -> Inexact-Complex) (lambda (x) (+ x 2.0+4.0i)))
(g : (Inexact-Complex -> Inexact-Complex) f)) ; f escapes! can't unbox it's args

View File

@ -32,7 +32,7 @@ unboxed-let.rkt line 40 col 2 - (#%app + t2 t3) - unboxed inexact complex
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let* ((t1 (+ 1.0+2.0i 2.0+4.0i))
(t2 (- t1 3.0+6.0i))

View File

@ -25,7 +25,7 @@ unboxed-let2.rkt line 32 col 2 - (#%app + t1 t2) - unboxed inexact complex
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(let ((t1 (+ 1.0+2.0i 2.0+4.0i))
(t2 (+ 3.0+6.0i 4.0+8.0i)))

View File

@ -19,7 +19,7 @@ unboxed-let3.rkt line 34 col 6 - (#%app + x (quote 2.0+4.0i)) - unboxed inexact
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
;; both boxed and unboxed uses, we unbox anyway
;; causes unnecessary boxing/unboxing if we take a boxed path when

View File

@ -18,7 +18,7 @@ unboxed-letrec-syntaxes+values.rkt line 25 col 24 - (#%app + x (quote 2.0+4.0i))
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(letrec-syntaxes+values (((s) (syntax-rules () [(_ x) x])))
(((x) (+ 1.0+2.0i 2.0+4.0i)))

View File

@ -23,7 +23,7 @@ unboxed-letrec.rkt line 31 col 2 - (#%app + x y) - unboxed inexact complex
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(letrec: ((f : (Any -> Any) (lambda: ((x : Any)) (f x)))
(x : Inexact-Complex 1.0+2.0i)

View File

@ -7,7 +7,7 @@ vector-length-nested.rkt line 12 col 2 - vector-ref - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-length
(vector-ref
(ann (vector (vector 1 2) 2 3)

View File

@ -6,5 +6,5 @@ vector-length.rkt line 10 col 1 - vector-length - vector-length
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-length (vector 1 2 3))

View File

@ -9,7 +9,7 @@ vector-ref-set-ref.rkt line 17 col 1 - vector-ref - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(: x (Vector Integer String))
(define x (vector 1 "1"))
(vector-ref x 0)

View File

@ -6,5 +6,5 @@ vector-ref.rkt line 10 col 1 - vector-ref - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-ref (ann (vector 1 2) (Vector Integer Integer)) 0)

View File

@ -6,5 +6,5 @@ vector-ref2.rkt line 10 col 1 - vector-ref - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-ref (vector 1 2 3) 0)

View File

@ -5,7 +5,7 @@ vector-set-quote.rkt line 9 col 1 - vector-set! - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-set! (ann (vector '(1 2)) (Vector Any))
0
'(+ 1.0 2.0)) ; we should not optimize under quote

View File

@ -5,7 +5,7 @@ vector-set.rkt line 9 col 1 - vector-set! - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-set! (ann (vector 1 2) (Vector Integer Integer))
0
1)

View File

@ -5,5 +5,5 @@ vector-set2.rkt line 9 col 1 - vector-set! - vector
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(vector-set! (vector 1 2) 0 2) ; type is (Vectorof Integer), length is ot known, can't optimize

View File

@ -9,6 +9,6 @@ zero.rkt line 14 col 1 - zero? - float zero?
#lang typed/scheme
#:optimize
(require racket/unsafe/ops)
(zero? 1)
(zero? (sqrt 3.0))