RTS tidyup sweep, first phase
authorSimon Marlow <marlowsd@gmail.com>
Sun, 2 Aug 2009 21:32:04 +0000 (21:32 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Sun, 2 Aug 2009 21:32:04 +0000 (21:32 +0000)
commita2a67cd520b9841114d69a87a423dabcb3b4368e
tree3dc6bbf53dff5421c14fbeb2d812c1424f2718c0
parent5d379cbe65e406d5c3a848fe7fcd090cafbfeb78
RTS tidyup sweep, first phase

The first phase of this tidyup is focussed on the header files, and in
particular making sure we are exposinng publicly exactly what we need
to, and no more.

 - Rts.h now includes everything that the RTS exposes publicly,
   rather than a random subset of it.

 - Most of the public header files have moved into subdirectories, and
   many of them have been renamed.  But clients should not need to
   include any of the other headers directly, just #include the main
   public headers: Rts.h, HsFFI.h, RtsAPI.h.

 - All the headers needed for via-C compilation have moved into the
   stg subdirectory, which is self-contained.  Most of the headers for
   the rest of the RTS APIs have moved into the rts subdirectory.

 - I left MachDeps.h where it is, because it is so widely used in
   Haskell code.

 - I left a deprecated stub for RtsFlags.h in place.  The flag
   structures are now exposed by Rts.h.

 - Various internal APIs are no longer exposed by public header files.

 - Various bits of dead code and declarations have been removed

 - More gcc warnings are turned on, and the RTS code is more
   warning-clean.

 - More source files #include "PosixSource.h", and hence only use
   standard POSIX (1003.1c-1995) interfaces.

There is a lot more tidying up still to do, this is just the first
pass.  I also intend to standardise the names for external RTS APIs
(e.g use the rts_ prefix consistently), and declare the internal APIs
as hidden for shared libraries.
213 files changed:
compiler/cmm/CmmInfo.hs
compiler/cmm/PprCmm.hs
compiler/codeGen/CgCallConv.hs
compiler/codeGen/CgProf.hs
compiler/codeGen/CgUtils.hs
compiler/codeGen/SMRep.lhs
compiler/codeGen/StgCmmLayout.hs
compiler/codeGen/StgCmmProf.hs
compiler/codeGen/StgCmmUtils.hs
compiler/ghci/ByteCodeAsm.lhs
compiler/ghci/ByteCodeItbls.lhs
compiler/ghci/RtClosureInspect.hs
compiler/iface/BinIface.hs
compiler/main/Constants.lhs
compiler/main/StaticFlags.hs
compiler/nativeGen/Alpha/Regs.hs
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/PPC/Regs.hs
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
compiler/nativeGen/RegAlloc/Linear/Main.hs
compiler/nativeGen/SPARC/CodeGen.hs
compiler/nativeGen/SPARC/RegPlate.hs
compiler/nativeGen/SPARC/Regs.hs
compiler/nativeGen/X86/CodeGen.hs
compiler/nativeGen/X86/Ppr.hs
compiler/nativeGen/X86/Regs.hs
compiler/parser/cutils.c
compiler/utils/Binary.hs
compiler/utils/FastMutInt.lhs
includes/ClosureMacros.h [deleted file]
includes/Cmm.h
includes/GranSim.h [deleted file]
includes/HsFFI.h
includes/MachDeps.h
includes/Parallel.h [deleted file]
includes/README
includes/Rts.h
includes/RtsAPI.h
includes/RtsConfig.h [deleted file]
includes/RtsExternal.h [deleted file]
includes/RtsFlags.h
includes/Stable.h [deleted file]
includes/Stg.h
includes/Storage.h [deleted file]
includes/config.h [deleted file]
includes/ghc.mk
includes/ieee-flpt.h [deleted file]
includes/mkDerivedConstants.c
includes/rts/Adjustor.h [new file with mode: 0644]
includes/rts/Bytecodes.h [moved from includes/Bytecodes.h with 100% similarity]
includes/rts/Config.h [new file with mode: 0644]
includes/rts/Constants.h [moved from includes/Constants.h with 99% similarity]
includes/rts/EventLogFormat.h [moved from includes/EventLogFormat.h with 98% similarity]
includes/rts/FileLock.h [moved from includes/FileLock.h with 81% similarity]
includes/rts/Flags.h [new file with mode: 0644]
includes/rts/Globals.h [moved from includes/RtsGlobals.h with 84% similarity]
includes/rts/Hooks.h [moved from includes/Hooks.h with 89% similarity]
includes/rts/Hpc.h [new file with mode: 0644]
includes/rts/IOManager.h [new file with mode: 0644]
includes/rts/Linker.h [moved from includes/Linker.h with 88% similarity]
includes/rts/Messages.h [moved from includes/RtsMessages.h with 80% similarity]
includes/rts/OSThreads.h [moved from includes/OSThreads.h with 94% similarity]
includes/rts/Parallel.h [new file with mode: 0644]
includes/rts/Signals.h [moved from includes/Signals.h with 62% similarity]
includes/rts/SpinLock.h [moved from includes/SpinLock.h with 96% similarity]
includes/rts/Stable.h [new file with mode: 0644]
includes/rts/Threads.h [moved from includes/SchedAPI.h with 54% similarity]
includes/rts/Timer.h [new file with mode: 0644]
includes/rts/Types.h [moved from includes/RtsTypes.h with 89% similarity]
includes/rts/prof/CCS.h [moved from includes/StgProf.h with 99% similarity]
includes/rts/prof/LDV.h [moved from includes/StgLdvProf.h with 96% similarity]
includes/rts/storage/Block.h [moved from includes/Block.h with 98% similarity]
includes/rts/storage/ClosureMacros.h [new file with mode: 0644]
includes/rts/storage/ClosureTypes.h [moved from includes/ClosureTypes.h with 96% similarity]
includes/rts/storage/Closures.h [moved from includes/Closures.h with 97% similarity]
includes/rts/storage/FunTypes.h [moved from includes/StgFun.h with 92% similarity]
includes/rts/storage/GC.h [new file with mode: 0644]
includes/rts/storage/InfoTables.h [moved from includes/InfoTables.h with 97% similarity]
includes/rts/storage/Liveness.h [moved from includes/Liveness.h with 90% similarity]
includes/rts/storage/MBlock.h [moved from rts/sm/MBlock.h with 98% similarity]
includes/rts/storage/SMPClosureOps.h [moved from includes/SMPClosureOps.h with 94% similarity]
includes/rts/storage/TSO.h [moved from includes/TSO.h with 90% similarity]
includes/stg/DLL.h [moved from includes/StgDLL.h with 100% similarity]
includes/stg/MachRegs.h [moved from includes/MachRegs.h with 100% similarity]
includes/stg/MiscClosures.h [moved from includes/StgMiscClosures.h with 99% similarity]
includes/stg/Regs.h [moved from includes/Regs.h with 99% similarity]
includes/stg/SMP.h [moved from includes/SMP.h with 91% similarity]
includes/stg/TailCalls.h [moved from includes/TailCalls.h with 100% similarity]
includes/stg/Ticky.h [moved from includes/TickyCounters.h with 98% similarity]
includes/stg/Types.h [moved from includes/StgTypes.h with 77% similarity]
rts/Adjustor.c
rts/Arena.c
rts/AwaitEvent.h
rts/Capability.c
rts/Capability.h
rts/Disassembler.c
rts/FrontPanel.c
rts/Globals.c
rts/Globals.h [new file with mode: 0644]
rts/Hash.c
rts/Hpc.c
rts/Hpc.h [deleted file]
rts/HsFFI.c
rts/Inlines.c
rts/Interpreter.c
rts/LdvProfile.c
rts/Linker.c
rts/Main.c
rts/Papi.c
rts/Papi.h
rts/PosixSource.h
rts/Printer.c
rts/Printer.h
rts/ProfHeap.c
rts/ProfHeap.h
rts/Profiling.c
rts/Proftimer.c
rts/Proftimer.h
rts/RaiseAsync.c
rts/RetainerProfile.c
rts/RetainerProfile.h
rts/RetainerSet.c
rts/RtsAPI.c
rts/RtsFlags.c
rts/RtsMain.c
rts/RtsMessages.c
rts/RtsSignals.h
rts/RtsStartup.c
rts/RtsUtils.c
rts/RtsUtils.h
rts/STM.c
rts/STM.h [moved from includes/STM.h with 100% similarity]
rts/Sanity.c
rts/Sanity.h
rts/Schedule.c
rts/Schedule.h
rts/Sparks.c
rts/Stable.c
rts/Stable.h [new file with mode: 0644]
rts/Stats.c
rts/Stats.h
rts/StgCRun.c
rts/StgPrimFloat.c
rts/StgPrimFloat.h [new file with mode: 0644]
rts/Task.c
rts/Task.h
rts/ThrIOManager.h [deleted file]
rts/ThreadLabels.c
rts/ThreadLabels.h
rts/ThreadPaused.c
rts/ThreadPaused.h [new file with mode: 0644]
rts/Threads.c
rts/Threads.h
rts/Ticky.c
rts/Ticky.h
rts/Timer.c
rts/Timer.h
rts/Trace.c
rts/Updates.cmm
rts/WSDeque.c [moved from rts/parallel/WSDeque.c with 99% similarity]
rts/WSDeque.h [moved from rts/parallel/WSDeque.h with 100% similarity]
rts/Weak.c
rts/Weak.h
rts/eventlog/EventLog.c
rts/eventlog/EventLog.h
rts/ghc.mk
rts/hooks/FlagDefaults.c
rts/hooks/MallocFail.c
rts/hooks/OnExit.c
rts/hooks/OutOfHeap.c
rts/hooks/RtsOpts.c
rts/hooks/StackOverflow.c
rts/parallel/GranSim.c
rts/posix/FileLock.c
rts/posix/FileLock.h [new file with mode: 0644]
rts/posix/Itimer.c
rts/posix/Itimer.h
rts/posix/OSMem.c
rts/posix/OSThreads.c
rts/posix/Select.c
rts/posix/Select.h
rts/posix/Signals.c
rts/posix/TTY.c [new file with mode: 0644]
rts/posix/TTY.h [new file with mode: 0644]
rts/sm/BlockAlloc.c
rts/sm/Compact.c
rts/sm/Compact.h
rts/sm/Evac.c
rts/sm/Evac.h
rts/sm/GC.c
rts/sm/GC.h
rts/sm/GCAux.c
rts/sm/GCThread.h
rts/sm/GCUtils.c
rts/sm/GCUtils.h
rts/sm/MBlock.c
rts/sm/MarkWeak.c
rts/sm/MarkWeak.h
rts/sm/OSMem.h
rts/sm/README [deleted file]
rts/sm/Scav.c
rts/sm/Scav.h
rts/sm/Storage.c
rts/sm/Storage.h [new file with mode: 0644]
rts/sm/Sweep.c
rts/sm/Sweep.h
rts/win32/AsyncIO.h
rts/win32/ConsoleHandler.h
rts/win32/IOManager.h
rts/win32/ThrIOManager.c
rts/win32/WorkQueue.h
rts/win32/seh_excn.h
utils/genapply/GenApply.hs