| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Merge backend-hacking-branch onto HEAD. Yay!
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tidy up a couple of unportable coding issues:
- conditionally use empty structs.
- use GNU attributes only if supported.
- 'long long' usage
- use of 'inline' in declarations and definitions.
Upshot of these changes is that MSVC is now capable of compiling
the non-.hc portions of the RTS.
|
|
|
|
|
|
| |
Include a static version of deRefStablePtr in case the code that uses
it was compiled without optimisation (and therefore doesn't get the
inlined version).
|
|
|
|
|
| |
Global and common variable sweep: staticize many variables that don't
need to be globally visible.
|
|
|
|
|
|
| |
Outline freeStablePtr, so NCG-generated code actually has something to call :)
Also remove the presumably-defunct splitStablePtr.
|
|
|
|
| |
Add multi-slurp protection
|
|
|
|
|
|
|
|
|
|
|
| |
Turn the weighted reference count in a StablePtr into a simple counter
in the stable ptr table. We never made use of the weighted count, and
it caused problems when making many StablePtrs to the same object.
In the future we could remove the reference counting altogether and
just make a new StablePtr each time, rather than attempting to use an
existing one. This would save on the hash table lookup at creation
time.
|
|
|
|
|
| |
getStablePtr() is a useful function outside of the RTS, so move it to
the non-private section.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a compacting garbage collector.
It isn't enabled by default, as there are still a couple of problems:
there's a fallback case I haven't implemented yet which means it will
occasionally bomb out, and speed-wise it's quite a bit slower than the
copying collector (about 1.8x slower).
Until I can make it go faster, it'll only be useful when you're
actually running low on real memory.
'+RTS -c' to enable it.
Oh, and I cleaned up a few things in the RTS while I was there, and
fixed one or two possibly real bugs in the existing GC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean ups:
- reduce the namespace pollution of StgTypes.h, it doesn't define
the shorthand versions any more (W_, I_ etc.). These are moved into
Stg.h. StgTypes.h also defines StgClosure as an "opaque" struct.
- RtsAPI.h is now standalone, and includes HsFFI.h and thereby
config.h & StgTypes.h. Now we don't need to #include "Stg.h" in
*_stub.c.
- all the rts_mkXXXX and rts_getXXXX functions are defined in terms
of the HsXXXX types rather than random C types (this fixes some
potential bugs in our foreign export support).
- added HsWord type, to match StgWord. The Haskell version of this
type isn't "documented", but perhaps it should be.
|
|
|
|
|
| |
Fix a bug in freeStablePtr, the weight being subtracted from the entry
in the stable pointer table was wrong.
|
|
|
|
| |
StgStablePtr is now void*, as required by The Happy Bit Fiddlers
|
|
|
|
|
| |
- misc changes to support DLLs
- StgNat* --> StgWord*
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix stable pointer bug:
- the 'keep' flag is now a pointer to the stable name object.
- makeStableName always returns an existing stable name object
if one exists.
- re-use stable name table entries iff the stable name object
becomes unreachable (takes into account generational GC now),
and the reference count is 0.
|
|
|
|
| |
Copyright police.
|
|
add missing file.
|