[project @ 2000-12-11 15:26:00 by sewardj]
[ghc-hetmet.git] / ghc / compiler / prelude / primops.txt
index 5eff2f5..63c6141 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------
--- $Id: primops.txt,v 1.5 2000/09/26 16:45:34 simonpj Exp $
+-- $Id: primops.txt,v 1.8 2000/12/11 12:56:14 simonmar Exp $
 --
 -- Primitive Operations
 --
@@ -51,6 +51,13 @@ primop   IndexOffClosureOp_Ptr  "indexPtrOffClosure#"  GenPrimOp
 primop   IndexOffClosureOp_Word "indexWordOffClosure#"  GenPrimOp
    a -> Int# -> Word#
 
+primop   SetOffClosureOp_Ptr  "setPtrOffClosure#"  GenPrimOp
+   a -> Int# -> b -> (# a #)
+   with strictness = { \ arity -> StrictnessInfo [wwStrict, wwPrim, wwLazy] False }
+
+primop   SetOffClosureOp_Word "setWordOffClosure#"  GenPrimOp
+   a -> Int# -> Word# -> (# a #)
+   with strictness = { \ arity -> StrictnessInfo [wwStrict, wwPrim, wwPrim] False }
 
 ------------------------------------------------------------------------
 --- Addr#                                                            ---
@@ -422,6 +429,22 @@ primop   IntegerToInt64Op   "integerToInt64#" GenPrimOp
 primop   IntegerToWord64Op   "integerToWord64#" GenPrimOp
    Int# -> ByteArr# -> Word64#
 
+primop   IntegerAndOp  "andInteger#" GenPrimOp
+   Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
+   with out_of_line = True
+
+primop   IntegerOrOp  "orInteger#" GenPrimOp
+   Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
+   with out_of_line = True
+
+primop   IntegerXorOp  "xorInteger#" GenPrimOp
+   Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #)
+   with out_of_line = True
+
+primop   IntegerComplementOp  "complementInteger#" GenPrimOp
+   Int# -> ByteArr# -> (# Int#, ByteArr# #)
+   with out_of_line = True
+
 ------------------------------------------------------------------------
 --- Word#                                                            ---
 ------------------------------------------------------------------------
@@ -975,49 +998,13 @@ primop TouchOp "touch#" GenPrimOp
 ------------------------------------------------------------------------
 
 primop  NewBCOOp "newBCO#" GenPrimOp
-   Int# -> Int# -> Int# -> a -> State# RealWorld -> (# State# RealWorld, BCO# #)
+   ByteArr# -> ByteArr# -> MutArr# s a -> State# s -> (# State# s, BCO# #)
    with
    has_side_effects = True
    out_of_line      = True
-   strictness       = { \ arity -> StrictnessInfo 
-                                   [wwPrim, wwPrim, wwPrim, wwLazy, wwPrim] False }
-   usage            = { mangle NewBCOOp [mkP, mkP, mkP, mkM, mkP] mkR }
-
-primop  WriteBCOPtrOp "writeBCOPtr#" GenPrimOp
-   BCO# -> Int# -> o -> State# RealWorld -> State# RealWorld
-   with
-   usage            = { mangle WriteBCOPtrOp [mkP, mkP, mkM, mkP] mkR }
-   strictness       = { \ arity -> StrictnessInfo 
-                                   [wwPrim, wwPrim, wwLazy, wwPrim] False }
-   has_side_effects = True
-
-primop  WriteBCONonPtrOp "writeBCONonPtr#" GenPrimOp
-   BCO# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
-   with
-   has_side_effects = True
-
-primop  WriteBCOInstrOp "writeBCOInstr#" GenPrimOp
-   BCO# -> Int# -> Word# -> State# RealWorld -> State# RealWorld
-   with
-   has_side_effects = True
-
-primop  ReadBCOPtrOp "readBCOPtr#"  GenPrimOp
-   BCO# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
-   with
-   usage = { mangle ReadBCOPtrOp [mkP, mkP] mkM }
-
-primop  ReadBCONonPtrOp "readBCONonPtr#"  GenPrimOp
-   BCO# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
-
-primop  ReadBCOInstrOp "readBCOInstr#" GenPrimOp
-   BCO# -> Int# -> State# RealWorld -> (# State# RealWorld, Word# #)
-
-primop  SameBCOOp "sameBCO#" GenPrimOp
-   BCO# -> BCO# -> Bool
-   with
-   -- is this usage right?
-   usage = { mangle SameMutableArrayOp [mkP, mkP] mkM }
 
+primop  GetBCOPtrsOp "getBCOPtrs#" GenPrimOp
+   BCO# -> State# s -> (# State# s, MutArr# s a #)
 
 ------------------------------------------------------------------------
 --- Weak pointers                                                    ---