[commit: ghc] master: Comments only (429397f)

git at git.haskell.org git
Fri Oct 4 18:16:07 UTC 2013


Repository : ssh://git at git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/429397f2cca3b6e7a74b6a24132eae8008accc14/ghc

>---------------------------------------------------------------

commit 429397f2cca3b6e7a74b6a24132eae8008accc14
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Oct 4 12:10:30 2013 +0100

    Comments only


>---------------------------------------------------------------

429397f2cca3b6e7a74b6a24132eae8008accc14
 compiler/codeGen/StgCmmArgRep.hs |    8 +++++++-
 compiler/ghci/ByteCodeGen.lhs    |    1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmArgRep.hs b/compiler/codeGen/StgCmmArgRep.hs
index 1e68105..9821b0a 100644
--- a/compiler/codeGen/StgCmmArgRep.hs
+++ b/compiler/codeGen/StgCmmArgRep.hs
@@ -122,9 +122,15 @@ idArgRep = toArgRep . idPrimRep
 --
 -- NSF 6 Mar 2013
 
--- These cases were found to cover about 99% of all slow calls:
 slowCallPattern :: [ArgRep] -> (FastString, RepArity)
 -- Returns the generic apply function and arity
+--
+-- The first batch of cases match (some) specialised entries
+-- The last group deals exhaustively with the cases for the first argument
+--   (and the zero-argument case)
+--
+-- In 99% of cases this function will match *all* the arguments in one batch
+
 slowCallPattern (P: P: P: P: P: P: _) = (fsLit "stg_ap_pppppp", 6)
 slowCallPattern (P: P: P: P: P: _)    = (fsLit "stg_ap_ppppp", 5)
 slowCallPattern (P: P: P: P: _)       = (fsLit "stg_ap_pppp", 4)
diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs
index 25f6b66..9a5a952 100644
--- a/compiler/ghci/ByteCodeGen.lhs
+++ b/compiler/ghci/ByteCodeGen.lhs
@@ -1166,6 +1166,7 @@ maybe_getCCallReturnRep fn_ty
 -- Compile code which expects an unboxed Int on the top of stack,
 -- (call it i), and pushes the i'th closure in the supplied list
 -- as a consequence.
+-- The [Name] is a list of the constructors of this (enumeration) type
 implement_tagToId :: [Name] -> BcM BCInstrList
 implement_tagToId names
    = ASSERT( notNull names )




More information about the ghc-commits mailing list