Hannes Siebenhandl pushed to branch wip/fendor/ann-frame at Glasgow Haskell Compiler / GHC

Commits:

4 changed files:

Changes:

  • compiler/GHC/Builtin/primops.txt.pp
    ... ... @@ -3932,7 +3932,7 @@ section "Annotating call stacks"
    3932 3932
     ------------------------------------------------------------------------
    
    3933 3933
     
    
    3934 3934
     primop AnnotateStackOp "annotateStack#" GenPrimOp
    
    3935
    -   b -> a_reppoly -> a_reppoly
    
    3935
    +   b -> a -> a
    
    3936 3936
        { Pushes an annotation frame to the stack which can be reported by backtraces. }
    
    3937 3937
        with
    
    3938 3938
        out_of_line = True
    

  • libraries/ghc-heap/GHC/Exts/Stack/Constants.hsc
    ... ... @@ -89,7 +89,8 @@ sizeStgRetFunFrame :: Int
    89 89
     sizeStgRetFunFrame = bytesToWords (#const SIZEOF_StgRetFun)
    
    90 90
     
    
    91 91
     sizeStgAnnFrame :: Int
    
    92
    -sizeStgAnnFrame = bytesToWords (#const SIZEOF_StgAnnFrame)
    
    92
    +sizeStgAnnFrame = bytesToWords $
    
    93
    +  (#const SIZEOF_StgAnnFrame_NoHdr) + (#size StgHeader)
    
    93 94
     
    
    94 95
     offsetStgAnnFrameAnn :: WordOffset
    
    95 96
     offsetStgAnnFrameAnn = byteOffsetToWordOffset $
    

  • libraries/ghc-heap/tests/ann_frame.stdout
    1 1
     ["(2,3)"]
    
    2 2
     47
    
    3
    +["\"bar\"","\"foo\"","\"tailCallEx\""]
    
    4
    +40

  • utils/deriveConstants/Main.hs
    ... ... @@ -443,7 +443,7 @@ wanteds os = concat
    443 443
               ,closureSize  C    "StgStopFrame"
    
    444 444
               ,closureSize  C    "StgDeadThreadFrame"
    
    445 445
               ,closureField C    "StgDeadThreadFrame" "result"
    
    446
    -          ,structSize   C    "StgAnnFrame"
    
    446
    +          ,closureSize  Both "StgAnnFrame"
    
    447 447
               ,closureField C    "StgAnnFrame" "ann"
    
    448 448
     
    
    449 449
               ,closureSize  Both "StgMutArrPtrs"