1. 05 Jul, 2011 1 commit
    • batterseapower's avatar
      Refactoring: use a structured CmmStatics type rather than [CmmStatic] · 54843b5b
      batterseapower authored
      I observed that the [CmmStatics] within CmmData uses the list in a very stylised way.
      The first item in the list is almost invariably a CmmDataLabel. Many parts of the
      compiler pattern match on this list and fail if this is not true.
      This patch makes the invariant explicit by introducing a structured type CmmStatics
      that holds the label and the list of remaining [CmmStatic].
      There is one wrinkle: the x86 backend sometimes wants to output an alignment directive just
      before the label. However, this can be easily fixed up by parameterising the native codegen
      over the type of CmmStatics (though the GenCmmTop parameterisation) and using a pair
      (Alignment, CmmStatics) there instead.
      As a result, I think we will be able to remove CmmAlign and CmmDataLabel from the CmmStatic
      data type, thus nuking a lot of code and failing pattern matches. This change will come as part
      of my next patch.
  2. 03 Jul, 2011 4 commits
  3. 02 Jul, 2011 1 commit
  4. 01 Jul, 2011 10 commits
  5. 30 Jun, 2011 14 commits
  6. 29 Jun, 2011 7 commits
  7. 28 Jun, 2011 3 commits
    • Simon Marlow's avatar
      comment updates · 7d14e369
      Simon Marlow authored
    • Simon Marlow's avatar
      Add a builtin rule for seq# when its argument is a manifest · 619941b4
      Simon Marlow authored
      head-normal-form, and similarly for spark#.
    • Simon Marlow's avatar
      Add two new primops: · be544179
      Simon Marlow authored
        seq#   :: a -> State# s -> (# State# s, a #)
        spark# :: a -> State# s -> (# State# s, a #)
      seq# is a version of seq that can be used in a State#-passing
      context.  We will use it to implement Control.Exception.evaluate and
      thus fix #5129.  Also we have plans to use it to fix #5262.
      spark# is to seq# as par is to pseq.  That is, it creates a spark in a
      State#-passing context.  We will use spark# and seq# to implement rpar
      and rseq respectively in an improved implementation of the Eval monad.