- 31 Mar, 2003 2 commits
-
-
simonmar authored
On 32-bit platforms, add a bunch of symbols from libgcc.a used to support 64-bit arithmetic. It looks like these symbols are defined in libc on some platforms but not others, but it shouldn't do any harm to include them in the list of symbols that the linker knows about even if they're also in libc. They were already included for some platforms (cygwin, mingw, and darwin), this commit just includes then whenever we're compiling with gcc on a 32-bit platform.
-
simonmar authored
Include NetBSD support Submitted by: Urban Boquist <boquist@crt.se>
-
- 25 Mar, 2003 1 commit
-
-
sof authored
to ease replacement of the underlying allocator used by stgMallocBytes() and friends, provide (&use) RtsUtils.c:stgFree()
-
- 21 Feb, 2003 1 commit
-
-
sof authored
Asynchronous / non-blocking I/O for Win32 platforms. This commit introduces a Concurrent Haskell friendly view of I/O on Win32 platforms. Through the use of a pool of worker Win32 threads, CH threads may issue asynchronous I/O requests without blocking the progress of other CH threads. The issuing CH thread is blocked until the request has been serviced though. GHC.Conc exports the primops that take care of issuing the asynchronous I/O requests, which the IO implementation now takes advantage of. By default, all Handles are non-blocking/asynchronous, but should performance become an issue, having a per-Handle flag for turning off non-blocking could easily be imagined&introduced. [Incidentally, this thread pool-based implementation could easily be extended to also allow Haskell code to delegate the execution of arbitrary pieces of (potentially blocking) external code to another OS thread. Given how relatively gnarly the locking story has turned out to be with the 'threaded' RTS, that may not be such a bad idea.]
-
- 10 Feb, 2003 2 commits
-
-
wolfgang authored
Mac OS X: add one more relocation type (PPC_RELOC_BR24) and add more C run-time library symbols to the symbol table (made more difficult by the fact that these symbols don't have an underscore prefix, while everything else on Mac OS X has)
-
simonmar authored
Add some missing symbols. Should fix several recent test breakages with GHCi.
-
- 29 Jan, 2003 1 commit
-
-
simonmar authored
- re-instate setProgArgv, it is used in System.Environment (bah, could have sworn I grepped for it and found nothing...) - Remove init_stack symbol from the Linker's symbol table; this is now static.
-
- 28 Jan, 2003 1 commit
-
-
simonmar authored
- Remove setProgArgv - Belatedly add startupHaskell/shutdownHaskell
-
- 13 Jan, 2003 1 commit
-
-
simonmar authored
The hook NoRunnableThreads() is not used; kill it.
-
- 27 Dec, 2002 1 commit
-
-
panne authored
Warning police: #undef SymX_redirect before it gets redefined. :-P
-
- 19 Dec, 2002 1 commit
-
-
simonmar authored
Terrible hack to restore CAF handling behaviour in GHCi (it's currently broken). The story used to be this: in newCAF(), if the CAF is in dynamically loaded code, then we save the CAF's info ptr in a spare slot in the closure, and add the CAF to the caf_list. The GC will retain everything on the caf_list. At any point the CAFs can all be reverted by replacing their info pointers from the saved copies. CAFs need to be retained for GHCi because they might be required in a future execution; an optimisation would be to avoid retaining the CAFs if we're in "revert mode"; i.e. the CAFs are all going to be reverted after execution anyway. Also, this only applies to CAFs in compiled code; CAFs in interpreted code are currently always retained. Anyway, the old story is harder now that I removed the code that checks whether a pointer is dynamically loaded or not (:-)). Rather than re-instate that code, I created a new version of newCAF (newDynCAF), and arranged that the dynamic linker redirects any references to newCAF to point to newDynCAF instead. The result is more efficient than before, and takes less code.
-
- 11 Dec, 2002 1 commit
-
-
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.
-
- 23 Oct, 2002 1 commit
-
-
simonmar authored
Add atomicModifyIORefzh_fast symbol (should have been done with the rest of the atomicModifyIORef# commit, thanks to Manuel Chakravarty for pointing out the problem).
-
- 12 Oct, 2002 1 commit
-
-
wolfgang authored
Make the Mac OS X build use the HaskellSupport.framework (a MacOS-style "framework" that includes the required libraries libgmp and dlcompat) if it is present. The HaskellSupport.framework is not yet in CVS, but is available from me.
-
- 02 Oct, 2002 1 commit
-
-
wolfgang authored
PowerPC Mach-O: Handle more kinds of relocations, so that non-PIC-code can be loaded
-
- 13 Sep, 2002 1 commit
-
-
simonpj authored
-------------------------------------- Make Template Haskell into the HEAD -------------------------------------- This massive commit transfers to the HEAD all the stuff that Simon and Tim have been doing on Template Haskell. The meta-haskell-branch is no more! WARNING: make sure that you * Update your links if you are using link trees. Some modules have been added, some have gone away. * Do 'make clean' in all library trees. The interface file format has changed, and you can get strange panics (sadly) if GHC tries to read old interface files: e.g. ghc-5.05: panic! (the `impossible' happened, GHC version 5.05): Binary.get(TyClDecl): ForeignType * You need to recompile the rts too; Linker.c has changed However the libraries are almost unaltered; just a tiny change in Base, and to the exports in Prelude. NOTE: so far as TH itself is concerned, expression splices work fine, but declaration splices are not complete. --------------- The main change --------------- The main structural change: renaming and typechecking have to be interleaved, because we can't rename stuff after a declaration splice until after we've typechecked the stuff before (and the splice itself). * Combine the renamer and typecheker monads into one (TcRnMonad, TcRnTypes) These two replace TcMonad and RnMonad * Give them a single 'driver' (TcRnDriver). This driver replaces TcModule.lhs and Rename.lhs * The haskell-src library package has a module Language/Haskell/THSyntax which defines the Haskell data type seen by the TH programmer. * New modules: hsSyn/Convert.hs converts THSyntax -> HsSyn deSugar/DsMeta.hs converts HsSyn -> THSyntax * New module typecheck/TcSplice type-checks Template Haskell splices. ------------- Linking stuff ------------- * ByteCodeLink has been split into ByteCodeLink (which links) ByteCodeAsm (which assembles) * New module ghci/ObjLink is the object-code linker. * compMan/CmLink is removed entirely (was out of place) Ditto CmTypes (which was tiny) * Linker.c initialises the linker when it is first used (no need to call initLinker any more). Template Haskell makes it harder to know when and whether to initialise the linker. ------------------------------------- Gathering the LIE in the type checker ------------------------------------- * Instead of explicitly gathering constraints in the LIE tcExpr :: RenamedExpr -> TcM (TypecheckedExpr, LIE) we now dump the constraints into a mutable varabiable carried by the monad, so we get tcExpr :: RenamedExpr -> TcM TypecheckedExpr Much less clutter in the code, and more efficient too. (Originally suggested by Mark Shields.) ----------------- Remove "SysNames" ----------------- Because the renamer and the type checker were entirely separate, we had to carry some rather tiresome implicit binders (or "SysNames") along inside some of the HsDecl data structures. They were both tiresome and fragile. Now that the typechecker and renamer are more intimately coupled, we can eliminate SysNames (well, mostly... default methods still carry something similar). ------------- Clean up HsPat ------------- One big clean up is this: instead of having two HsPat types (InPat and OutPat), they are now combined into one. This is more consistent with the way that HsExpr etc is handled; there are some 'Out' constructors for the type checker output. So: HsPat.InPat --> HsPat.Pat HsPat.OutPat --> HsPat.Pat No 'pat' type parameter in HsExpr, HsBinds, etc Constructor patterns are nicer now: they use HsPat.HsConDetails for the three cases of constructor patterns: prefix, infix, and record-bindings The *same* data type HsConDetails is used in the type declaration of the data type (HsDecls.TyData) Lots of associated clean-up operations here and there. Less code. Everything is wonderful.
-
- 05 Sep, 2002 1 commit
-
-
simonmar authored
Remove RtsAPIDeprec.c, since this is causing grief. The upshot (I think) is that you won't be able to do foreign import "wrapper" with an Addr in the type.
-
- 16 Aug, 2002 1 commit
-
-
simonmar authored
Global and common variable sweep: staticize many variables that don't need to be globally visible.
-
- 18 Jul, 2002 1 commit
-
-
sof authored
more include tweaking
-
- 17 Jul, 2002 1 commit
-
-
simonmar authored
oops, missed one instance of __stginit_GHCziPrim (I killed it yesterday)
-
- 08 Jul, 2002 1 commit
-
-
simonpj authored
Remove duplicate line in Linker.c *** MERGE TO STABLE BRANCH ***
-
- 02 Jul, 2002 1 commit
-
-
wolfgang authored
added a missing SymX(__eprintf) improved handling of local symbols
-
- 15 Jun, 2002 1 commit
-
-
wolfgang authored
remove RTS_DARWIN_ONLY_SYMBOLS, use RTS_EXTRA_SYMBOLS instead.
-
- 12 Jun, 2002 1 commit
-
-
wolfgang authored
Initial support for GHCi on MacOS X. The code still has problems with global variables in compiled C code, but it _seems_ to work OK for GHC-compiled code. Many error checks are still missing.
-
- 11 Jun, 2002 1 commit
-
-
matthewc authored
#ifdef use of EM_IA_64
-
- 10 Jun, 2002 1 commit
-
-
matthewc authored
Fix nuking of warnings, and nuke another one.
-
- 09 Jun, 2002 2 commits
- 04 Jun, 2002 1 commit
-
-
sof authored
cygwin support.
-
- 01 May, 2002 1 commit
-
-
simonmar authored
Cleanup and overhaul the bogus dynamic library loading code in InteractiveUI. Bugs fixed: - when linking in extra_libraries from a package, we now search library_paths in addition to the default dlopen() paths. - the path-searching machinery for dynamic libraries specified on the command line was broken, it didn't work unless the library was found on the first path in the list.
-
- 23 Apr, 2002 1 commit
-
-
ken authored
Replace strncmp() with memcmp(), just to be safe
-
- 10 Apr, 2002 1 commit
-
-
stolz authored
Two new scheduler-API primops: 1) GHC.Conc.forkProcess/forkProcess# :: IO Int This is a low-level call to fork() to replace Posix.forkProcess(). In a Concurrent Haskell setting, only the thread invoking forkProcess() is alive in the child process. Other threads will be GC'ed! This brings the RTS closer to pthreads, where a call to fork() doesn't clone any pthreads, either. The result is 0 for the child and the child's pid for the parent. The primop will barf() when used on mingw32, sorry. 2) GHC.Conc.labelThread/forkProcess# :: String -> IO () Useful for scheduler debugging: If the RTS is compiled with DEBUGging support, this primitive assigns a name to the current thread which will be used in debugging output (+RTS -D1). For larger applications, simply numbering threads is not sufficient. Notice: The Haskell side of this call is always available, but if you are not compiling with debugging support, the actual primop will turn into a no-op.
-
- 01 Apr, 2002 1 commit
-
-
panne authored
"warning: unused variable"-police
-
- 29 Mar, 2002 1 commit
-
-
krasimir authored
Latest Win32 implementation allows dynamic loading only for *.dll libraries. This commit add checking for *.drv libraries (drivers). This allows loading of winspool.drv needed for ObjectIO
-
- 25 Mar, 2002 1 commit
-
-
sof authored
RTS_MINGW_ONLY_SYMBOLS: added rewinddir()
-
- 12 Feb, 2002 1 commit
-
-
simonmar authored
Switch over to the new hierarchical libraries --------------------------------------------- This commit reorganises our libraries to use the new hierarchical module namespace extension. The basic story is this: - fptools/libraries contains the new hierarchical libraries. Everything in here is "clean", i.e. most deprecated stuff has been removed. - fptools/libraries/base is the new base package (replacing "std") and contains roughly what was previously in std, lang, and concurrent, minus deprecated stuff. Things that are *not allowed* in libraries/base include: Addr, ForeignObj, ByteArray, MutableByteArray, _casm_, _ccall_, ``'', PrimIO For ByteArrays and MutableByteArrays we use UArray and STUArray/IOUArray respectively now. Modules previously called PrelFoo are now under fptools/libraries/GHC. eg. PrelBase is now GHC.Base. - fptools/libraries/haskell98 provides the Haskell 98 std. libraries (Char, IO, Numeric etc.) as a package. This package is enabled by default. - fptools/libraries/network is a rearranged version of the existing net package (the old package net is still available; see below). - Other packages will migrate to fptools/libraries in due course. NB. you need to checkout fptools/libraries as well as fptools/hslibs now. The nightly build scripts will need to be tweaked. - fptools/hslibs still contains (almost) the same stuff as before. Where libraries have moved into the new hierarchy, the hslibs version contains a "stub" that just re-exports the new version. The idea is that code will gradually migrate from fptools/hslibs into fptools/libraries as it gets cleaned up, and in a version or two we can remove the old packages altogether. - I've taken the opportunity to make some changes to the build system, ripping out the old hslibs Makefile stuff from mk/target.mk; the new package building Makefile code is in mk/package.mk (auto-included from mk/target.mk). The main improvement is that packages now register themselves at make boot time using ghc-pkg, and the monolithic package.conf in ghc/driver is gone. I've updated the standard packages but haven't tested win32, graphics, xlib, object-io, or OpenGL yet. The Makefiles in these packages may need some further tweaks, and they'll need pkg.conf.in files added. - Unfortunately all this rearrangement meant I had to bump the interface-file version and create a bunch of .hi-boot-6 files :-(
-
- 04 Feb, 2002 1 commit
-
-
sewardj authored
Adding section descriptions, for ELF: don't record sections satisfying size == 0 || kind `notElem` [SECTIONKIND_CODE_OR_RODATA, SECTIONKIND_RWDATA] The latter condition is really an optimisation based on knowledge of what queries will be made of the table. Still, seems to work, and reduces the number of sections in the list by about a factor of 3, so hopefully will improve GC performance in GHCi. If you get wierd GC problems in GHCi ... this may be to blame.
-
- 01 Feb, 2002 1 commit
-
-
sof authored
Add URLs and other pointers to resources on the PE COFF format.
-
- 29 Jan, 2002 2 commits
-
-
sof authored
Update comments re: reloc overflow. A careful re-read of the PE spec did prove useful; Sec 4.1 (last para) describes how overflow is handled.
-
sof authored
PEi386/COFF: handle relocation overflows, i.e., if a section is marked with the flag (MY)IMAGE_SCN_LNK_NRELOC_OVFL, then the first entry in the relocation table holds the 32-bit relocation count rather than 16-bit number in the section header. Apparently, a version of the MS PE spec exists that spells this out, but haven't been able to locate it (perhaps people on the 'inside' could try to locate an up-to-date version...?) winnt.h is clear enough about it though (as is the GNU libbfd sources). This is the Right Way to compute the relocation count, but unfortunately libbfd / GNU ld is generating bogus output when the reloc field overflows (causing objdump/nm etc. to crash when trying to read the generated output!) Looking into it. Once this has been cleared up/fixed, the splitting up of HSstd.o (and HSwin32.o) should be a thing of the past. I've taken the liberty of disabling the suspiciously-large-reloc-section test already.
-