@@ -1424,17 +1424,30 @@ elimConds js =
1424 isCond :: JS -> Bool
1424 isCond :: JS -> Bool
1425 isCond (JSAlloc
1425 isCond (JSAlloc
1426 fun (Just (JSFunction args (JSCond
1426 fun (Just (JSFunction args (JSCond
1427− [ (JSBinOp "==" (JSNum (JSInt tag)) _, JSReturn (JSIdent _))
1427+ [ (JSBinOp "==" (JSNum (JSInt tag)) (JSProj (JSIdent _) "tag"), JSReturn t)
1428− , (JSNoop, JSReturn (JSIdent _))
1428+ , (JSNoop, JSReturn f)
1431+ | isJSConstant t && isJSConstant f =
1430− )) = True
1436+ True
1432 isCond (JSAlloc
1438 isCond (JSAlloc
1433 fun (Just (JSFunction args (JSCond
1439 fun (Just (JSFunction args (JSCond
1434− [ (JSBinOp "==" _ (JSNum (JSInt tag)), JSReturn (JSIdent _))
1440+ [ (JSBinOp "==" (JSIdent _) c, JSReturn t)
1435− , (JSNoop, JSReturn (JSIdent _))
1441+ , (JSNoop, JSReturn f)
1444+ | isJSConstant t && isJSConstant f && isJSConstant c =
1437− )) = True
1450+ True
1439 isCond _ = False
1452 isCond _ = False