1. 22 Jun, 2012 3 commits
    • Ian Lynagh's avatar
      Use a derived Ord instance for Discr · f6694264
      Ian Lynagh authored
      Our hand-written leAlt behaved differently when given a micture of
      constructors, but I think that either it won't make a difference or
      that this will be an improvement.
      f6694264
    • Ian Lynagh's avatar
      Derive Eq Discr · f1c81a73
      Ian Lynagh authored
      We had effectively hand-written the instance instead
      f1c81a73
    • Ian Lynagh's avatar
      Remove some uses of sortLe · 0043f07a
      Ian Lynagh authored
      Technically the behaviour of sortWith has changed, as it used
          x `le` y = get_key x < get_key y
      (note "<" rather than "<="), but I assume that that was just a mistake.
      0043f07a
  2. 13 Jun, 2012 1 commit
  3. 09 Jun, 2012 1 commit
  4. 15 May, 2012 1 commit
    • batterseapower's avatar
      Support code generation for unboxed-tuple function arguments · 09987de4
      batterseapower authored
      This is done by a 'unarisation' pre-pass at the STG level which
      translates away all (live) binders binding something of unboxed
      tuple type.
      
      This has the following knock-on effects:
        * The subkind hierarchy is vastly simplified (no UbxTupleKind or ArgKind)
        * Various relaxed type checks in typechecker, 'foreign import prim' etc
        * All case binders may be live at the Core level
      09987de4
  5. 11 May, 2012 1 commit
  6. 16 Apr, 2012 1 commit
    • pcapriotti's avatar
      Support large SLIDE instructions. · 6dc22bfa
      pcapriotti authored
      The bytecode generator used to keep track of the stack depth with a
      16-bit counter, which could overflow for very large BCOs, resulting in
      incorrect bytecode.
      
      This commit switches to a word-sized counter, and eagerly panics
      whenever an operand is too big, instead of truncating the result.
      
      This allows us to work around the 16-bit limitation in the case of SLIDE
      instructions, since we can simply factor it into multiple SLIDEs with
      smaller arguments.
      6dc22bfa
  7. 26 Feb, 2012 1 commit
    • Ian Lynagh's avatar
      Implement "value" imports with the CAPI · ae04bd43
      Ian Lynagh authored
      This allows us to import values (i.e. non-functions) with the CAPI.
      This means we can access values even if (on some or all platforms)
      they are simple #defines.
      ae04bd43
  8. 04 Nov, 2011 1 commit
  9. 02 Nov, 2011 2 commits
    • Simon Marlow's avatar
      Fix gratuitous code duplication in the byte code generator · b0e4b418
      Simon Marlow authored
      For a case expression with a default, we were re-emitting the code for
      the default branch each time it was referenced, which in a case with
      many branches could be many times, leading to an O(n^2) blowup.
      
      This shows up in ghcirun003, which now runs much faster than before.
      b0e4b418
    • Simon Marlow's avatar
      Overhaul of infrastructure for profiling, coverage (HPC) and breakpoints · 7bb0447d
      Simon Marlow authored
      User visible changes
      ====================
      
      Profilng
      --------
      
      Flags renamed (the old ones are still accepted for now):
      
        OLD            NEW
        ---------      ------------
        -auto-all      -fprof-auto
        -auto          -fprof-exported
        -caf-all       -fprof-cafs
      
      New flags:
      
        -fprof-auto              Annotates all bindings (not just top-level
                                 ones) with SCCs
      
        -fprof-top               Annotates just top-level bindings with SCCs
      
        -fprof-exported          Annotates just exported bindings with SCCs
      
        -fprof-no-count-entries  Do not maintain entry counts when profiling
                                 (can make profiled code go faster; useful with
                                 heap profiling where entry counts are not used)
      
      Cost-centre stacks have a new semantics, which should in most cases
      result in more useful and intuitive profiles.  If you find this not to
      be the case, please let me know.  This is the area where I have been
      experimenting most, and the current solution is probably not the
      final version, however it does address all the outstanding bugs and
      seems to be better than GHC 7.2.
      
      Stack traces
      ------------
      
      +RTS -xc now gives more information.  If the exception originates from
      a CAF (as is common, because GHC tends to lift exceptions out to the
      top-level), then the RTS walks up the stack and reports the stack in
      the enclosing update frame(s).
      
      Result: +RTS -xc is much more useful now - but you still have to
      compile for profiling to get it.  I've played around a little with
      adding 'head []' to GHC itself, and +RTS -xc does pinpoint the problem
      quite accurately.
      
      I plan to add more facilities for stack tracing (e.g. in GHCi) in the
      future.
      
      Coverage (HPC)
      --------------
      
       * derived instances are now coloured yellow if they weren't used
       * likewise record field names
       * entry counts are more accurate (hpc --fun-entry-count)
       * tab width is now correct (markup was previously off in source with
         tabs)
      
      Internal changes
      ================
      
      In Core, the Note constructor has been replaced by
      
              Tick (Tickish b) (Expr b)
      
      which is used to represent all the kinds of source annotation we
      support: profiling SCCs, HPC ticks, and GHCi breakpoints.
      
      Depending on the properties of the Tickish, different transformations
      apply to Tick.  See CoreUtils.mkTick for details.
      
      Tickets
      =======
      
      This commit closes the following tickets, test cases to follow:
      
        - Close #2552: not a bug, but the behaviour is now more intuitive
          (test is T2552)
      
        - Close #680 (test is T680)
      
        - Close #1531 (test is result001)
      
        - Close #949 (test is T949)
      
        - Close #2466: test case has bitrotted (doesn't compile against current
          version of vector-space package)
      7bb0447d
  10. 23 Sep, 2011 1 commit
    • Simon Peyton Jones's avatar
      Make a new type synonym CoreProgram = [CoreBind] · 488e21c8
      Simon Peyton Jones authored
      and comment its invariants in Note [CoreProgram] in CoreSyn
      
      I'm not totally convinced that CoreProgram is the right name
      (perhaps CoreTopBinds might better), but it is useful to have
      a clue that you are looking at the top-level bindings.
      
      This is only a matter of a type synonym change; no deep
      refactoring here.
      488e21c8
  11. 17 Sep, 2011 1 commit
    • Ian Lynagh's avatar
      Improve the handling of Integer literals · 1e87c0a6
      Ian Lynagh authored
      LitInteger now carries around the id of mkInteger, which it uses
      to construct the core to build Integer literals. This way we don't
      have to build in info about lots of Ids.
      
      We also no longer have any special-casing for integer-simple, so
      there is less code involved.
      1e87c0a6
  12. 13 Sep, 2011 1 commit
    • Ian Lynagh's avatar
      change how Integer's are handled in Core · fdac48f3
      Ian Lynagh authored
      We now treat them as literals until CorePrep, when we finally
      convert them into the real Core representation. This makes it a lot
      simpler to implement built-in rules on them.
      fdac48f3
  13. 25 Aug, 2011 1 commit
  14. 03 Aug, 2011 1 commit
  15. 20 Jul, 2011 2 commits
  16. 23 Jun, 2011 1 commit
  17. 08 May, 2011 1 commit
  18. 07 May, 2011 3 commits
  19. 06 May, 2011 1 commit
  20. 02 May, 2011 1 commit
  21. 19 Apr, 2011 1 commit
    • Simon Peyton Jones's avatar
      This BIG PATCH contains most of the work for the New Coercion Representation · fdf86568
      Simon Peyton Jones authored
      See the paper "Practical aspects of evidence based compilation in System FC"
      
      * Coercion becomes a data type, distinct from Type
      
      * Coercions become value-level things, rather than type-level things,
        (although the value is zero bits wide, like the State token)
        A consequence is that a coerion abstraction increases the arity by 1
        (just like a dictionary abstraction)
      
      * There is a new constructor in CoreExpr, namely Coercion, to inject
        coercions into terms
      fdf86568
  22. 15 Dec, 2010 1 commit
  23. 16 Nov, 2010 1 commit
  24. 21 Oct, 2010 1 commit
  25. 19 Sep, 2010 1 commit
    • Edward Z. Yang's avatar
      Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4 · 83d563cb
      Edward Z. Yang authored
      This is patch that adds support for interruptible FFI calls in the form
      of a new foreign import keyword 'interruptible', which can be used
      instead of 'safe' or 'unsafe'.  Interruptible FFI calls act like safe
      FFI calls, except that the worker thread they run on may be interrupted.
      
      Internally, it replaces BlockedOnCCall_NoUnblockEx with
      BlockedOnCCall_Interruptible, and changes the behavior of the RTS
      to not modify the TSO_ flags on the event of an FFI call from
      a thread that was interruptible.  It also modifies the bytecode
      format for foreign call, adding an extra Word16 to indicate
      interruptibility.
      
      The semantics of interruption vary from platform to platform, but the
      intent is that any blocking system calls are aborted with an error code.
      This is most useful for making function calls to system library
      functions that support interrupting.  There is no support for pre-Vista
      Windows.
      
      There is a partner testsuite patch which adds several tests for this
      functionality.
      83d563cb
  26. 23 Sep, 2010 1 commit
  27. 14 Sep, 2010 1 commit
    • Ian Lynagh's avatar
      Remove (most of) the FiniteMap wrapper · e95ee1f7
      Ian Lynagh authored
      We still have
          insertList, insertListWith, deleteList
      which aren't in Data.Map, and
          foldRightWithKey
      which works around the fold(r)WithKey addition and deprecation.
      e95ee1f7
  28. 13 Sep, 2010 1 commit
  29. 04 Jan, 2010 1 commit
  30. 02 Jan, 2010 1 commit
  31. 18 Sep, 2009 1 commit
  32. 03 Aug, 2009 1 commit
  33. 01 Aug, 2009 1 commit
  34. 30 Jul, 2009 1 commit