git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Tweak TCO generated names
c75acf5Andy Arvanitis
src/CodeGen/Cpp/Common.hs+1−1
@@ -196,4 +196,4 @@ unretainedSuffix :: Text
196unretainedSuffix = "_unretained"
196unretainedSuffix = "_unretained"
197
197
198tcoLoop :: Text
198tcoLoop :: Text
199−tcoLoop = "$tco_loop"
199+tcoLoop = "_TCO_loop_"
src/CodeGen/Cpp/Optimizer/TCO.hs+4−4
@@ -15,16 +15,16 @@ import qualified Language.PureScript.Constants as C
15tco :: AST -> AST
15tco :: AST -> AST
16tco = everywhere convert where
16tco = everywhere convert where
17 tcoVar :: Text -> Text
17 tcoVar :: Text -> Text
18− tcoVar arg = "$tco_var_" <> arg
18+ tcoVar arg = "_TCO_" <> arg <> "_"
19
19
20 copyVar :: Text -> Text
20 copyVar :: Text -> Text
21− copyVar arg = "$copy_" <> arg
21+ copyVar arg = "_TCO_copy_" <> arg <> "_"
22
22
23 tcoDone :: Text
23 tcoDone :: Text
24− tcoDone = "$tco_done"
24+ tcoDone = "_TCO_done_"
25
25
26 tcoResult :: Text
26 tcoResult :: Text
27− tcoResult = "$tco_result"
27+ tcoResult = "_TCO_result_"
28
28
29 convert :: AST -> AST
29 convert :: AST -> AST
30 convert fn@(Function ss (Just name) args _)
30 convert fn@(Function ss (Just name) args _)