@@ -222,10 +222,6 @@ addUsedArgsTailCallOptim :: Set (Text, Text) -> State CGBodyState ()
222addUsedArgsTailCallOptim p =
222addUsedArgsTailCallOptim p =
223 modify (\s -> s {usedArgsTailCallOptim = Set.union p (usedArgsTailCallOptim s) })
223 modify (\s -> s {usedArgsTailCallOptim = Set.union p (usedArgsTailCallOptim s) })
225−getNewCGNames :: Int -> State CGBodyState [Text]
227− mapM (\_ -> getNewCGName) [1..n]
229getConsId :: Name -> State CGBodyState (Int, Int)
225getConsId :: Name -> State CGBodyState (Int, Int)
230getConsId n =
226getConsId n =
@@ -273,16 +269,6 @@ cgFun dfs n args def = do
274 (fn, state')
270 (fn, state')
276−getSwitchJs :: JsExpr -> [LAlt] -> JsExpr
278− if any conCase alts then JsArrayProj (JsInt 0) x
279− else if any constBigIntCase alts then JsForeign "%0.toString()" [x]
281− where conCase (LConCase _ _ _ _) = True
283− constBigIntCase (LConstCase (BI _) _) = True
284− constBigIntCase _ = False
286addRT :: BodyResTarget -> JsExpr -> JsStmt
272addRT :: BodyResTarget -> JsExpr -> JsStmt
287addRT ReturnBT x = JsReturn x
273addRT ReturnBT x = JsReturn x
288addRT (DecBT n) x = JsDecLet n x
274addRT (DecBT n) x = JsDecLet n x