Changes between Version 10 and Version 11 of Commentary/SourceTree/Includes
- Timestamp:
- Dec 11, 2012 4:57:39 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/SourceTree/Includes
v10 v11 13 13 relatively stable: 14 14 15 [ http://darcs.haskell.org/ghc/includes/HsFFI.h HsFFI.h]::15 [source:includes/HsFFI.h HsFFI.h]:: 16 16 The external FFI api, as required by the FFI spec 17 17 18 [ http://darcs.haskell.org/ghc/includes/RtsAPI.h RtsAPI.h]::18 [source:includes/RtsAPI.h RtsAPI.h]:: 19 19 The API for calling into the RTS. Used by the implementation 20 20 of `foreign export` calls, but may also be used by external 21 21 clients. 22 22 23 [ http://darcs.haskell.org/ghc/includes/Rts.h Rts.h]::23 [source:includes/Rts.h Rts.h]:: 24 24 This header file defines everything that is visible 25 25 externally to the RTS. It includes `Stg.h` and everything … … 30 30 The canonical definition of certain structures are in C header files. 31 31 For example, the layout of closures and info tables are defined in the 32 headers [ http://darcs.haskell.org/ghc/includes/rts/storage/Closures.h Closures.h] and33 [ http://darcs.haskell.org/ghc/includes/rts/storage/InfoTables.h InfoTables.h] respectivesly. How do we get the information about the32 headers [source:includes/rts/storage/Closures.h Closures.h] and 33 [source:includes/rts/storage/InfoTables.h InfoTables.h] respectivesly. How do we get the information about the 34 34 layout of these structures to the parts of the system that are not 35 35 written in C, such as the compiler itself, or the C-- code in the RTS? … … 51 51 functions from `.hc` files are given types at the call site. 52 52 53 [ http://darcs.haskell.org/ghc/includes/Stg.h Stg.h]::53 [source:includes/Stg.h Stg.h]:: 54 54 The top of the hierarchy is `Stg.h`, which includes everything 55 55 required by `.hc` code. Most files `#included` by `Stg.h` are in the 56 56 `stg` subdirectory. 57 57 58 [ http://darcs.haskell.org/ghc/includes/ghcconfig.h ghcconfig.h]::58 [source:includes/ghcconfig.h ghcconfig.h]:: 59 59 Configuration info derived by the `configure` script. 60 [ http://darcs.haskell.org/ghc/includes/MachDeps.h MachDeps.h]::60 [source:includes/MachDeps.h MachDeps.h]:: 61 61 Sizes of various basic types (should be in the `stg` subdirectory, 62 62 but left here for backwards-compatibility reasons). 63 [ http://darcs.haskell.org/ghc/includes/stg/DLL.h stg/DLL.h]::63 [source:includes/stg/DLL.h stg/DLL.h]:: 64 64 Stuff related to Windows DLLs. 65 [ http://darcs.haskell.org/ghc/includes/stg/MachRegs.h stg/MachRegs.h]::65 [source:includes/stg/MachRegs.h stg/MachRegs.h]:: 66 66 Global register assignments for this processor. 67 [ http://darcs.haskell.org/ghc/includes/stg/MiscClosures.h stg/MiscClosures.h]::67 [source:includes/stg/MiscClosures.h stg/MiscClosures.h]:: 68 68 Declarations for closures & info tables built-in to the RTS 69 [ http://darcs.haskell.org/ghc/includes/stg/Regs.h stg/Regs.h]::69 [source:includes/stg/Regs.h stg/Regs.h]:: 70 70 "registers" in the virtual machine. 71 [ http://darcs.haskell.org/ghc/includes/stg/SMP.h stg/SMP.h]::71 [source:includes/stg/SMP.h stg/SMP.h]:: 72 72 Atomic memory operations for SMP support 73 [ http://darcs.haskell.org/ghc/includes/stg/Ticky.h stg/Ticky.h]::73 [source:includes/stg/Ticky.h stg/Ticky.h]:: 74 74 Declarations for ticky-ticky counters 75 [ http://darcs.haskell.org/ghc/includes/stg/Types.h stg/Types.h]::75 [source:includes/stg/Types.h stg/Types.h]:: 76 76 Basic types specific to the virtual machine (eg. `StgWord`). 77 77 78 78 == The RTS external APIs == 79 79 80 The header [ http://darcs.haskell.org/ghc/includes/Rts.h Rts.h]80 The header [source:includes/Rts.h Rts.h] 81 81 includes all the headers below the `rts` subdirectory, which together 82 82 define the RTS external API. Virtually all RTS code `#includes` … … 85 85 The rts header files are divided into a few directories: 86 86 87 * [ http://darcs.haskell.org/ghc/includes/rts includes/rts]: Most of87 * [source:includes/rts includes/rts]: Most of 88 88 the external RTS APIs, in separate header files per-subsystem 89 89 90 * [ http://darcs.haskell.org/ghc/includes/rts/storage includes/rts/storage]: Definitions of the layout of heap and stack90 * [source:includes/rts/storage includes/rts/storage]: Definitions of the layout of heap and stack 91 91 objects, info tables, structures that define memory areas managed 92 92 by the GC, and memory management APIs. 93 93 94 * [ http://darcs.haskell.org/ghc/includes/rts/prof includes/rts/prof]:94 * [source:includes/rts/prof includes/rts/prof]: 95 95 Interfaces and definitions for profiling. 96 96 97 97 == Included into C-- (`.cmm`) code == 98 98 99 [ http://darcs.haskell.org/ghc/includes/Cmm.h Cmm.h]::99 [source:includes/Cmm.h Cmm.h]:: 100 100 included into `.cmm` source only; provides useful macros for writing 101 101 low-level C-- code for GHC.