Commits on Dec 16, 2006
  1. Merge DynFlags changes

    igfoo committed Dec 16, 2006
  2. Fix the build

    igfoo committed Dec 16, 2006
Commits on Dec 15, 2006
  1. Free various things we allocate

    igfoo committed Dec 15, 2006
Commits on Dec 14, 2006
  1. Updating rix output to new standard. committed Dec 14, 2006
  2. Rework the block allocator

    Simon Marlow
    Simon Marlow committed Dec 14, 2006
    The main goal here is to reduce fragmentation, which turns out to be
    the case of #743.  While I was here I found some opportunities to
    improve performance too.  The code is rather more complex, but it also
    contains a long comment describing the strategy, so please take a look
    at that for the details.
  3. fix wibble in memory leak error dump

    Simon Marlow
    Simon Marlow committed Dec 14, 2006
Commits on Dec 13, 2006
  1. Removing explicit Binary Tick Boxes; using Case instead. committed Dec 13, 2006
  2. Add left-to-right impredicative instantiation committed Dec 13, 2006
    People keep complaining, with some justification, that
    	runST $ foo
    doesn't work.  So I've finally caved in.  The difficulty with the above
    is that we need to decide how to instantiate ($)'s type arguments based 
    on the first argument (runST), and then use that info to check the second
    argumnent.  There is a left-to-right flow of information.
    It's not hard to implement this, and it's clearly useful.  The main 
    change is in TcExpr.tcArgs, with some knock-on effects elsewhere.
    I was finally provoked into this by Trac #981, which turned out, after some
    head-scratching, to be another instance of the same problem.
    (There was some bug-fixing too; a type like ((?x::Int) => ...) is a polytype
    even though it has no leading for-alls, but the new TcUnify code was not 
    treating it right.)
    Test for this is tc222
  3. Removing unused argument to a printf. committed Dec 13, 2006
  4. PowerPC NCG: support conditional branches outside +-32KB committed Dec 13, 2006
    Work around the PowerPC architecture's +-32KB limitation for conditional
    branches by conditionally skipping an unconditional branch instead
    (unconditional branches have a +-32MB range).
    This requires an extra pass over the basic blocks for each CmmTop after
    block sequencing, to determine which branches are "far".
    Fixes ticket #709, "Fixup too large" error with -fasm on PowerPC
  5. Fix allocation debugger to handle allocations in con/destructors

    igfoo committed Dec 13, 2006
    conc021 is an example of a program that broke.
    It doesn't handle them particularly well still, but it doesn't crash at
Commits on Dec 11, 2006
  1. Toggle whether the RTS gets build with debugger support for ghci

    pepeiborra committed Dec 11, 2006
    Specifically, this disables the special support in the RTS for looking up the datacon name corresponding to an address. 
    Correspondingly, the debugging commads in GHCi will not be available, and neither will the '-fdebugging' flag
Commits on Dec 10, 2006
  1. Closure inspection in GHCi

    pepeiborra committed Dec 10, 2006
    The :print, :sprint and :force commands for GHCi.
    This set of commands allows inspection of heap structures of the bindings in the interactive environment.
    This is useful to observe lazyness and specially to inspect things with undespecified polymorphic types, as happens often in breakpoints.
  2. Dynamic breakpoints in GHCi

    pepeiborra committed Dec 10, 2006
    This patch adds dynamic breakpoints to GHCi
    There is a new ':breakpoint' command to manage breakpoints.
    GHCi simply uses the breakpoint api functions in ghc-api to install itself as a client.
    The mechanism used by GHCi to keep track of enabled breakpoints is a simple table.
    When a breakpoint is hit, a new interactive session is launched and the bindings in the breakpoint are injected. Some commands are disabled in this sub session
  3. Split the GHCi monad apart from InteractiveUI, together with some rel…

    pepeiborra committed Dec 10, 2006
    …ated functions
    I found this convenient while I was extending ghci with the debugger. I wanted to put all the debugger stuff in a separate module, but I would need a huge hs-boot file to break the circular dependencies. This option seemed better
  4. Capturing and keeping track of local bindins in the desugarer

    pepeiborra committed Dec 10, 2006
    Used in the desugaring of the breakpoint primitive
  5. Handle breakpoint jumps while splicing TH functions in ghci

    pepeiborra committed Dec 10, 2006
    The dynamic linker has been modified so that it won't panic if one of the breakpointJump functions fails to resolve.
    Now, if the dynamic linker fails to find a HValue for a Name, before looking for a static symbol it will ask to
    Breakpoints.lookupBogusBreakpointVal :: Name -> Maybe HValue
    which returns an identity function for the Jump names or Nothing else.
    A TH function might contain a call to a breakpoint function. So if it is compiled to bytecodes, the breakpoints will be desugared to 'jumps'. Whenever this code is spliced, the linker will fail to find the jumpfunctions unless there is a default.
  6. Breakpoint code instrumentation

    pepeiborra committed Dec 10, 2006
    Instrumentation gets activated by the '-fdebugging' dynflag.
    All the instrumentation occurrs in the desugarer; it consists of inserting 'breakpoint' combinators at a number of places in the AST, namely: 
     - Binding sites
     - Do-notation statements 
    These 'breakpoint' combinators will later be further desugared (at DsExpr) into ___Jump functions.
    For more info about this and all the ghci.debugger see the page at the GHC wiki:
  7. The breakpoint primitive

    pepeiborra committed Dec 10, 2006
  8. Extend the GHC API with breakpoints and breakpoint handlers

    pepeiborra committed Dec 10, 2006
    The entry point is:
    setBreakpointHandler :: Session -> BkptHandler Module -> IO ()
  9. Playing with closures

    pepeiborra committed Dec 10, 2006
    RtClosureInspect includes a bunch of stuff for playing with closures:
    - the datatype Closure is the low level representation type
    - the datatype Term is the high level representation type
    - cvObtainTerm is the main entry point, providing the Term representation of an arbitrary closure
  10. Retrieving the datacon of an arbitrary closure

    pepeiborra committed Dec 10, 2006
    This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
    - The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
    - The Persistent Linker State in the dynamic linker is extended in a similar way.
    Finally, these two sources of information are consulted by:
    > Linker.recoverDataCon :: a -> TcM Name
Commits on Dec 9, 2006
  1. Two new prim ops to access the Info Table and Payload of a closure:

    pepeiborra committed Dec 9, 2006
    - infoPtr# :: a -> Addr#
    - closurePayload# :: a -> (# Array b, ByteArr# #)
    These prim ops provide the magic behind the ':print' command