1. 27 Nov, 2007 1 commit
  2. 17 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Re-working of the breakpoint support · cdce6477
      Simon Marlow authored
      This is the result of Bernie Pope's internship work at MSR Cambridge,
      with some subsequent improvements by me.  The main plan was to
      
       (a) Reduce the overhead for breakpoints, so we could enable 
           the feature by default without incurrent a significant penalty
       (b) Scatter more breakpoint sites throughout the code
      
      Currently we can set a breakpoint on almost any subexpression, and the
      overhead is around 1.5x slower than normal GHCi.  I hope to be able to
      get this down further and/or allow breakpoints to be turned off.
      
      This patch also fixes up :print following the recent changes to
      constructor info tables.  (most of the :print tests now pass)
      
      We now support single-stepping, which just enables all breakpoints.
      
        :step <expr>     executes <expr> with single-stepping turned on
        :step            single-steps from the current breakpoint
      
      The mechanism is quite different to the previous implementation.  We
      share code with the HPC (haskell program coverage) implementation now.
      The coverage pass annotates source code with "tick" locations which
      are tracked by the coverage tool.  In GHCi, each "tick" becomes a
      potential breakpoint location.
      
      Previously breakpoints were compiled into code that magically invoked
      a nested instance of GHCi.  Now, a breakpoint causes the current
      thread to block and control is returned to GHCi.
      
      See the wiki page for more details and the current ToDo list:
      
        http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
      cdce6477
  3. 27 Feb, 2007 1 commit
  4. 15 Nov, 2006 1 commit
  5. 24 Oct, 2006 1 commit
    • Simon Marlow's avatar
      Split GC.c, and move storage manager into sm/ directory · ab0e778c
      Simon Marlow authored
      In preparation for parallel GC, split up the monolithic GC.c file into
      smaller parts.  Also in this patch (and difficult to separate,
      unfortunatley):
        
        - Don't include Stable.h in Rts.h, instead just include it where
          necessary.
        
        - consistently use STATIC_INLINE in source files, and INLINE_HEADER
          in header files.  STATIC_INLINE is now turned off when DEBUG is on,
          to make debugging easier.
        
        - The GC no longer takes the get_roots function as an argument.
          We weren't making use of this generalisation.
      ab0e778c
  6. 09 Oct, 2006 1 commit
  7. 08 Jun, 2006 1 commit
  8. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  9. 03 Sep, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-09-03 15:28:18 by simonmar] · 95ca6bff
      simonmar authored
      Cleanup: all (well, most) messages from the RTS now go through the
      functions in RtsUtils: barf(), debugBelch() and errorBelch().  The
      latter two were previously called belch() and prog_belch()
      respectively.  See the comments for the right usage of these message
      functions.
      
      One reason for doing this is so that we can avoid spurious uses of
      stdout/stderr by Haskell apps on platforms where we shouldn't be using
      them (eg. non-console apps on Windows).
      95ca6bff
  10. 13 Aug, 2004 1 commit
  11. 25 Mar, 2003 1 commit
  12. 11 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
  13. 17 Jul, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-07-17 09:21:48 by simonmar] · 7457757f
      simonmar authored
      Remove most #includes of system headers from Stg.h, and instead
      #include any required headers directly in each RTS source file.
      
      The idea is to (a) reduce namespace pollution from system headers that
      we don't need, (c) be clearer about dependencies on system things in
      the RTS, and (c) improve via-C compilation times (maybe).
      
      In practice though, HsBase.h #includes everything anyway, so the
      difference from the point of view of .hc source is minimal.  However,
      this makes it easier to move to zero-includes if we wanted to (see
      discussion on the FFI list; I'm still not sure that's possible but
      at least this is a step in the right direction).
      7457757f
  14. 14 Aug, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-08-14 13:40:07 by sewardj] · bc5c8021
      sewardj authored
      Change the story about POSIX headers in C compilation.
      
      Until now, all C code in the RTS and library cbits has by default been
      compiled with settings for POSIXness enabled, that is:
         #define _POSIX_SOURCE   1
         #define _POSIX_C_SOURCE 199309L
         #define _ISOC9X_SOURCE
      If you wanted to negate this, you'd have to define NON_POSIX_SOURCE
      before including headers.
      
      This scheme has some bad effects:
      
      * It means that ccall-unfoldings exported via interfaces from a
        module compiled with -DNON_POSIX_SOURCE may not compile when
        imported into a module which does not -DNON_POSIX_SOURCE.
      
      * It overlaps with the feature tests we do with autoconf.
      
      * It seems to have caused borkage in the Solaris builds for some
        considerable period of time.
      
      The New Way is:
      
      * The default changes to not-being-in-Posix mode.
      
      * If you want to force a C file into Posix mode, #include as
        the **first** include the new file ghc/includes/PosixSource.h.
        Most of the RTS C sources have this include now.
      
      * NON_POSIX_SOURCE is almost totally expunged.  Unfortunately
        we have to retain some vestiges of it in ghc/compiler so that
        modules compiled via C on Solaris using older compilers don't
        break.
      bc5c8021
  15. 09 Aug, 2001 1 commit
  16. 02 Aug, 2001 1 commit
  17. 01 May, 2001 1 commit
  18. 21 Mar, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-03-21 10:56:04 by sewardj] · 44f0f21f
      sewardj authored
      RTS support for the ugly tagToEnum# hack.  Actually a very general
      thing -- just a bytecode unconditional jump, so we can do more general
      control-flow in BCOs.
      44f0f21f
  19. 11 Feb, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-02-11 17:51:07 by simonmar] · 6d35596c
      simonmar authored
      Bite the bullet and make GHCi support non-optional in the RTS.  GHC
      4.11 should be able to build GHCi without any additional tweaks now.
      
      - the Linker is split into two parts: LinkerBasic.c, containing the
        routines required by the rest of the RTS, and Linker.c, containing
        the linker proper, which is not referred to from the rest of the RTS.
        Only Linker.c requires -ldl, so programs which don't make use of the
        linker (everything except GHC, in other words) won't need -ldl.
      6d35596c
  20. 05 Jan, 2001 1 commit
  21. 03 Jan, 2001 1 commit
  22. 20 Dec, 2000 1 commit
  23. 19 Dec, 2000 1 commit
  24. 09 Oct, 2000 1 commit
    • daan's avatar
      [project @ 2000-10-09 11:18:46 by daan] · 91229807
      daan authored
      Lots of changes for Xmlambda. all changes are between
      #ifdef XMLAMBDA blocks.
      
      - new bytecodes for Inj constructors and witnesses
      - new primops for rows
      - code for calling foreign functions. This only works with
      'dynamic.c' but that is not checked in yet.
      91229807
  25. 15 Jun, 2000 1 commit
    • daan's avatar
      [project @ 2000-06-15 13:23:51 by daan] · 3d124552
      daan authored
      Added new primitives and bytecodes that support
      code generation for XMLambda. All additions are
      surrounded by #ifdef XMLAMBDA.
      
      Most important additions:
      - Rows (n-tuples) which are implemented on top of Frozen Mutarrays
      - Inj (variant sums), which is implemented using a new constructor
      called Inj which contains both the value and an unboxed int
      which represents the index.
      3d124552
  26. 07 Dec, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-12-07 11:49:09 by sewardj] · eaf6532a
      sewardj authored
      Add i_ALLOC_CONSTR_big (== i_ALLOC_CONSTR with a 16-bit field
      denoting offset of into table).  The large constant tables in
      nofib/spectral/hartel/nucleic2 need this.
      eaf6532a
  27. 16 Nov, 1999 1 commit
  28. 01 Nov, 1999 1 commit
  29. 26 Oct, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-10-26 17:27:25 by sewardj] · 6642714e
      sewardj authored
      Add foreign import/export implementations for x86 stdcall convention.
      
      Make parser notice calling conventions on f-i and f-x declarations,
      check they are supported on the platform Hugs is compiled on.  Pass
      them all the way through the code generator to the interpreter.
      
      Allow f-i/f-x decls to omit the calling convention, in which case
      ccall is used.  Remove calling convention from all such decls
      in the Prelude so it will work on any platform.
      6642714e
  30. 15 Oct, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-10-15 11:02:06 by sewardj] · dfb12323
      sewardj authored
      Added basic support for foreign export dynamic.
      
      Many aspects of it are still broken:
      * Only supports x86-linux.
      * The range of allowable types is small: Char Int Float Double
        Addr and Word.
      * Adjustor thunks are never freed.
      * Returning Doubles or Floats doesn't work at all.
      
      I expect to fix some of these shortly.  foreign import also
      needs redoing, so it can accept any number of arguments of
      any type.
      
      Also:
      * Fixed setRtsFlags in Evaluator.c to make it endian-independent.
      * Fixed raisePrim in Evaluator.c so things like division by zero,
        array index errors, etc, throw an exception instead of
        terminating StgHugs.  raisePrim is renamed makeErrorCall.
      dfb12323
  31. 06 Jul, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-07-06 16:40:22 by sewardj] · 47a40c89
      sewardj authored
      Assembler/Disassembler: handle and print calls to compiled code
      Evaluator: return to scheduler when entering unknown closure
      StgCRun: debugging trace in miniinterpreter (temporary)
      Updates: fix normal and vectored returns to Hugs
      47a40c89
  32. 27 Apr, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-04-27 10:06:47 by sewardj] · b9ad54f9
      sewardj authored
      Changes to improve runtime performance of STG Hugs.
      -- Reorganisation of the evaluator (Evaluator.c).
      -- Changes to code emission (Assembler.c) to support peephole opts
      -- An experimental simplifier (optimise.c).
      -- Many supporting bug fixes and minor changes.
      -- Experimental implementation of integer for standalone hugs (sainteger.c).
      b9ad54f9
  33. 09 Mar, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-03-09 14:51:03 by sewardj] · 9da01c71
      sewardj authored
      Many improvements resulting from first attempt to run nofib suite:
      -- More libraries (lib/*.hs) brought into operation
      -- Prelude error handling and basic I/O improved
      -- Changed bytecode immediate value fields so large constant
      --   tables can be compiled
      -- Fixed bugs: translation of FATBAR, negative floating point
      --   literals, strict constructors, handling of CAFs
      9da01c71
  34. 01 Mar, 1999 1 commit
  35. 05 Feb, 1999 1 commit
  36. 02 Dec, 1998 1 commit