| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Bye bye STG Hugs!
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Minor mods to make fully-optimised builds of Hugs work again.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Class decls weren't taking functional dependencies into account when
checking for ambiguous type vars. Fixed.
|
|
|
|
| |
Applied patch from hugs98 fixing type annotations in do bindings.
|
|
|
|
| |
Update the destructions for building Hugs on Win32, for mingw32.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fix bug in diet_hep_initialise to do with argc/argv handling.
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
DietHEP demo program wurble
|
|
|
|
|
| |
Cygwin support machinery for manufacturing DietHEP.dll and building a
small demo program (dh_demo.exe).
|
|
|
|
| |
3rd time lucky with DIET_HEP and Cygwin. I hope.
|
|
|
|
|
| |
Rename DietHEPpish things HMODULE, GetProcAddress, etc, since those
names conflict with Windows builtins.
|
|
|
|
| |
Minor wurbles to make it compile on Cygwin following DietHEPpery.
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reinstate the bytecode peephole optimiser.
|
|
|
|
|
| |
findFilesForModule: search default library directories before looking
at user-supplied search paths.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Zap CRUDE_PROFILING. It was there mainly to test assess the effect of
the simplifier; is redundant.
|
|
|
|
| |
Removing the duplex #include "Storage.h"
|
|
|
|
| |
Add -DNO_REGS to SRC_CC_OPTS.
|
|
|
|
| |
Record details of the fptools/mk/build.mk required to build Hugs.
|
|
|
|
| |
Reorder tests in whatIs() to try for most common options first.
|
|
|
|
| |
Remove some debug printing.
|
|
|
|
| |
Handle TUPLE in substExpr().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Add CMODE to switch conveniently between combined and standalone testing.
|
|
|
|
|
|
|
| |
o Adding simple counter for number of enters
o Inc version number
o Adding the start of support for mdo
o Wibble
|
|
|
|
| |
Trying again to remove old version of prelude
|
|
|
|
| |
Include Weak.h to remove a warning
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
/tmp/msg
|
|
|
|
|
|
| |
Track recent -package changes to interfaces. Also link new symbols
blockAsyncExceptionszh_fast, unblockAsyncExceptionszh_fast,
takeMaybeMVarzh_fast.
|
|
|
|
|
| |
Make :r (reload) behave more like Hugs98: try and set the current module
to what it was at the last non-failing reload.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
wibble
|
|
|
|
| |
Cygwin wibbles.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Fix bitrot to allow (standalone) StgHugs to be built on Solaris, so we
can Purify it.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Load the compiled Prelude directly from its build location, ghc/lib/std.
|
|
|
|
| |
Update EXTERN_SYMS_linux/EXTERN_SYMS_ALLPLATFORMS to fix Win32 build.
|
|
|
|
|
| |
Make getArgs and getProgName behave identically in combined and standalone
modes.
|
|
|
|
|
| |
Nuke USE_REGISTRY and all the code it protects. We can reinstate this
stuff later if we so decide.
|
|
|
|
|
|
|
| |
Removing the -DUSE_REPORT_PRELUDE for Hugs, so Hugs can use quicksort for
its sorting function.
Related wibbles in the libraries.
|
|
|
|
|
|
|
|
| |
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.
|