1. 07 Aug, 2001 22 commits
    • ken's avatar
      [project @ 2001-08-07 19:33:33 by ken] · 565a4494
      ken authored
      For now, let mkMarshalCode_wrk = undefined for non-i386 architectures.
      565a4494
    • sewardj's avatar
      [project @ 2001-08-07 17:07:11 by sewardj] · 59f79a33
      sewardj authored
      Rewrite the machinery for pushing args to CCalls so that it can
      suitably mangle those :: ForeignObj# and ByteArray# and PtrArray#.
      59f79a33
    • ken's avatar
      [project @ 2001-08-07 17:05:35 by ken] · 653f8397
      ken authored
      Allow (and ignore, i.e., strip away) "-optc" prefix in command-line options.
      This is for mkdependC-ing and compiling C code under ghc/rts, where we
      use ghc-inplace as CC and give -optc-Dxxx options in CC_OPTS.  We used to
      generate inaccurate (insufficient) dependencies.
      653f8397
    • dsyme's avatar
      [project @ 2001-08-07 14:45:43 by dsyme] · eb5e27c3
      dsyme authored
      This is the implementation of many of the GHC primitive operations and types for the .NET CLR port of GHC.
      eb5e27c3
    • simonmar's avatar
      [project @ 2001-08-07 11:13:46 by simonmar] · f0bd52ec
      simonmar authored
      Make this compile with newer GHCs.
      f0bd52ec
    • simonmar's avatar
      [project @ 2001-08-07 11:08:36 by simonmar] · f7edc878
      simonmar authored
      - describe NOTINLINE as a synonym for NOINLINE
      - describe the general form of a pragma
      - mention that case is irrelevant in the first word of a pragma
      - mention that unrecognised pragmas are silently ignored
      f7edc878
    • simonmar's avatar
      [project @ 2001-08-07 10:54:01 by simonmar] · 4a950d42
      simonmar authored
      Back out the ExitException change; it's already taken into account by
      DriverUtil.handle.
      
      Sigbjorn: I'm not sure what was going on with your Win32 build, but it
      looks like it was a bug somewhere else.
      4a950d42
    • simonmar's avatar
      [project @ 2001-08-07 10:49:49 by simonmar] · 8553e558
      simonmar authored
      (forced commit)
      
      Note that the previous commit also fixed the bug reported by Ken Shan
      yesterday, namely that the conc004.hs test was failing.
      8553e558
    • simonmar's avatar
      [project @ 2001-08-07 10:46:57 by simonmar] · f5f6286f
      simonmar authored
      Note that you need to give the same -package options to ghc -M as you
      would for normal compilation.  Also clarify the meaning of the
      (historically named) --include-prelude option.
      f5f6286f
    • simonmar's avatar
      [project @ 2001-08-07 10:37:04 by simonmar] · 8bca021a
      simonmar authored
      (forced commit, the last one had the wrong message)
      
      Make RTS flags given on the command line override those from the
      GHCRTS environment variable.
      8bca021a
    • simonmar's avatar
      [project @ 2001-08-07 10:36:13 by simonmar] · e6820543
      simonmar authored
      Move RtsFlags.h into ghc/includes, so it's available in a binary
      installation.  RtsFlags.h was repository-copied behind the scenes to
      keep the revision history.
      e6820543
    • simonmar's avatar
      [project @ 2001-08-07 10:11:05 by simonmar] · b36887cd
      simonmar authored
      Move RtsFlags.h into ghc/includes, so it's available in a binary
      installation.  RtsFlags.h was repository-copied behind the scenes to
      keep the revision history.
      b36887cd
    • simonmar's avatar
      [project @ 2001-08-07 09:59:18 by simonmar] · aa5c1268
      simonmar authored
      markup wibbles
      aa5c1268
    • simonmar's avatar
      [project @ 2001-08-07 09:58:39 by simonmar] · 7c435dc1
      simonmar authored
      Document the GHCRTS env. var.
      7c435dc1
    • simonmar's avatar
      [project @ 2001-08-07 09:58:15 by simonmar] · 8e77f6a0
      simonmar authored
      markup wibbles
      8e77f6a0
    • simonmar's avatar
      [project @ 2001-08-07 09:57:52 by simonmar] · 82b0b975
      simonmar authored
      mark up wibbles (don't people try to format the documentation before
      checking in changes?)
      82b0b975
    • sewardj's avatar
      [project @ 2001-08-07 09:30:00 by sewardj] · 2c4f7329
      sewardj authored
      x86: remember to pop the floating-point stack when moving float/double
      results back to the Haskell stack.  Viz, use fstps/fstpl, not fsts/fstl.
      2c4f7329
    • simonmar's avatar
      [project @ 2001-08-07 09:20:52 by simonmar] · 433cdcad
      simonmar authored
      - Allow RTS options to be given using the GHCRTS environment variable.
      
      - Fix the heap size calculation to take into account all generations.
        It's more conservative than it used to be, but now it is less likely
        that the maximum heap size will be exceeded.
      
      - Compacting collection is turned on automatically when residency
        reaches 30% of the maximum heap size, tunable with +RTS -c<n>.
        +RTS -c turns off compaction altogether.
      
      - The maximum heap size is off by default.  NOTE: this also means no
        compaction by default.  It is recommended that people enable a maximum
        heap size for their system using the GHCRTS environment var; eg:
        GHCRTS=-M128m.
      433cdcad
    • sewardj's avatar
      [project @ 2001-08-07 09:16:15 by sewardj] · 0632467a
      sewardj authored
      This buffer is for notes you don't want to save, and for Lisp evaluation.
      If you want to create a file, visit that file with C-x C-f,
      then enter the text in that file's own buffer.
      
      Interpreter FFI improvements:
      
      * Support f-i dynamic.
      * Correctly handle fns which don't return anything.
      * Support x86 stdcall call-conv.
      
      Clean-up of FFI-related code in ByteCodeGen.lhs.
      0632467a
    • sewardj's avatar
      [project @ 2001-08-07 09:02:02 by sewardj] · 2b8f3628
      sewardj authored
      Do suspendThread/resumeThread round ccalls so that ccall_gc is supported.
      2b8f3628
    • rrt's avatar
      [project @ 2001-08-07 08:18:15 by rrt] · 2f3ae06e
      rrt authored
      Revert to shell-based method on Windows; the raw CreateProcess method is now
      in hslibs/lang/SystemExts.
      2f3ae06e
    • rrt's avatar
      [project @ 2001-08-07 08:16:48 by rrt] · 722e4595
      rrt authored
      Revert to System.system using the shell, hence need to use new rawSystem on
      Windows to launch GHC's sub-processes.
      722e4595
  2. 06 Aug, 2001 1 commit
  3. 05 Aug, 2001 3 commits
    • ken's avatar
      [project @ 2001-08-05 00:27:36 by ken] · d41a37d0
      ken authored
      Adjustor code cleanup. Added code to generate Alpha adjustors.
      The way we generate Alpha adjustors right now, it only works if the
      wptr function (the stub function for the Haskell side, that is) takes
      no argument other than the hptr (the Haskell closure to call)!  I believe
      the same deficiency exists in the Sparc adjustors code.
      d41a37d0
    • ken's avatar
      [project @ 2001-08-05 00:25:41 by ken] · a6e4c7f7
      ken authored
      Steps towards getting GHCi working on alpha-dec-osf3 --
      Clean up ghci/ByteCodeItbls.lhs, and add code for generating
      a jump instruction on alpha.
      a6e4c7f7
    • ken's avatar
      [project @ 2001-08-05 00:24:10 by ken] · 5fb48797
      ken authored
      #include <string.h> for memcpy prototype.
      5fb48797
  4. 04 Aug, 2001 5 commits
    • ken's avatar
      [project @ 2001-08-04 06:19:54 by ken] · ea138284
      ken authored
      NB: This commit renames some files.  In each of your build directories,
          you will need to:
      
      	rm -f ghc/compiler/prelude/primops.txt
      	rm -f ghc/compiler/prelude/primops.i
      	rm -f ghc/lib/std/PrelGHC.hi-boot
      	lndir ../fptools	# or wherever your CVS working directory is
      
      The change:
      Run PrelGHC.hi-boot through the preprocesor, as we already do primops.txt.
      
      This commit introduces a new prefix, ".pp", which means "run through
      preprocesor".  In a previous commit, I changed ghc/compiler/Makefile
      to preprocess primops.txt into primops.i.  That is gone now.  We now
      preprocess primops.txt.pp (a file in the CVS repository) into primops.txt
      (a platform-dependent file, created at build time).  We also preprocess
      PrelGHC.hi-boot.pp (a file in the CVS repository) into PrelGHC.hi-boot
      (a platform-dependent file, created at build time).
      
      The reason for using the preprocessor is because fewer primops are defined
      if SUPPORT_LONG_LONGS is undefined.  SUPPORT_LONG_LONGS is undefined on
      64-bit architectures such as the Alpha.
      ea138284
    • ken's avatar
      [project @ 2001-08-04 06:11:24 by ken] · 225d2513
      ken authored
      Changed
      
          # Add _hsc.c files to the cbits library
          SRCS += $(wildcard ../*_hsc.c)
      
      (which didn't work because SRCS has already been pattern-matched and
      substituted into other make variables to death by then) to
      
          # Add _hsc.c files to the cbits library
          C_SRCS += $(wildcard ../*_hsc.c)
      225d2513
    • ken's avatar
      [project @ 2001-08-04 06:10:04 by ken] · cf3860cc
      ken authored
      Fixed assumption that int and HsInt are the same.
      cf3860cc
    • ken's avatar
      [project @ 2001-08-04 06:09:24 by ken] · e9b02c06
      ken authored
      Change the generation of package.conf and package.conf.inplace, so that
      -lbfd and -liberty are included when necessary.
      e9b02c06
    • ken's avatar
      [project @ 2001-08-04 06:07:22 by ken] · 76bb1a31
      ken authored
      its => it's (or as the saying goes, wibble)
      76bb1a31
  5. 03 Aug, 2001 8 commits
    • ken's avatar
      [project @ 2001-08-03 23:38:50 by ken] · b17957ce
      ken authored
      Fixed: ExitException doesn't exist in __GLASGOW_HASKELL__ < 501,
      so references to ExitException should be preprocessed out.
      b17957ce
    • sof's avatar
      [project @ 2001-08-03 20:40:43 by sof] · e8964a48
      sof authored
      - have the toplevel exception handler propagate ExitExceptions, don't flag
        them as panics. i.e., when the dynamic exception handler catches a
        PhaseFailed{}, it throws an ExitException. The outer/topmost handler
        catches this (on a Win32 box, but not my other (Linux) box for some
        reason...), and maps it to a panic, which is not what you want.
      - introduced the old 'Compilation had errors' message in case of a
        PhaseFailed{}; feel free to nuke that one (again).
      e8964a48
    • sof's avatar
      [project @ 2001-08-03 17:03:48 by sof] · 0b28f77d
      sof authored
      Keep ghci.c out of C_SRCS on non-mingw plats
      0b28f77d
    • sof's avatar
      [project @ 2001-08-03 16:30:13 by sof] · 305e5f57
      sof authored
      Full complement of sized Int/Word getter routines
      305e5f57
    • sewardj's avatar
      [project @ 2001-08-03 15:11:10 by sewardj] · daf8e15b
      sewardj authored
      Fix enough bugs/incompletenesses so that foreign import (static) works
      fairly well on x86.
      
      Still ToDo:
      * f-i dynamic
      * save/restore GC/thread context around calls
      * stdcall support
      * pass/return of 64-bit integral quantities on x86
      * sparc implementation
      daf8e15b
    • sewardj's avatar
      [project @ 2001-08-03 15:05:52 by sewardj] · 593c27ba
      sewardj authored
      wibble: add cast to keep gcc happy.
      593c27ba
    • sof's avatar
      [project @ 2001-08-03 07:44:47 by sof] · 65142ed3
      sof authored
      Make dependency generation work a little bit better
      (stage1 goes through OK; yet to do a stage2, but
      thought I'd commit before I hit the sack).
      65142ed3
    • sof's avatar
      [project @ 2001-08-03 00:08:07 by sof] · a1d0f6b6
      sof authored
      Only define i_CCALL iff bci_CCALL is defined in WithHc's ByteCodes.h
      a1d0f6b6
  6. 02 Aug, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-08-02 17:15:16 by sewardj] · 54afa8cb
      sewardj authored
      Haskell-side support for FFI (foreign import only).
      
      Since doing the FFI necessarily involves gruesome
      architecture-specific knowledge about calling conventions, I have
      chosen to put this knowledge in Haskell-land, in ByteCodeFFI.
      
      The general idea is: to do a ccall, the interpreter accumulates the
      args R to L on the stack, as is the normal case for tail-calls.
      However, it then calls a piece of machine code created by ByteCodeFFI
      and which is specific to this call site.  This glue code copies args
      off the Haskell stack, calls the target function, and places the
      result back into a dummy placeholder created on the Haskell stack
      prior to the call.  The interpreter then SLIDEs and RETURNs in the
      normal way.
      
      The magic glue code copies args off the Haskell stack and pushes them
      directly on the C stack (x86) and/or into regs (sparc et al).  Because
      the code is made up specifically for this call site, it can do all
      that non-interpretively.  The address (of the C fn to call) is
      presented as just another tagged Addr# on the Haskell stack.  This
      makes f-i-dynamic trivial since the first arg is the said Addr#.
      
      Presently ByteCodeFFI only knows how to generate x86 code sequences.
      54afa8cb