summaryrefslogtreecommitdiff
path: root/compiler/prelude/primops.txt.pp
Commit message (Collapse)AuthorAgeFilesLines
* Define a quotRem CallishMachOp; fixes #5598Ian Lynagh2012-02-141-0/+5
| | | | | This means we no longer do a division twice when we are using quotRem (on platforms on which the op is supported; currently only amd64).
* Comments onlySimon Peyton Jones2012-01-131-1/+4
|
* Add comments about the meaning of can_fail and has_side_effectsSimon Peyton Jones2011-12-121-2/+3
| | | | Taken from Trac #5658
* Add new primtypes 'ArrayArray#' and 'MutableArrayArray#'Manuel M T Chakravarty2011-12-071-2/+109
| | | | | | | | The primitive array types, such as 'ByteArray#', have kind #, but are represented by pointers. They are boxed, but unpointed types (i.e., they cannot be 'undefined'). The two categories of array types —[Mutable]Array# and [Mutable]ByteArray#— are containers for unboxed (and unpointed) as well as for boxed and pointed types. So far, we lacked support for containers for boxed, unpointed types (i.e., containers for the primitive arrays themselves). This is what the new primtypes provide. Containers for boxed, unpointed types are crucial for the efficient implementation of scattered nested arrays, which are central to the new DPH backend library dph-lifted-vseg. Without such containers, we cannot eliminate all unboxing from the inner loops of traversals processing scattered nested arrays.
* Fix #5658: mark all array indexing primops as can_failBen Lippmeier2011-12-061-3/+109
| | | | If they're not marked as can_fail, then they are floated out of case expressions that check whether the indices are in-bounds, causing immense suffering.
* Further tweaks to the ccs primopsSimon Marlow2011-11-301-8/+10
| | | | | | | | | - add getCCSOf# :: a -> State# s -> (# State# s, Addr# #) (returns the CCS attached to the supplied object) - remove traceCcs# (obsoleted by getCCSOf#) - rename getCCCS# to getCurrentCCS#
* Add a new primop: getCCCS# :: State# s -> (# State# s, Addr# #)Simon Marlow2011-11-291-0/+3
| | | | | Returns a pointer to the current cost-centre stack when profiling, NULL otherwise.
* Better documentation for AnyKJose Pedro Magalhaes2011-11-161-8/+17
|
* New kind-polymorphic coreJose Pedro Magalhaes2011-11-111-3/+6
| | | | | | | | | This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds
* Follow changes to HValue/Any handlingIan Lynagh2011-10-031-1/+1
| | | | | Also removed the type argument to Any in primops.txt.pp. I don't see why we need it, and it now breaks haddocking GHC.Prim.
* Handle HValues slightly nicerIan Lynagh2011-10-031-4/+4
| | | | | | We now have addrToAny# rather than addrToHValue#, and both addrToAny# and mkApUpd0# return "Any" rather than "a". This makes it a little easier to see what's going on, and fixes a warning in ByteCodeLink.
* fix 32-bit build breakageSimon Marlow2011-08-191-6/+1
|
* Add popCnt# primopJohan Tibell2011-08-161-3/+16
|
* Add two new primops:Simon Marlow2011-06-281-0/+15
| | | | | | | | | | | | | seq# :: a -> State# s -> (# State# s, a #) spark# :: a -> State# s -> (# State# s, a #) seq# is a version of seq that can be used in a State#-passing context. We will use it to implement Control.Exception.evaluate and thus fix #5129. Also we have plans to use it to fix #5262. spark# is to seq# as par is to pseq. That is, it creates a spark in a State#-passing context. We will use spark# and seq# to implement rpar and rseq respectively in an improved implementation of the Eval monad.
* Add byte array copy primopsJohan Tibell2011-06-161-0/+17
| | | | Signed-off-by: David Terei <davidterei@gmail.com>
* Assign more accurate code sizes to primops, so that the inliningSimon Marlow2011-05-241-38/+74
| | | | | heuristics work better. Also removed the old unused "needs_wrapper" predicate for primops. This helps with #4978.
* Make array copy primops inlineJohan Tibell2011-05-191-6/+0
|
* Add array copy/clone primopsDaniel Peebles2011-05-191-0/+49
|
* primops.txt.pp: add missing type application in description of GHC.Prim.AnyAdam Megacz2011-04-281-2/+12
| | | | | | | | | Understanding GHC.Prim.Any is all about understanding the need for explicit type applications in CoreSyn; the previous example had one explicit type application but was missing the other, which this patch adds. It also expands the explanation, based on SPJ's post here: http://article.gmane.org/gmane.comp.lang.haskell.cvs.ghc/46551
* add casMutVar#Simon Marlow2011-04-111-0/+6
|
* GHC.Prim.threadStatus# now returns the cap number, and the value of TSO_LOCKEDSimon Marlow2011-03-011-1/+1
|
* Add sizeof(Mutable)Array# primitivesDaniel Peebles2011-01-261-0/+8
|
* tweak newArray# documentation againSimon Marlow2011-01-191-1/+1
|
* Fix documentation bug: newArray# accepts word count, not byte count.Edward Z. Yang2011-01-181-1/+1
|
* Add strictness for raiseIO# primopsimonpj@microsoft.com2010-10-271-0/+4
|
* Documentation for INLINABLEsimonpj@microsoft.com2010-09-151-5/+3
|
* add numSparks# primop (#4167)Simon Marlow2010-07-201-0/+7
|
* New asynchronous exception control API (ghc parts)Simon Marlow2010-07-081-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | As discussed on the libraries/haskell-cafe mailing lists http://www.haskell.org/pipermail/libraries/2010-April/013420.html This is a replacement for block/unblock in the asychronous exceptions API to fix a problem whereby a function could unblock asynchronous exceptions even if called within a blocked context. The new terminology is "mask" rather than "block" (to avoid confusion due to overloaded meanings of the latter). In GHC, we changed the names of some primops: blockAsyncExceptions# -> maskAsyncExceptions# unblockAsyncExceptions# -> unmaskAsyncExceptions# asyncExceptionsBlocked# -> getMaskingState# and added one new primop: maskUninterruptible# See the accompanying patch to libraries/base for the API changes.
* remove out of date comments; point to the wikiSimon Marlow2010-06-251-19/+8
|
* Refix docs for sizeofByteArray#/sizeofMutableByteArray# (#3800)Ian Lynagh2010-06-201-6/+4
|
* Fix docs for sizeofByteArray#/sizeofMutableByteArray# (#3800)Simon Marlow2010-01-191-9/+13
| | | | | In 6.14.1 we'll switch these primops to return the exact byte size, but for 6.12.2 we need to fix the docs.
* Add a way to generate tracing events programmaticallySimon Marlow2009-09-251-0/+10
| | | | | | | | | | | | | | added: primop TraceEventOp "traceEvent#" GenPrimOp Addr# -> State# s -> State# s { Emits an event via the RTS tracing framework. The contents of the event is the zero-terminated byte string passed as the first argument. The event will be emitted either to the .eventlog file, or to stderr, depending on the runtime RTS flags. } and added the required RTS functionality to support it. Also a bit of refactoring in the RTS tracing code.
* Remove the gmp/Integer primops from the compilerDuncan Coutts2009-06-131-154/+1
| | | | The implementations are still in the rts.
* Remove the unused remains of __decodeFloatIan Lynagh2009-06-021-8/+1
|
* Fix #3207: add has_side_effects = True for lots of primopsSimon Marlow2009-05-151-5/+61
| | | | and document primOpHasSideEffects
* Partial fix for #2917Simon Marlow2009-03-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | - add newAlignedPinnedByteArray# for allocating pinned BAs with arbitrary alignment - the old newPinnedByteArray# now aligns to 16 bytes Foreign.alloca will use newAlignedPinnedByteArray#, and so might end up wasting less space than before (we used to align to 8 by default). Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte aligned memory, which is enough to avoid problems with SSE instructions on x86, for example. There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes, but would have failed if the header was not a multiple of 8 (fortunately it always was, even with profiling). Also we occasionally wasted some space unnecessarily due to alignment in allocatePinned(). I haven't done anything about Foreign.malloc/mallocBytes, which will give you the same alignment guarantees as malloc() (8 bytes on Linux/x86 here).
* Implement #2191 (traceCcs# -- prints CCS of a value when available -- take 3)Samuel Bronson2009-01-271-0/+11
| | | | | | In this version, I untag R1 before using it, and even enter R2 at the end rather than simply returning it (which didn't work right when R2 was a thunk).
* FIX #1364: added support for C finalizers that run as soon as the value is ↵Simon Marlow2008-12-101-0/+6
| | | | | | | | | | | not longer reachable. Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by Simon Marlow: - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv# - GC parameters to ALLOC_PRIM fixed
* Run sparks in batches, instead of creating a new thread for each oneSimon Marlow2008-11-061-0/+6
| | | | | Signficantly reduces the overhead for par, which means that we can make use of paralellism at a much finer granularity.
* add readTVarIO :: TVar a -> IO aSimon Marlow2008-10-101-0/+7
|
* add threadStatus# primop, for querying the status of a ThreadId#Simon Marlow2008-07-101-0/+5
|
* add new primop: asyncExceptionsBlocked# :: IO BoolSimon Marlow2008-07-091-0/+5
|
* Fix some inconsistencies in the code and docs of primitivesIan Lynagh2008-06-231-99/+99
| | | | | | We were inconsistent about whether to use the name "MutArr#" or "MutableArray#". Likewise ByteArr#/ByteArray# and MutByteArr#/MutableByteArray#.
* Fix conversions between Double/Float and simple-integerIan Lynagh2008-06-141-3/+4
|
* clarify that unsafeCoerce# :: Float# -> Int# is not safe (see #2209)Simon Marlow2008-05-271-0/+1
|
* Add clarifying comments about unsafeCoercesimonpj@microsoft.com2008-04-211-1/+8
|
* Add some more generic (en|de)code(Double|Float) codeIan Lynagh2008-04-171-0/+13
|
* Fix warnings from primops.txt.ppIan Lynagh2008-03-291-2/+2
|
* document float2Int# and double2Int#Simon Marlow2007-09-251-0/+7
|
* Fixed TeX syntaxsven.panne@aedion.de2007-09-011-1/+1
|