another repair to bitwise-arithmetic-shift/ash folding

Fuzz testing exposed a problem with the example

   (bitwise-arithmetic-shift-left -1 -1)

original commit: fc6f411ffc65f436d54979dfc0455ae771f3375d
This commit is contained in:
Matthew Flatt 2020-01-06 04:35:26 -07:00
parent e039b19653
commit 27883d2749

View File

@ -2419,9 +2419,10 @@
(and xval
yval
(let ([r (guard (c [#t #f]) (op xval yval))])
(when r
(residualize-seq '() (list x y) ctxt)
`(quote ,r))))))
(cond
[r (residualize-seq '() (list x y) ctxt)
`(quote ,r)]
[else #f])))))
(define-syntax define-inline-ash-op
(syntax-rules ()
[(_ op)