Revert "Fixing racket/match by removing errorneous optimization with test that shows it is broken"

This reverts commit 41307f1346.
This commit is contained in:
Sam Tobin-Hochstadt 2011-10-06 18:18:23 -04:00
parent 1d9ac41772
commit 463a34ec90
2 changed files with 1 additions and 18 deletions

View File

@ -447,8 +447,7 @@
;; and compile each block with a reference to its continuation
[else
(let*-values
(;; XXX This is broken.
#;[(rows vars) (reorder-columns rows vars)]
([(rows vars) (reorder-columns rows vars)]
[(fns)
(let loop ([blocks (reverse (split-rows rows))] [esc esc] [acc null])
(if (null? blocks)

View File

@ -171,22 +171,6 @@
[_ #f])))
(test-case "app pattern"
(check = 4 (match 3 [(app add1 y) y])))
(test-case "app pattern (step 1)"
(check = 2 (match (list 1 3)
[(list 0 (app add1 y)) y]
[(list 1 (app sub1 y)) y])))
(test-case "app pattern (step 2a)"
(check = 2 (match (cons 1 3)
[(cons 0 (app error y)) y]
[(cons 1 (app sub1 y)) y])))
(test-case "app pattern (step 2a)"
(check = 2 (match (vector 1 3)
[(vector 0 (app error y)) y]
[(vector 1 (app sub1 y)) y])))
(test-case "app pattern (step 2)"
(check = 2 (match (list 1 3)
[(list 0 (app error y)) y]
[(list 1 (app sub1 y)) y])))
(test-case "struct patterns"
(let ()
(define-struct point (x y))