Changes between Version 2 and Version 3 of Commentary/Hpc
- Timestamp:
- 12/07/06 20:59:18 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Hpc
v2 v3 5 5 The basic idea is this 6 6 * For each (sub)expression in the Haskell Syntax, write the (sub)expression in a HsTick 7 * Each HsTickhas a module local index number.7 * Each `HsTick` has a module local index number. 8 8 * There is a table (The Mix datastructure) that maps this index number to original source location. 9 * Each HsTickis mapped in the Desugar pass with:9 * Each `HsTick` is mapped in the Desugar pass with: 10 10 {{{ 11 11 dsExpr (HsTick n e) = case tick<modname,n> of DEFAULT -> e 12 12 }}} 13 * This tick is a special type of Id, a TickOpIdwhich takes no core-level argument, but has two pre-applied arguments; the module name and the module-local tick number.13 * This tick is a special type of `Id`, a `TickOpId` which takes no core-level argument, but has two pre-applied arguments; the module name and the module-local tick number. 14 14 * We store both module name and tick number to allow this Id to be passed (inlined) inside other modules. 15 * This Idhas type '''State# World#'''15 * This `Id` has type '''State# World#''' 16 16 * The core simplifier must not remove this case, but it can move it. 17 * The do-not-remove is inforced via the ... function in ....18 * The semantics are tick if-and-when-and-as you enter the DEFAULT case. But a chain of consecative ticks can be executed in any order.19 * The CoreToStg Pass translates the ticks into StgTick17 * The do-not-remove is enforced via the ... function in .... 18 * The semantics are tick if-and-when-and-as you enter the `DEFAULT` case. But a chain of consecutive ticks can be executed in any order. 19 * The CoreToStg Pass translates the ticks into `StgTick` 20 20 {{{ 21 21 .. (case tick<m,n> of DEFAULT -> e) = .. StgTick m n (... e) 22 22 }}} 23 * The Cmm code generate translates StgTickto a 64 bit increment.23 * The `Cmm` code generate translates `StgTick` to a 64 bit increment. 24 24 25 25 TO BE CONTINUED.
