From 5d86813267521e3191b91e884418ac39bdb3a8e2 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Fri, 23 Jul 2010 17:51:36 -0400 Subject: [PATCH] Fixed a test that could not work because of shadowing in hand-optimized code. --- .../optimizer/generic/unboxed-let.rkt | 2 +- .../optimizer/hand-optimized/unboxed-let.rkt | 26 +++++++++---------- .../optimizer/non-optimized/unboxed-let.rkt | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/collects/tests/typed-scheme/optimizer/generic/unboxed-let.rkt b/collects/tests/typed-scheme/optimizer/generic/unboxed-let.rkt index bbdf3f63e1..bfa8fff165 100644 --- a/collects/tests/typed-scheme/optimizer/generic/unboxed-let.rkt +++ b/collects/tests/typed-scheme/optimizer/generic/unboxed-let.rkt @@ -4,5 +4,5 @@ (let* ((t1 (+ 1.0+2.0i 2.0+4.0i)) (t2 (- t1 3.0+6.0i)) - (t3 (- t1 4.0+8.0i))) + (t3 4.0+8.0i)) (+ t2 t3)) diff --git a/collects/tests/typed-scheme/optimizer/hand-optimized/unboxed-let.rkt b/collects/tests/typed-scheme/optimizer/hand-optimized/unboxed-let.rkt index 3311dbbf02..4c09cb853d 100644 --- a/collects/tests/typed-scheme/optimizer/hand-optimized/unboxed-let.rkt +++ b/collects/tests/typed-scheme/optimizer/hand-optimized/unboxed-let.rkt @@ -9,18 +9,16 @@ (unboxed-gensym-5 (unsafe-flreal-part unboxed-gensym-4)) (unboxed-gensym-6 (unsafe-flimag-part unboxed-gensym-4)) (unboxed-gensym-7 (unsafe-fl+ unboxed-gensym-2 unboxed-gensym-5)) ; t1-real - (unboxed-gensym-8 (unsafe-fl+ unboxed-gensym-3 unboxed-gensym-6)) ; t1-imag - (unboxed-gensym-9 3.0+6.0i) - (unboxed-gensym-10 (unsafe-flreal-part unboxed-gensym-9)) - (unboxed-gensym-11 (unsafe-flimag-part unboxed-gensym-9)) - (unboxed-gensym-12 (unsafe-fl- unboxed-gensym-7 unboxed-gensym-10)) ; t2-real - (unboxed-gensym-13 (unsafe-fl- unboxed-gensym-8 unboxed-gensym-11)) ; t2-imag - (unboxed-gensym-14 4.0+8.0i) - (unboxed-gensym-15 (unsafe-flreal-part unboxed-gensym-14)) - (unboxed-gensym-16 (unsafe-flimag-part unboxed-gensym-14)) - (unboxed-gensym-17 (unsafe-fl- unboxed-gensym-7 unboxed-gensym-15)) ; t3-real - (unboxed-gensym-18 (unsafe-fl- unboxed-gensym-8 unboxed-gensym-16)) ; t3-imag - (unboxed-gensym-19 (unsafe-fl+ unboxed-gensym-12 unboxed-gensym-17)) - (unboxed-gensym-20 (unsafe-fl+ unboxed-gensym-13 unboxed-gensym-18))) - (unsafe-make-flrectangular unboxed-gensym-19 unboxed-gensym-20)) + (unboxed-gensym-8 (unsafe-fl+ unboxed-gensym-3 unboxed-gensym-6))) ; t1-imag + (let* ((unboxed-gensym-1 3.0+6.0i) + (unboxed-gensym-2 (unsafe-flreal-part unboxed-gensym-1)) + (unboxed-gensym-3 (unsafe-flimag-part unboxed-gensym-1)) + (unboxed-gensym-4 (unsafe-fl- unboxed-gensym-7 unboxed-gensym-2)) ; t2-real + (unboxed-gensym-5 (unsafe-fl- unboxed-gensym-8 unboxed-gensym-3))) ; t2-imag + (let* ((unboxed-gensym-1 4.0+8.0i) + (unboxed-gensym-2 (unsafe-flreal-part unboxed-gensym-1)) ; t3-real + (unboxed-gensym-3 (unsafe-flimag-part unboxed-gensym-1)) ; t3-imag + (unboxed-gensym-4 (unsafe-fl+ unboxed-gensym-4 unboxed-gensym-2)) + (unboxed-gensym-5 (unsafe-fl+ unboxed-gensym-5 unboxed-gensym-3))) + (unsafe-make-flrectangular unboxed-gensym-4 unboxed-gensym-5)))) (void) diff --git a/collects/tests/typed-scheme/optimizer/non-optimized/unboxed-let.rkt b/collects/tests/typed-scheme/optimizer/non-optimized/unboxed-let.rkt index ce055825a4..64776247a0 100644 --- a/collects/tests/typed-scheme/optimizer/non-optimized/unboxed-let.rkt +++ b/collects/tests/typed-scheme/optimizer/non-optimized/unboxed-let.rkt @@ -4,5 +4,5 @@ (let* ((t1 (+ 1.0+2.0i 2.0+4.0i)) (t2 (- t1 3.0+6.0i)) - (t3 (- t1 4.0+8.0i))) + (t3 4.0+8.0i)) (+ t2 t3))