git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update Inliner.hs

Fix int negate inlining

commitd1f477b10277778e1f13b82f42c109c8a6db39d9 authorAndy Arvanitis <andyarvanitis@gmail.com> dateMon 8 Jul 2019, 15:46 (7 years ago) parent148f044
1 file changed+1−1
src/CodeGen/IL/Optimizer/Inliner.hs+1−1
src/CodeGen/IL/Optimizer/Inliner.hs+1−1
@@ -48,7 +48,7 @@ inlineCommonValues = everywhere convert
4848 | isDict boundedBoolean dict && isDict fnBottom fn = BooleanLiteral ss False
4949 | isDict boundedBoolean dict && isDict fnTop fn = BooleanLiteral ss True
5050 convert (App ss (App _ fn [dict]) [x])
51− | isDict ringInt dict && isDict fnNegate fn = Unary ss Negate x -- (unbox x $ snd ringInt)
51+ | isDict ringInt dict && isDict fnNegate fn = Unary ss Negate (unbox x $ snd ringInt)
5252 convert (App ss (App _ (App _ fn [dict]) [x]) [y])
5353 | isDict semiringInt dict && isDict fnAdd fn = intOp ss Add semiringInt x y
5454 | isDict semiringInt dict && isDict fnMultiply fn = intOp ss Multiply semiringInt x y