Skip to content

Commit f08bedf

Browse files
committed
Don't inline fromNumber
1 parent 58acfae commit f08bedf

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ inlineValues = everywhereOnJS convert
9797
| isDict semiringInt dict && isFn fnOne fn = JSNumericLiteral (Left 1)
9898
| isDict boundedBoolean dict && isFn fnBottom fn = JSBooleanLiteral False
9999
| isDict boundedBoolean dict && isFn fnTop fn = JSBooleanLiteral True
100-
convert (JSApp fn [value]) | isFn fromNumber fn = JSBinary BitwiseOr value (JSNumericLiteral (Left 0))
101100
convert (JSApp (JSApp (JSApp fn [dict]) [x]) [y])
102101
| isDict semiringInt dict && isFn fnAdd fn = JSBinary BitwiseOr (JSBinary Add x y) (JSNumericLiteral (Left 0))
103102
| isDict semiringInt dict && isFn fnMultiply fn = JSBinary BitwiseOr (JSBinary Multiply x y) (JSNumericLiteral (Left 0))
@@ -108,7 +107,6 @@ inlineValues = everywhereOnJS convert
108107
fnOne = (C.prelude, C.one)
109108
fnBottom = (C.prelude, C.bottom)
110109
fnTop = (C.prelude, C.top)
111-
fromNumber = (C.dataInt, C.fromNumber)
112110
fnAdd = (C.prelude, (C.+))
113111
fnDivide = (C.prelude, (C./))
114112
fnMultiply = (C.prelude, (C.*))

src/Language/PureScript/Constants.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ zshr = "zshr"
115115
complement :: String
116116
complement = "complement"
117117

118-
fromNumber :: String
119-
fromNumber = "fromNumber"
120-
121118
-- Prelude Values
122119

123120
zero :: String

0 commit comments

Comments
 (0)