@@ -222,10 +222,6 @@ addUsedArgsTailCallOptim :: Set (Text, Text) -> State CGBodyState ()
222222addUsedArgsTailCallOptim p =
223223 modify (\s -> s {usedArgsTailCallOptim = Set.union p (usedArgsTailCallOptim s) })
224224
225−getNewCGNames :: Int -> State CGBodyState [Text]
226−getNewCGNames n =
227− mapM (\_ -> getNewCGName) [1..n]
228−
229225getConsId :: Name -> State CGBodyState (Int, Int)
230226getConsId n =
231227 do
@@ -273,16 +269,6 @@ cgFun dfs n args def = do
273269 }
274270 (fn, state')
275271
276−getSwitchJs :: JsExpr -> [LAlt] -> JsExpr
277−getSwitchJs x alts =
278− if any conCase alts then JsArrayProj (JsInt 0) x
279− else if any constBigIntCase alts then JsForeign "%0.toString()" [x]
280− else x
281− where conCase (LConCase _ _ _ _) = True
282− conCase _ = False
283− constBigIntCase (LConstCase (BI _) _) = True
284− constBigIntCase _ = False
285−
286272addRT :: BodyResTarget -> JsExpr -> JsStmt
287273addRT ReturnBT x = JsReturn x
288274addRT (DecBT n) x = JsDecLet n x