• Simon Marlow's avatar
    Add a proper write barrier for MVars · 1ed01a87
    Simon Marlow authored
    Previously MVars were always on the mutable list of the old
    generation, which meant every MVar was visited during every minor GC.
    With lots of MVars hanging around, this gets expensive.  We addressed
    this problem for MUT_VARs (aka IORefs) a while ago, the solution is to
    use a traditional GC write-barrier when the object is modified.  This
    patch does the same thing for MVars.
    TVars are still done the old way, they could probably benefit from the
    same treatment too.
PrimOps.cmm 61.7 KB