Skip to content

Instantly share code, notes, and snippets.

@osa1
Created June 16, 2014 13:34
Show Gist options
  • Save osa1/cc56bf54c1ff84e0d6c8 to your computer and use it in GitHub Desktop.
Save osa1/cc56bf54c1ff84e0d6c8 to your computer and use it in GitHub Desktop.
diff --git a/src/Compiler/Settings.hs b/src/Compiler/Settings.hs
index 55c3472..f340cee 100644
--- a/src/Compiler/Settings.hs
+++ b/src/Compiler/Settings.hs
@@ -50,3 +50,6 @@ newGhcjsEnv = GhcjsEnv <$> newMVar M.empty
buildingDebug :: DynFlags -> Bool
buildingDebug dflags = WayDebug `elem` ways dflags
+buildingProf :: DynFlags -> Bool
+buildingProf dflags = WayProf `elem` ways dflags
+
diff --git a/src/Gen2/Compactor.hs b/src/Gen2/Compactor.hs
index 56e38ab..d0de635 100644
--- a/src/Gen2/Compactor.hs
+++ b/src/Gen2/Compactor.hs
@@ -95,7 +95,7 @@ renameInternals settings dflags cs0 stats0 = (cs, stats, meta)
((stats, meta), cs) = runState renamed cs0
renamed :: State CompactorState ([JStat], JStat)
renamed
- | buildingDebug dflags = do
+ | buildingDebug dflags || buildingProf dflags = do
cs <- get
let renamedStats = map (\(s,_,_) -> s & identsS %~ lookupRenamed cs) stats0
statics = map (renameStaticInfo cs) $ concatMap (\(_,_,x) -> x) stats0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment