From f55d5445d684cf9cc242e83472257b453fc86c4d Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Tue, 17 Sep 2013 09:45:22 -0700 Subject: [PATCH] Minor fix to number matching in complex opts. original commit: 73c03103699bfd2ccaa7ff97bb831d77d5ac4bfd --- .../typed-racket/optimizer/float-complex.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt index c35866f2..3d90ae2e 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt @@ -317,15 +317,15 @@ ;; else, do the unboxing here ;; we can unbox literals right away - (pattern (quote n*) + (pattern (quote n*:number) #:do [(define n (syntax->datum #'n*))] - #:when (and (number? n) (not (equal? (imag-part n) 0))) + #:when (not (equal? (imag-part n) 0)) #:with (real-binding imag-binding) (binding-names) #:do [(log-unboxing-opt "unboxed literal")] #:with (bindings ...) #`(((real-binding) '#,(exact->inexact (real-part n))) ((imag-binding) '#,(exact->inexact (imag-part n))))) - (pattern (quote n*) + (pattern (quote n*:number) #:do [(define n (syntax->datum #'n*))] #:when (real? n) #:with real-binding (generate-temporary "unboxed-real-")