| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
GHC bits for new library organisation.
|
| |
|
|
| |
import wibble for hugs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change provided by Alastair Reid is a bunch of wibbles which fix
some severe performance problems in the copy of the Pretty library
distributed with Hugs-Sept99.
The problems show up when making heavy use of hsep (eg printing large
numbers of comma separated lists which tend to run over the end of
line). The problems manifest themselves as the infamous "control
stack overflow" and seem to be due to the generation of large
Int thunks that look something like this:
80 - 4 - 1 - 1 - 3 - 1 - ... -1
(There may be a few +'s in there too but -'s predominate.)
|
| |
|
|
|
|
|
|
| |
Adding Int8,16,32,64 into Hugs.
These changes are based on the current (Sep99 Hugs) version of Word.
The GHC parts should be unchanged.
|
| |
|
|
| |
Modifing these libs so that they also work with StgHugs.
|
| |
|
|
|
|
|
|
| |
Adding Word8,16,32,64 into Hugs.
These changes are based on the current (Sep99 Hugs) version of Word.
The GHC parts should be unchanged.
|
| |
|
|
| |
Fix bug in instance Dynamic (Either a b)
|
| |
|
|
| |
attach version info
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding a axiomatic testing framework library to help test Hugs and GHC
libraries.
Here is the example for the test of concat.
test_concat = testRules "concat" [
do (xss :: [[ALPHA]]) <- var "xss"
concat xss <==> foldr (++) [] xss
]
xss here ranges over various rendering of list of list,
including bottom and lists containing bottom.
<==> uses a small piece of compiler/interpreter specifics to
allow testing for
error "" ... <==> ... error "" ===> Pass
|
| |
|
|
|
| |
Added the {index,read,write}{PrimTy}OffForeignObj ops to Foreign's
export list + upd. the docs on same a little.
|
| |
|
|
| |
Incorporate some fixes for Hugs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build System Cleanup
--------------------
This commit is intended to clear the way for automatic RPM building.
In particular, the idea is that 'make install' doesn't build anything,
so you can do
make install prefix=/some/tmp/prefix
to install everything in /some/tmp/prefix, but leave the hardwired-in
install directories the same.
For scripts that depend on the install dir (currently just the GHC
driver and mkdependHS), we now build two versions: <script>-inplace,
which is used for running the script from the build tree, and
<script>, which is the to-be-installed version.
NOTE: binary distributions are now a little bit trickier to build.
You *must* include the line "BIN_DIST=1" in your build.mk if you
intend to make a binary distribution from the current build tree.
This is because certain scripts have to be built differently, and we
don't rebuild them when doing 'make binary-dist' anymore (since 'make
binary-dist' just does a 'make install' with a re-targetted prefix,
just like the RPM builder).
Other changes
- the binary-dist machinery is now all in fptools/Makefile
- removed a gratuitous $(package)-$(version) level of
directories from the binary distribution.
- binary distributions are now placed under the package
name, rather than fptools/fptools.
- various other minor cleanups.
|
| |
|
|
|
|
| |
Flatten out the tuple of bounds in the Array, MutableArray and
ByteArray datatypes. This improves performance of heavy array
manipulations quite significantly.
|
| |
|
|
| |
Addr is now a _casm_ free zone + added indexStablePtrOffAddr
|
| |
|
|
| |
v1.2 of Show Addr instance, pad out to fixed length
|
| |
|
|
|
| |
Moved Show instance for Addr from PrelAddr to Addr & made it display
the Addr in hex (+ have it cope with ptrs with MSB set.)
|
| |
|
|
| |
Added 'updateIORef :: IORef a -> (a->a) -> IO ()'
|
| |
|
|
| |
exts/ is now also a _ccall_ free zone.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Re-exported IO.HandlePosn, i.e.,
type HandlePosition = Integer
data HandlePosn = HandlePosn Handle HandlePosition
* Added hTell :: Handle -> HandlePosition
(merely a wrapper for IO.hGetPosn )
* Added hSetBinaryMode :: Handle -> Bool -> IO Bool
for dynamically changing the 'translation mode' of a Handle.
This stuff is only useful on platforms that make a distinction
between text and binary files (e.g., Win32)
|
| |
|
|
| |
DLL building tweaks, including terrible hack to compile PrelMain
|
| |
|
|
|
| |
Export toInt and fromInt from Int as well as from the (now uncool) rag-bag
that is GlaExts, since Hugs supports them too.
|
| |
|
|
|
|
|
|
|
|
|
| |
Experimental support for re-routeing I/O on a Handle to that of another
for the duration of an IO action. Used to provide the following three
(exported) actions
withStdin, withStdout, withStderr :: Handle -> IO a -> IO a
which 'replaces' one of the standard handles with that of the supplied
handle while performing the second action.
|
| |
|
|
| |
Adjust library imports to get fromInt/toInt from PrelNum
|
| |
|
|
| |
Moved Pretty from misc/ to exts/
|
| |
|
|
|
|
|
|
|
|
| |
add unofficial/undocumented function:
mkWeakIORef :: IORef a -> IO () -> IO (Weak (IORef a))
for weak pointers to IORefs. This avoids some of the problems with
inlining disturbing the semantics of mkWeak by making the weak key
point to the primitive MutVar instead of the box.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All Simon's recent tuning changes. Rough summary follows:
* Fix Kevin Atkinson's cant-find-instance bug. Turns out that Rename.slurpSourceRefs
needs to repeatedly call getImportedInstDecls, and then go back to slurping
source-refs. Comments with Rename.slurpSourceRefs.
* Add a case to Simplify.mkDupableAlt for the quite-common case where there's
a very simple alternative, in which case there's no point in creating a
join-point binding.
* Fix CoreUtils.exprOkForSpeculation so that it returns True of (==# a# b#).
This lack meant that
case ==# a# b# of { True -> x; False -> x }
was not simplifying
* Make float-out dump bindings at the top of a function argument, as
at the top of a let(rec) rhs. See notes with FloatOut.floatRhs
* Make the ArgOf case of mkDupableAlt generate a OneShot lambda.
This gave a noticeable boost to spectral/boyer2
* Reduce the number of coerces, using worker/wrapper stuff.
The main idea is in WwLib.mkWWcoerce. The gloss is that we must do
the w/w split even for small non-recursive things. See notes with
WorkWrap.tryWw.
* This further complicated getWorkerId, so I finally bit the bullet and
make the workerInfo field of the IdInfo work properly, including
under substitutions. Death to getWorkerId. Kevin Glynn will be happy.
* Make all lambdas over realWorldStatePrimTy
into one-shot lambdas. This is a GROSS HACK.
* Also make the occurrence analyser aware of one-shot lambdas.
* Make various Prelude things into INLINE, so that foldr doesn't
get inlined in their body, so that the caller gets the benefit
of fusion. Notably in PrelArr.lhs.
|
| |
|
|
| |
../compiler/msg_prel
|
| |
|
|
| |
Remove some comments left in by mistake.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(this is number 9 of 9 commits to be applied together)
Usage verification changes / ticky-ticky changes:
We want to verify that SingleEntry thunks are indeed entered at most
once. In order to do this, -ticky / -DTICKY_TICKY turns on eager
blackholing. We blackhole with new blackholes: SE_BLACKHOLE and
SE_CAF_BLACKHOLE. We will enter one of these if we attempt to enter
a SingleEntry thunk twice. Note that CAFs are dealt with in by
codeGen, and ordinary thunks by the RTS.
We also want to see how many times we enter each Updatable thunk.
To this end, we have modified -ticky. When -ticky is on, we update
with a permanent indirection, and arrange that when we enter a
permanent indirection we count the entry and then convert the
indirection to a normal indirection. This gives us a means of
counting the number of thunks entered again after the first entry.
Obviously this screws up profiling, and so you can't build a ticky
and profiling compiler any more.
Also a few other changes that didn't make it into the previous 8
commits, but form a part of this set.
|
| |
|
|
| |
DLL config added
|
| |
|
|
| |
Added Haskell wrapper for freeHaskellFunctionPtr()
|
| |
|
|
|
| |
Generalised the {read,write}{Int,Word}{8,16,32,64}Array operations
to ST, plus the arrays are indexed using Ix.
|
| |
|
|
| |
re-export PrelGHC.assert
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improvements to the threading model.
- asynchronous exceptions supported.
- killThread# can now raise an exception in the specified
thread. It's new type is
killThread# :: ThreadId# -> Exception -> IO ()
High-level versions:
killThread :: ThreadId -> IO ()
raiseInThread :: ThreadId -> Exception -> IO ()
(killThread raises a 'ThreadKilled' exception in the
specified thread).
If the thread has no exception handler, it is killed
as before. Otherwise, the exception is passed to
the innermost CATCH_FRAME and the thread is woken up
if it was blocked. The current computation is
suspended, instead of being replaced by the exception
(as is the case with throw).
Sending an exception to the current thread works too.
- new primitive: myThreadId# :: IO ThreadId# and corresponding
high-level version myThreadId :: IO ThreadId.
- new primitive: yield# :: IO (), and yield :: IO ().
- the TSO now contains a pointer to the resource currently blocked
on (MVAR or BLACKHOLE_BQ).
- Add a giant comment to TSO.h about what the various link fields
are supposed to do, and invariants etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support for unsafely thawing your (Byte)Arrays, i.e., added the
following ops:
MutableArray.unsafeThawArray :: Ix ix => Array ix elt -> ST s (MutableArray s ix elt)
MutableArray.unsafeThawByteArray :: Ix ix => ByteArray ix -> ST s (MutableByteArray s ix)
MutableArray.thawByteArray :: Ix ix => ByteArray ix -> ST s (MutableByteArray s ix)
ST.unsafeThawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt)
LazyST.unsafeThawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt)
IOExts.unsafeFreezeIOArray :: Ix ix => IOArray ix elt -> IO (Array ix elt)
IOExts.unsafeThawIOArray :: Ix ix => Array ix elt -> IO (IOArray ix elt)
+ removed the re-exportation of Monad that ST and LazyST did.
|
| |
|
|
| |
StgNat* --> StgWord*
|
| |
|
|
|
|
|
|
|
|
| |
Reinstate old signature for 'makeForeignObj', i.e.
makeForeignObj :: Addr -> Addr -> IO ForeignObj
combining the primitive 'makeForeignObj' and addForeignFinalizer(+).
The primitive ForeignObj constructor is now exported as 'mkForeignObj'
|
| |
|
|
|
|
|
|
| |
Added:
writeStablePtrOffAddr :: Addr -> Int -> StablePtr a -> IO ()
readStablePtrOffAddr :: Addr -> Int -> IO (StablePtr a)
writeForeignObjOffAddr :: Addr -> Int -> ForeignObj -> IO ()
|
| |
|
|
| |
- added showListWith, non-overloaded version of showList.
|
| |
|
|
| |
Integer fixes.
|
| |
|
|
| |
Couple of Integer fixes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fast Integers. The rep. of Integers is now
data Integer = S# Int#
| J# Int# ByteArray#
- several new primops added for overflow-detecting arithmetic
- negateInteger# removed; it can be done directly
- integer_0, integer_1 etc. removed.
- the compiler now uses S# where it previously used int2Integer.
- the compiler generates small integers for -2^32 .. 2^32-1, instead
of -2^29 .. -2^29-1.
- PrelST.State datatype moved to LazyST (its only use).
- some library code (in Time.lhs) still needs cleaning up, it depends
on the Integer rep.
|
| |
|
|
| |
More weak pointer changes.
|
| |
|
|
| |
sigh, too hasty with dropping -monly-3-regs on Int and Word
|
| |
|
|
|
| |
- Add Weak.finalise
- Move some functions from PrelWeak to Weak.
|
| |
|
|
| |
- fixed Enum.fromEnumTo{Word32} to comply with H98 once again.
|
| |
|
|
|
|
|
|
| |
- renamed boundsOfByteArray to boundsOfMutableByteArray.
(partly for consistency, partly to create a new Top 10 entry on
the list of long function names exported from lib/.)
- moved sizeofByteArray over to ByteArray
|
| |
|
|
|
|
|
|
|
|
| |
- Added:
newByteArray :: Ix ix => (ix,ix) -> ST s (ByteArray ix)
boundsOfByteArray :: Ix ix => ByteArray ix -> (ix,ix)
sizeofByteArray :: Ix ix => ByteArray ix -> Int
plus defined Eq over ByteArrays.
|
| |
|
|
|
|
| |
- Add finalise#
- Add mkWeakNoFinaliser
- Move deRefWeak# from an out-of-line primop to an inline one.
|
| |
|
|
| |
Remove unnecessary imports
|