1. 04 Mar, 2002 9 commits
    • qrczak's avatar
      [project @ 2002-03-04 23:06:40 by qrczak] · 555a3516
      qrczak authored
      No longer refuse to work with gcc3.
      555a3516
    • sof's avatar
      [project @ 2002-03-04 19:26:01 by sof] · a653419f
      sof authored
      hc-file-bundle (pt2): sigh, make that PrimopWrappers.hs
      a653419f
    • simonmar's avatar
      [project @ 2002-03-04 17:20:46 by simonmar] · beb438b9
      simonmar authored
      oops, revert part of previous commit that wasn't supposed to be included.
      beb438b9
    • simonmar's avatar
      [project @ 2002-03-04 17:01:26 by simonmar] · 0171936c
      simonmar authored
      Binary Interface Files - stage 1
      --------------------------------
      
      This commit changes the default interface file format from text to
      binary, in order to improve compilation performace.
      
      To view an interface file, use 'ghc --show-iface Foo.hi'.
      
      utils/Binary.hs is the basic Binary I/O library, based on the nhc98
      binary I/O library but much stripped-down and working in terms of
      bytes rather than bits, and with some special features for GHC: it
      remembers which Module is being emitted to avoid dumping too many
      qualified names, and it keeps track of a "dictionary" of FastStrings
      so that we don't dump the same FastString more than once into the
      binary file.  I'll make a generic version of this for the libraries at
      some point.
      
      main/BinIface.hs contains most of the Binary instances.  Some
      instances are in the same module as the data type (RdrName, Name,
      OccName in particular).  Most instances were generated using a
      modified version of DrIFT, which I'll commit later.  However, editing
      them by hand isn't hard (certainly easier than modifying
      ParseIface.y).
      
      The first thing in a binary interface is the interface version, so
      nice error messages will be generated if the binary format changes and
      you still have old interfaces lying around.  The version also now
      includes the "way" as an extra sanity check.
      
      Other changes
      -------------
      
      I don't like the way FastStrings contain both hashed strings (with
      O(1) comparison) and literal C strings (with O(n) comparison).  So as
      a first step to separating these I made serveral "literal" type
      strings into hashed strings.  SLIT() still generates a literal, and
      now FSLIT() generates a hashed string.  With DEBUG on, you'll get a
      warning if you try to compare any SLIT()s with anything, and the
      compiler will fall over if you try to dump any literal C strings into
      an interface file (usually indicating a use of SLIT() which should be
      FSLIT()).
      
      mkSysLocal no longer re-encodes its FastString argument each time it
      is called.
      
      I also fixed the -pgm options so that the argument can now optionally
      be separted from the option.
      
      Bugfix: PrelNames declared Names for several comparison primops, eg.
      eqCharName, eqIntName etc. but these had different uniques from the
      real primop names.  I've moved these to PrimOps and defined them using
      mkPrimOpIdName instead, and deleted some for which we don't have real
      primops (Manuel: please check that things still work for you after
      this change).
      0171936c
    • simonmar's avatar
      [project @ 2002-03-04 14:40:54 by simonmar] · 6561aa4e
      simonmar authored
      import wibbles
      6561aa4e
    • keithw's avatar
      [project @ 2002-03-04 14:39:46 by keithw] · 4815e2e0
      keithw authored
      Explain the *other* thing AP_UPDs are used for (not just Hugs, but
      also stack-freezing for raiseAsync()).
      4815e2e0
    • keithw's avatar
      [project @ 2002-03-04 10:35:43 by keithw] · 82d1ee5e
      keithw authored
      Wibble.
      82d1ee5e
    • sof's avatar
      [project @ 2002-03-04 01:36:08 by sof] · 9ad5334b
      sof authored
      de-stodged
      9ad5334b
    • sof's avatar
      [project @ 2002-03-04 01:29:11 by sof] · 94c2ed97
      sof authored
      hc-file-bundle: new location of PrimWrappers.hs (nee PrelPrimOpWrappers.hs)
      94c2ed97
  2. 03 Mar, 2002 1 commit
  3. 02 Mar, 2002 6 commits
    • sof's avatar
      [project @ 2002-03-02 18:02:30 by sof] · a249439b
      sof authored
      Urk, code generator assumed reversed info tables
      in its implementation of dataToTag# - broke a
      compiler built unregisterised rather weirdly
      (and only, none of the code in testsuite/ nor
      nofib/ showed up this bug.)
      
      This commit assumes that unregisterised==
      info_tables_not_next_to_code & calls upon
      a trusty old PrimOps.h macro to locate the tag
      in the info table (the reasons for doing it
      this way is explained in AbsCUtils.lhs
      comments).
      
      To help the poor sod who has to debug a break
      like this sometime in the future, I'm trying to
      come up with a repro case smaller than
      ghc/compiler/ -- not yet successful.
      
      Anyway, this concludes the fixes to the
      unregisterised bits; I hereby claim that it
      is now working again.
      a249439b
    • sof's avatar
      [project @ 2002-03-02 17:51:22 by sof] · 0b7c9ee4
      sof authored
      re-introduce dataToTagzh macro (unreg builds only)
      0b7c9ee4
    • sof's avatar
      [project @ 2002-03-02 17:49:42 by sof] · bb22180b
      sof authored
      Add the CPP flags used by an unregisterised build
      when compiling the .h generating utilities herein.
      As was, info table size was wrongly computed in
      the unregisterised case.
      bb22180b
    • sof's avatar
      [project @ 2002-03-02 17:46:03 by sof] · ae231767
      sof authored
      Add stg_ut_1_0_unreg_info proto (only)
      ae231767
    • sof's avatar
      [project @ 2002-03-02 17:43:44 by sof] · d07a6e61
      sof authored
      - new utility return address, stg_ut_1_0_unreg_{info,ret}, which
        returns via Sp[1] (assuming R1 is in Sp[0], which it is in
        the unregisterised, no-REG_R1 case.
      
        The only 'consumer' of this entry point is the implementation
        of PrimOps.takeMVarzh_fast in an unregisterised build.
      d07a6e61
    • sof's avatar
      [project @ 2002-03-02 17:40:24 by sof] · 2f015a00
      sof authored
      - gcdIntegerIntzh_fast: another primop with mismatched return
        convention.
      - tidy up PerformTake() for non-REG_R1 case.
      - forkzh_fast and myThreadIdzh_fast: I mistakenly had ThreadId#s
        down as something unboxed; they're not, but unpointed. Update
        primops to use the RET_P() macro upon return instead.
      2f015a00
  4. 01 Mar, 2002 5 commits
    • keithw's avatar
      [project @ 2002-03-01 18:28:15 by keithw] · 045fb1b0
      keithw authored
      Addendum to previous commit message:
      
      We can't tell whether the stg_sel and stg_ap thunks correspond to
      static or dynamic thunks, and it's not worth duplicating them all just
      so the ticky-ticky stats can be correct.  So I have played it safe
      (for my purposes at least!) and counted them all as dynamic.  Yell if
      this is a problem (njn?)
      045fb1b0
    • keithw's avatar
      [project @ 2002-03-01 18:11:20 by keithw] · ee1aabdc
      keithw authored
      Fix bug in ticky-ticky stats (particularly obvious in
      nofib/imaginary/queens) that was meaning some thunk entries were not
      being counted in ENT_{STATIC,DYN}_THK_ctr.  Specifically, tick the
      counter for the stg_sel and stg_ap thunks, as well as non-standard
      thunks!
      
      Also add TICK_UPDF_OMITTED into the stg_sel_noupd thunks (there are no
      stg_ap_noupd thunks, or else I would have put it there too).
      
      Also, fix a bug in the sense of the test for update squeezing when
      printing (or not) ENT_PERM_IND: we don't print out ENT_PERM_IND unless
      update squeezing is turned off, because it may be invalid (see note).
      If someone needs this counter, please just remove the test entirely
      and always print ENT_PERM_IND.
      ee1aabdc
    • simonpj's avatar
      [project @ 2002-03-01 16:53:14 by simonpj] · 06944f8b
      simonpj authored
      Minor bug in float-out
      06944f8b
    • simonmar's avatar
      [project @ 2002-03-01 14:20:06 by simonmar] · 43f0ef0d
      simonmar authored
      remove redundant check for size_t
      43f0ef0d
    • simonmar's avatar
      [project @ 2002-03-01 09:47:39 by simonmar] · 8f09c162
      simonmar authored
      Generalise a couple of regexps in the -monly-[23]-regs patching code.
      Should fix problems with gcc 3.0.4.
      8f09c162
  5. 28 Feb, 2002 9 commits
    • sof's avatar
      [project @ 2002-02-28 18:54:53 by sof] · 76ad1b30
      sof authored
      stg_gc_unpt_r1_ret: if R1 isn't mapped to a real register,
      keep it on the stack.
      
      I confess to 'pushing symbols' here a bit, as the exact
      nature (and function) of stg_gc_unpt_r1_info isn't clear
      to me (documentation isn't abundant, for one.) However,
      it will now behave in a manner consistent with what
      the code generator emits in the unregisterised case.
      76ad1b30
    • keithw's avatar
      [project @ 2002-02-28 18:50:40 by keithw] · f3a251e3
      keithw authored
      Un-rot nofib-analyse, so it compiles with ghc-5.02.2.
      
      * add a regexp for GNU time 1.7
      
      * import Html hiding ((!)) now hides Html.! as well as !, so add an
        import qualified Html ((!)) as well.
      
      * compile Printf with -fvia-c to work around bug in foreign import of
        snprintf (was always printing "0.00" no matter what input given).
      f3a251e3
    • sof's avatar
      [project @ 2002-02-28 18:45:51 by sof] · fe4844f7
      sof authored
      make sure stdout is flushed; unused arg wibble
      fe4844f7
    • sof's avatar
      [project @ 2002-02-28 18:44:28 by sof] · 311879d2
      sof authored
      myThreadIdzh_fast: used bogus return convention
      311879d2
    • sof's avatar
      [project @ 2002-02-28 16:25:15 by sof] · dd2e00b5
      sof authored
      Huh? Surely stg_block_{take,put}mvar ought to be pushing info pointers and not direct return addresses
      dd2e00b5
    • simonpj's avatar
      [project @ 2002-02-28 12:17:19 by simonpj] · 469c3333
      simonpj authored
      ---------------------------------
      	Fix a rather obscure bug in tcGen
      	---------------------------------
      
      This bug concerns deciding when a type variable "escapes",
      and hence we can't generalise it.  Our new subsumption-checking
      machinery for higher-ranked types requires a slightly
      more general approach than I had before.  The main excitement
      is in TcUnify.checkSigTyVars and its friends.
      
      As usual, I moved functions around and cleaned things up a bit;
      hence the multi-module commit.
      469c3333
    • simonmar's avatar
      [project @ 2002-02-28 10:15:47 by simonmar] · 9c3cdff0
      simonmar authored
      module names are allowed to contain '.' these days.
      9c3cdff0
    • sof's avatar
      [project @ 2002-02-28 08:53:58 by sof] · f33a70de
      sof authored
      - gcdIntzh_fast, cmpIntegerIntzh_fast, cmpIntegerzh_fast,
        integer2Intzh_fast, and integer2Wordzh_fast all used the
        unboxed tuple return convention, which isn't quite right
        since they're just returning unboxed values. Fixed.
      
      - similarly for forkzh_fast, it was using an unboxed value
        return convention, ought to be doing an unboxed tuple
        return.
      
      
      Both of these broke the unregisterised build -- it still not
      sane, more debugging to be done.
      f33a70de
    • sof's avatar
      [project @ 2002-02-28 08:53:13 by sof] · 685c0e46
      sof authored
      typo
      685c0e46
  6. 27 Feb, 2002 10 commits