summaryrefslogtreecommitdiff
path: root/ghc/interpreter
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 2001-01-17 15:23:39 by sewardj]sewardj2001-01-17432-53044/+0
| | | | Bye bye STG Hugs!
* [project @ 2000-07-10 16:15:33 by rrt]rrt2000-07-101-2/+2
| | | | | | Removed carriage returns (\r) from source files. Please don't check in such things; they can cause problems on Cygwin (funnily enough). I'm looking into how to avoid commiting carriage returns when working under Windows.
* [project @ 2000-06-28 10:42:17 by sewardj]sewardj2000-06-282-5/+21
| | | | | | | | | Partially fix signal (control-C) handling under mingw32. The interpreter can now be interrupted and successfully returns to the Hugs prompt, but only if Hugs was started from cmd.exe and not by bash (!). This is a known bogon with Cygwin, according to Sigbjorn. I still can't get Hugs to ignore other control-C's; instead it acts as if it was asked to exit. Bizarre.
* [project @ 2000-06-23 13:13:10 by sewardj]sewardj2000-06-231-9/+11
| | | | | | | | markHugsObjects() and lookupSection(): don't use debugging versions of macros module(), name(), tycon(), etc, even when debugging. Also, in lookupSection(), return immediately when not in combined mode. Together, these dramatically reduce the cost of GC in Hugs (by about a factor of 15 for nofib/real/anna).
* [project @ 2000-06-23 12:09:00 by sewardj]sewardj2000-06-231-3/+3
| | | | Minor mods to make fully-optimised builds of Hugs work again.
* [project @ 2000-06-23 09:41:11 by sewardj]sewardj2000-06-234-15/+42
| | | | | | Changes to make DietHEP.dll usable from Visual Basic: * Export DH_LoadLibrary and DH_GetProcAddress using stdcall, not ccall. * Append all messages to a logfile, diet_hep_logfile.txt, for debugging.
* [project @ 2000-06-02 16:19:47 by lewie]lewie2000-06-021-2/+23
| | | | | Class decls weren't taking functional dependencies into account when checking for ambiguous type vars. Fixed.
* [project @ 2000-05-26 17:42:18 by lewie]lewie2000-05-261-3/+4
| | | | Applied patch from hugs98 fixing type annotations in do bindings.
* [project @ 2000-05-26 12:08:30 by sewardj]sewardj2000-05-261-0/+29
| | | | Update the destructions for building Hugs on Win32, for mingw32.
* [project @ 2000-05-26 10:14:33 by sewardj]sewardj2000-05-2611-576/+200
| | | | | | | | | Changes to allow Hugs to be built with mingw32, not cygwin. Also, updates so that DietHEP works properly for mingw32. Most changes are trivial (assert --> ASSERT), etc. For hugs, have deleted queries about the width of a terminal window, and so the printing of dots as progress indicators is gone too. No great loss. Zapped various other out-of-date platform-specific junk in machdep.c.
* [project @ 2000-05-23 11:45:14 by sewardj]sewardj2000-05-231-4/+4
| | | | Fix bug in diet_hep_initialise to do with argc/argv handling.
* [project @ 2000-05-17 22:05:44 by lewie]lewie2000-05-171-5/+6
| | | | | | Defer ambiguity test for class members, so that the test is done *after* we know the (extended) functional dependencies (this is a patch that was mostly carried over from hugs98, but a few lines were out of place).
* [project @ 2000-05-12 16:03:04 by sewardj]sewardj2000-05-122-1/+7
| | | | DietHEP demo program wurble
* [project @ 2000-05-12 15:59:37 by sewardj]sewardj2000-05-124-0/+334
| | | | | Cygwin support machinery for manufacturing DietHEP.dll and building a small demo program (dh_demo.exe).
* [project @ 2000-05-12 13:49:54 by sewardj]sewardj2000-05-121-2/+2
| | | | 3rd time lucky with DIET_HEP and Cygwin. I hope.
* [project @ 2000-05-12 13:41:59 by sewardj]sewardj2000-05-122-18/+18
| | | | | Rename DietHEPpish things HMODULE, GetProcAddress, etc, since those names conflict with Windows builtins.
* [project @ 2000-05-12 13:34:06 by sewardj]sewardj2000-05-123-21/+19
| | | | Minor wurbles to make it compile on Cygwin following DietHEPpery.
* [project @ 2000-05-12 11:59:38 by sewardj]sewardj2000-05-123-74/+175
| | | | | First try at support for DietHEP. Has some unfindable bug which causes it to fail when hugs.c is compiled -O; works fine without -O.
* [project @ 2000-05-10 16:53:35 by sewardj]sewardj2000-05-101-7/+6
| | | | Reinstate the bytecode peephole optimiser.
* [project @ 2000-05-10 16:51:52 by sewardj]sewardj2000-05-101-7/+9
| | | | | findFilesForModule: search default library directories before looking at user-supplied search paths.
* [project @ 2000-05-10 09:02:25 by sewardj]sewardj2000-05-101-3/+4
| | | | | | Allow the c-t storage manager to reuse dead symbol table slots, as had always been intended, but up to now has been disabled due to ultra-paranoid debugging.
* [project @ 2000-05-10 09:00:20 by sewardj]sewardj2000-05-104-96/+11
| | | | | Zap CRUDE_PROFILING. It was there mainly to test assess the effect of the simplifier; is redundant.
* [project @ 2000-05-09 17:38:19 by andy]andy2000-05-091-3/+2
| | | | Removing the duplex #include "Storage.h"
* [project @ 2000-05-09 10:13:18 by sewardj]sewardj2000-05-091-2/+2
| | | | Add -DNO_REGS to SRC_CC_OPTS.
* [project @ 2000-05-09 10:06:06 by sewardj]sewardj2000-05-091-0/+10
| | | | Record details of the fptools/mk/build.mk required to build Hugs.
* [project @ 2000-05-09 09:11:40 by sewardj]sewardj2000-05-091-57/+11
| | | | Reorder tests in whatIs() to try for most common options first.
* [project @ 2000-04-28 13:09:19 by sewardj]sewardj2000-04-281-3/+0
| | | | Remove some debug printing.
* [project @ 2000-04-28 13:03:47 by sewardj]sewardj2000-04-281-2/+3
| | | | Handle TUPLE in substExpr().
* [project @ 2000-04-27 16:35:29 by sewardj]sewardj2000-04-2715-588/+796
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A total rewrite of the BCO assembler/linker, and rationalisation of the code management and code generation phases of Hugs. Problems with the old linker: * Didn't have a clean way to insert a pointer to GHC code into a BCO. This meant CAF GC didn't work properly in combined mode. * Leaked memory. Each BCO, caf and constructor generated by Hugs had a corresponding malloc'd record used in its construction. These records existed forever. Pointers from the Hugs symbol tables into the runtime heap always went via these intermediates, for no apparent reason. * A global variable holding a list of top-level stg trees was used during code generation. It was hard to associate trees in this list with entries in the name/tycon tables. Just too many mechanisms. The New World Order is as follows: * The global code list (stgGlobals) is gone. * Each name in the name table has a .closure field. This points to the top-level code for that name. Before bytecode generation this points to a STG tree. During bytecode generation but before bytecode linking it is a MPtr pointing to a malloc'd intermediate structure (an AsmObject). After linking, it is a real live pointer into the execution heap (CPtr) which is treated as a root during GC. Because tuples do not have name table entries, tycons which are tuples also have a .closure field, which is treated identically to those of name table entries. * Each module has a code list -- a list of names and tuples. If you are a name or tuple and you have something (code, CAF or Con) which needs to wind up in the execution heap, you MUST be on your module's code list. Otherwise you won't get code generated. * Lambda lifting generates new name table entries, which of course also wind up on the code list. * The initial phase of code generation for a module m traverses m's code list. The stg trees referenced in the .closure fields are code generated, creating AsmObject (AsmBCO, AsmCAF, AsmCon) in mallocville. The .closure fields then point to these AsmObjects. Since AsmObjects can be mutually recursive, they can contain references to: * Other AsmObjects Asm_RefObject * Existing closures Asm_RefNoOp * name/tycon table entries Asm_RefHugs AsmObjects can also contain BCO insns and non-ptr words. * A second copy-and-link phase copies the AsmObjects into the execution heap, resolves the Asm_Ref* items, and frees up the malloc'd entities. * Minor cleanups in compile-time storage. There are now 3 kinds of address-y things available: CPtr/mkCPtr/cptrOf -- ptrs to Closures, probably in exec heap ie anything which the exec GC knows about MPtr/mkMPtr/mptrOf -- ptrs to mallocville, which the exec GC knows nothing about Addr/mkAddr/addrOf -- literal addresses (like literal ints) * Many hacky cases removed from codegen.c. Referencing code or data during code generation is a lot simpler, since an entity is either: a CPtr, in which case use it as is a MPtr -- stuff it into the AsmObject and the linker will fix it a name or tycon -- ditto * I've checked, using Purify that, at least in standalone mode, no longer leaks mallocd memory. Prior to this it would leak at the rate of about 300k per Prelude. * Added this comment to the top of codegen.c. Still to do: * Reinstate peephole optimisation for BCOs. * Nuke magic number headers in AsmObjects, used for debugging. * Profile and accelerate. Code generation is slower because linking is slower. Evaluation GC is slower because markHugsObjects has slowed down. * Make setCurrentModule ignore name table entries created by the lambda-lifter. * Zap various #if 0's in codegen.c/Assembler.c. * Zap CRUDE_PROFILING.
* [project @ 2000-04-27 16:26:56 by sewardj]sewardj2000-04-271-5/+5
| | | | Add CMODE to switch conveniently between combined and standalone testing.
* [project @ 2000-04-25 17:43:49 by andy]andy2000-04-259-29/+42
| | | | | | | o Adding simple counter for number of enters o Inc version number o Adding the start of support for mdo o Wibble
* [project @ 2000-04-25 17:40:44 by andy]andy2000-04-256-2021/+0
| | | | Trying again to remove old version of prelude
* [project @ 2000-04-21 18:09:30 by panne]panne2000-04-211-2/+3
| | | | Include Weak.h to remove a warning
* [project @ 2000-04-21 18:07:46 by panne]panne2000-04-212-3/+3
| | | | | | | | | | | | | I've bitten the bullet and cleaned up the mess around Readline. There are actually questions to answer by autoconf: * Are the headers available for compilation? * Are the libraries (and which) available for linking? Note that in the second case it should be the libraries on the machine which GHC is *installed* on, not the ones on which it was compiled. GhcLibsWithReadline is now automagically set if the headers are found, but this can still be overridden.
* [project @ 2000-04-21 18:05:19 by panne]panne2000-04-212-12/+6
| | | | /tmp/msg
* [project @ 2000-04-17 13:28:17 by sewardj]sewardj2000-04-173-10/+13
| | | | | | Track recent -package changes to interfaces. Also link new symbols blockAsyncExceptionszh_fast, unblockAsyncExceptionszh_fast, takeMaybeMVarzh_fast.
* [project @ 2000-04-17 11:39:23 by sewardj]sewardj2000-04-171-13/+49
| | | | | Make :r (reload) behave more like Hugs98: try and set the current module to what it was at the last non-failing reload.
* [project @ 2000-04-14 15:18:05 by sewardj]sewardj2000-04-143-17/+39
| | | | | | Clean up the runtime heap before deleting modules (and, currently, after every evaluation) so that the combined system can safely throw away modules and info tables without creating dangling refs from the heap.
* [project @ 2000-04-14 15:11:25 by sewardj]sewardj2000-04-141-3/+4
| | | | wibble
* [project @ 2000-04-12 09:43:10 by sewardj]sewardj2000-04-122-8/+14
| | | | Cygwin wibbles.
* [project @ 2000-04-12 09:37:19 by sewardj]sewardj2000-04-122-24/+26
| | | | | More infotable cleanups: zap the debugging table of info table names. This can be cleanly done by looking at the .itbl field on Names and Tycons.
* [project @ 2000-04-11 20:44:17 by panne]panne2000-04-112-5/+5
| | | | | | | | | | | | | | | | | | Cleaning up the foreign object naming mess: * Renamed the primop from makeForeignObj# to mkForeignObj#, this is more consistent with the old Foreign.mkForeignObj. * PrelForeign now exports makeForeignObj with the new signature. * freeFile.c now uses StgAddr instead of StgForeignObj, this removes the need for some fixIOs. * Lots of import tweaking to prepare The Big Foreign Renamer, which will move most of Foreign to ForeignObj, and FFI to Foreign. Note: I've tried to track the changes in the interpreter sources, but didn't test them.
* [project @ 2000-04-11 16:49:20 by sewardj]sewardj2000-04-112-4/+7
| | | | | Fix bitrot to allow (standalone) StgHugs to be built on Solaris, so we can Purify it.
* [project @ 2000-04-11 16:36:53 by sewardj]sewardj2000-04-113-9/+44
| | | | | | | Ensure that when Hugs decides to unload a module (nukeModule()), there are no closures anywhere in the system which refers to infotables defined in that module. That means reverting all CAFs and doing a major GC prior to deleting the module. A flag is used to avoid redundant GCs.
* [project @ 2000-04-10 15:39:09 by sewardj]sewardj2000-04-102-11/+23
| | | | Load the compiled Prelude directly from its build location, ghc/lib/std.
* [project @ 2000-04-10 15:24:26 by sewardj]sewardj2000-04-101-3/+3
| | | | Update EXTERN_SYMS_linux/EXTERN_SYMS_ALLPLATFORMS to fix Win32 build.
* [project @ 2000-04-10 14:28:14 by sewardj]sewardj2000-04-101-21/+32
| | | | | Make getArgs and getProgName behave identically in combined and standalone modes.
* [project @ 2000-04-10 09:40:03 by sewardj]sewardj2000-04-103-245/+6
| | | | | Nuke USE_REGISTRY and all the code it protects. We can reinstate this stuff later if we so decide.
* [project @ 2000-04-10 02:28:08 by andy]andy2000-04-101-2/+2
| | | | | | | Removing the -DUSE_REPORT_PRELUDE for Hugs, so Hugs can use quicksort for its sorting function. Related wibbles in the libraries.
* [project @ 2000-04-07 16:25:19 by sewardj]sewardj2000-04-073-14/+45
| | | | | | | | If an object symbol is not found via the usual methods, search absolutely every object symbol table in the system before giving up on it. Motivation: searching for Arch_x86_foobar_closure generates a search for x86_foobar_closure in module Arch, whereas we really want to search for foobar_closure in module Arch_x86. Sigh.