1. 17 Jul, 2002 3 commits
    • 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
    • simonmar's avatar
      [project @ 2002-07-17 09:14:27 by simonmar] · 2790095b
      simonmar authored
      turn off -Wcast-align, it generates gobs of complaints on Sparc
      2790095b
    • simonmar's avatar
      [project @ 2002-07-17 08:26:44 by simonmar] · e9148ae0
      simonmar authored
      oops, missed one instance of __stginit_GHCziPrim (I killed it yesterday)
      e9148ae0
  2. 16 Jul, 2002 10 commits
    • lewie's avatar
      [project @ 2002-07-16 22:26:49 by lewie] · 5d7120f9
      lewie authored
      Fix typo in explanation of "What AbsBinds means" just to prove that I'm
      not deadweight on the GHC committers list ;-)
      5d7120f9
    • simonmar's avatar
      [project @ 2002-07-16 15:07:15 by simonmar] · 45249cb5
      simonmar authored
      Silly me, the version number in the interface isn't correct until
      after mkFinalIface, so don't grab it until then.
      45249cb5
    • simonmar's avatar
      [project @ 2002-07-16 14:56:08 by simonmar] · 9a972425
      simonmar authored
      Implement a primitive failsafe mechanism for protecting against
      linking inconsistent object files.  The idea is that if object files
      which were compiled in the wrong order (non-dependency order) or
      compiled in different ways (eg. profiled vs. non-profiled) are linked
      together, a link error will result.
      
      This is achieved by adding the module version and the way to the
      module init label.  For example, previously the init label for a
      module Foo was named
      
      	__stginit_Foo
      
      now it is named
      
      	__stginit_Foo_<version>_<way>
      
      where <version> is the module version of Foo (same as the version in
      the interface file), and <way> is the current way (or empty).
      
      We also have to have a way to refer to the old plain init label, for
      using as the argument to shutdownHaskell() in a program using foreign
      exports.  So the old label now points to a jump instruction which
      transfers control to the new init code.
      9a972425
    • simonmar's avatar
      [project @ 2002-07-16 14:49:38 by simonmar] · 8c086331
      simonmar authored
      comment fix
      8c086331
    • simonmar's avatar
      [project @ 2002-07-16 12:05:37 by simonmar] · 2db30d06
      simonmar authored
      un-rot one transformation on x86: we normally transform
      
      	movl $_blah, %eax
      	jmp  *%eax
      
      into simply
      
      	jmp _blah
      
      but the pattern had rotted w.r.t. gcc so this was no longer applying.
      Should reduce code size measurably.
      
      MERGE TO STABLE
      2db30d06
    • simonmar's avatar
      [project @ 2002-07-16 10:58:16 by simonmar] · f9206647
      simonmar authored
      Remove DLL_IMPORT from the two closure declarations in this file,
      because otherwise the file is not standalone.
      
      Doing the right thing doesn't seem easy, because we have to get the
      right value of DONT_WANT_WIN32_DLLS from somewhere.  Anyway if/when
      DLL support is revived we'll have to revisit this.
      
      MERGE TO STABLE
      f9206647
    • simonmar's avatar
      [project @ 2002-07-16 10:51:12 by simonmar] · 025f5dfe
      simonmar authored
      The restore instruction on Sparc apparently has arguments under GCC
      3.1, which caused one of the patterns to break in the mangler.
      
      I can now run simple programs compiled with GHC on Sparc using GCC
      3.1, so hopefully this fixes it.
      
      MERGE TO STABLE (and the previous one).
      025f5dfe
    • simonmar's avatar
      [project @ 2002-07-16 10:17:37 by simonmar] · 2011da8d
      simonmar authored
      GCC 3.1 on Sparc now uses '.long'.
      2011da8d
    • stolz's avatar
      [project @ 2002-07-16 07:04:49 by stolz] · 03e9edb3
      stolz authored
      The <dlfcn.h> constants RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL
      are not defined in the OpenBSD implementation of the dl library.
      
      dons@cse.unsw.edu.au (Donald Bruce Stewart)
      03e9edb3
    • sof's avatar
      [project @ 2002-07-16 06:42:04 by sof] · 05bead0e
      sof authored
      Treat ';' and '{' as word separators, so that from
      input like like "{import Foo" and ";;;;import Foo",
      the 'Foo' imports are identified.
      05bead0e
  3. 15 Jul, 2002 5 commits
    • panne's avatar
      [project @ 2002-07-15 16:43:34 by panne] · be2cd17f
      panne authored
      * Solaris' quite spartanic /bin/sh doesn't know about the '!' keyword,
        so let's simply reverse the operator in the test instead.
      
      * The FPTOOLS_SEARCH_LIBS macro expects a function without any
        arguments, but glXChooseVisual *does* have arguments. glXWaitX is a
        better test for GLX libs.
      
      MERGE TO STABLE
      be2cd17f
    • simonmar's avatar
      [project @ 2002-07-15 14:49:17 by simonmar] · 2e925075
      simonmar authored
      Unbreak the registering of foreign exports as stable pointers, which
      was brokwn in rev. 1.64.  This will eventually cause any program that
      uses the same foreign export repeatedly to seg fault.  Dunno why we
      don't have a test for this.
      
      *sigh* the first bad bug in 5.04
      
      MERGE TO STABLE
      2e925075
    • simonmar's avatar
      [project @ 2002-07-15 08:41:46 by simonmar] · d846cdf3
      simonmar authored
      Don't declare the StgClosures 'const' (they aren't declared 'const' in
      generated code).
      d846cdf3
    • simonmar's avatar
      [project @ 2002-07-15 08:41:02 by simonmar] · 3ccd3959
      simonmar authored
      Static closures are not declared 'const' in generated code, so don't
      declare them 'const' in here.
      
      Spotted-by: GCC 3.1
      3ccd3959
    • chak's avatar
      [project @ 2002-07-15 07:24:58 by chak] · c1d02536
      chak authored
      Let `configure' know about the "m68k-unknown-openbsd" architecture.
      Patch contributed by Donald Stewart <dons@cse.unsw.edu.au>.
      c1d02536
  4. 12 Jul, 2002 5 commits
  5. 11 Jul, 2002 5 commits
  6. 10 Jul, 2002 6 commits
    • sof's avatar
      [project @ 2002-07-10 16:33:09 by sof] · de37d36e
      sof authored
      printDump,printErrs,printSDoc: flush stdout and stderr
      de37d36e
    • simonpj's avatar
      [project @ 2002-07-10 13:07:42 by simonpj] · 5562ede1
      simonpj authored
      Fix trivial bug in WorkWrap that killed all INLINE pragmas!  Merge to STABLE
      5562ede1
    • simonpj's avatar
      [project @ 2002-07-10 13:06:35 by simonpj] · 309b08d2
      simonpj authored
      Improve error message; merge to STABLE
      309b08d2
    • simonmar's avatar
      [project @ 2002-07-10 09:28:54 by simonmar] · f477a85c
      simonmar authored
      Fix a GC bug.  In a "large block", only the block descriptor for the
      head of the block has the fields step, gen_no and flags set.  So
      whenever we want one of these fields in the descriptor for a random
      object anywhere in the large block, we have to check whether it is in
      the head block, and if not follow the link to the head block
      descriptor.
      
      evacuate() was doing this correctly, but isAlive() wasn't (and
      goodness knows what other places are broken in this way - I identified
      several other possible cases of the same bug).
      
      So to try to make things more robust, when we allocate a large block
      we now initialise the step, gen_no, and flags fields in the descriptor
      for *every* sub-block, not just the first one.  Now, as long as you
      only want one of these fields from the descriptor, there's no need to
      try to find the block head.  evacuate() gets minutely faster, and
      hopefully multiple obscure bugs are fixed by this.
      f477a85c
    • simonmar's avatar
      [project @ 2002-07-10 08:39:00 by simonmar] · ea927921
      simonmar authored
      change #ifdef USING_LIBBFD to #if defined(DEBUG) && defined(HAVE_LIBBFD).
      ea927921
    • simonmar's avatar
      [project @ 2002-07-10 08:34:19 by simonmar] · 81b0f793
      simonmar authored
      Fix a bug in the handling of libbfd - we should be checking for DEBUG
      in $(GhcRtsHcOpts) not $(GhcHcOpts), and we can get HAVE_LIBBFD from
      config.h so there's no need to unconditionally define USING_LIBBFD.
      81b0f793
  7. 09 Jul, 2002 5 commits
    • sof's avatar
      [project @ 2002-07-09 20:44:24 by sof] · d4fc9665
      sof authored
      awaitEvent: better handling of EBADFs, i.e., don't
      unconditionally barf() and exit if select() reports
      an EBADF. See source code comments for details, but
      in short, we attempt to unblock all threads to handle
      the error condition before bailing out.
      
      If only select() would indicate which file descriptor
      that was the bad one.
      
      (There's no good reason why select() errors other
      than EBADF could also be handled this way, but let's
      focus on it for now..)
      d4fc9665
    • sof's avatar
      [project @ 2002-07-09 18:02:48 by sof] · 689f0ca9
      sof authored
      gcc versionitis wrt gcc -E -MM .. usage:
      
      2.95.<wurble> is silent on stdout if -MM is used, 2.96 ain't
      (even when -o is used..hmm.) 2.95 (on mingw32) even fails if
      you try to redirect the output.
      
      So, be more accepting in first trying to run CPP with a redirect,
      and if that fails, try without.
      689f0ca9
    • sof's avatar
      [project @ 2002-07-09 15:57:09 by sof] · d89f0e2d
      sof authored
      merge rev. 1.1.6.1
      d89f0e2d
    • simonpj's avatar
      [project @ 2002-07-09 08:19:14 by simonpj] · 75c431d1
      simonpj authored
      Improve error message
      
      	*** MERGE TO STABLE BRANCH ***
      75c431d1
    • panne's avatar
      [project @ 2002-07-09 06:16:14 by panne] · 1d37807e
      panne authored
      Fixed my email address
      1d37807e
  8. 08 Jul, 2002 1 commit