From: Duncan C. <dun...@us...> - 2004-12-18 20:45:29
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/c2hs/toplevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21072/tools/c2hs/toplevel Modified Files: Main.hs Log Message: remove performance debuging output when processing .chs files. Keep debugging output for generating .precomp files to remind us how slow it is and to bug me to fix it! Index: Main.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/c2hs/toplevel/Main.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Main.hs 26 Nov 2004 15:08:10 -0000 1.2 +++ Main.hs 18 Dec 2004 20:45:13 -0000 1.3 @@ -626,7 +626,6 @@ cppOpts <- getSwitch cppOptsSB let cmd = unwords [cpp, cppOpts, realHeaderFile, ">" ++ preprocFile] tracePreproc cmd - printElapsedTime "about to run cpp" exitCode <- systemCIO cmd case exitCode of ExitFailure _ -> fatal "Error during preprocessing" @@ -636,7 +635,6 @@ -- load and analyse the C header file -- (cheader, warnmsgs) <- loadAttrC preprocFile - printElapsedTime "about to emit warnings" putStrCIO warnmsgs printElapsedTime "about to serialise header" @@ -653,7 +651,6 @@ unless keep $ removeFileCIO preprocFile - printElapsedTime "finish" return () where tracePreproc cmd = putTraceStr tracePhasesSW $ @@ -661,11 +658,9 @@ processPreComp :: FilePath -> FilePath -> CST s Bool processPreComp preCompFile bndFile = do - printElapsedTime "start" -- load the Haskell binding module -- - printElapsedTime "about to read .chs file" (chsMod , warnmsgs) <- loadCHS bndFile putStrCIO warnmsgs traceCHSDump chsMod @@ -674,33 +669,28 @@ -- inline-C fragments are removed from the .chs tree and conditionals are -- replaced by structured conditionals) -- - printElapsedTime "extracting cpp stuff from .chs file" (header, strippedCHSMod, warnmsgs) <- genHeader chsMod if not (null header) then return True else do putStrCIO warnmsgs -- -- load and analyse the C header file -- - printElapsedTime "about to deserialise header" WithNameSupply cheader <- liftIO $ getBinFileWithDict preCompFile -- -- expand binding hooks into plain Haskell -- - printElapsedTime "about to expand hooks in .chs file" (hsMod, chi, warnmsgs) <- expandHooks cheader strippedCHSMod putStrCIO warnmsgs -- -- output the result -- - printElapsedTime "about to dump .hs and .chi files" outFName <- getSwitch outputSB let hsFile = if null outFName then basename bndFile else outFName dumpCHS hsFile hsMod True dumpCHI hsFile chi -- different suffix will be appended -- CHS file did not contain C declarations, so return False - printElapsedTime "finish" return False where traceCHSDump mod = do |