Please sign in to comment.
[project @ 2003-03-24 14:46:53 by simonmar]
Fix some bugs in compacting GC. Bug 1: When threading the fields of an AP or PAP, we were grabbing the info table of the function without unthreading it first. Bug 2: eval_thunk_selector() might accidentally find itself in to-space when going through indirections in a compacted generation. We must check for this case and bale out if necessary. Bug 3: This is somewhat more nasty. When we have an AP or PAP that points to a BCO, the layout info for the AP/PAP is in the BCO's instruction array, which is two objects deep from the AP/PAP itself. The trouble is, during compacting GC, we can only safely look one object deep from the current object, because pointers from objects any deeper might have been already updated to point to their final destinations. The solution is to put the arity and bitmap info for a BCO into the BCO object itself. This means BCOs become variable-length, which is a slight annoyance, but it also means that looking up the arity/bitmap is quicker. There is a slight reduction in complexity in the byte code generator due to not having to stuff the bitmap at the front of the instruction stream.
- Loading branch information...
Showing with 154 additions and 82 deletions.
- +15 −23 ghc/compiler/ghci/ByteCodeAsm.lhs
- +10 −6 ghc/compiler/ghci/ByteCodeLink.lhs
- +2 −2 ghc/compiler/prelude/primops.txt.pp
- +19 −17 ghc/includes/Closures.h
- +1 −1 ghc/mk/version.mk
- +28 −4 ghc/rts/GC.c
- +34 −15 ghc/rts/GCCompact.c
- +3 −3 ghc/rts/Interpreter.c
- +22 −6 ghc/rts/PrimOps.hc
- +5 −1 ghc/rts/ProfHeap.c
- +10 −2 ghc/rts/Sanity.c
- +4 −1 ghc/rts/Storage.h
- +1 −1 ghc/utils/genapply/GenApply.hs
Oops, something went wrong.