Commit 6200a0c5 authored by simonmar's avatar simonmar

[project @ 2000-03-13 12:11:43 by simonmar]

Remove unsafeThawByteArray# primop (which was a no-op), and use
unsafeCoerce# instead.
parent ce9f79c8
......@@ -157,7 +157,7 @@ data PrimOp
| IndexOffForeignObjOp PrimRep
| UnsafeFreezeArrayOp | UnsafeFreezeByteArrayOp
| UnsafeThawArrayOp | UnsafeThawByteArrayOp
| UnsafeThawArrayOp
| SizeofByteArrayOp | SizeofMutableByteArrayOp
-- Mutable variables
......@@ -512,7 +512,6 @@ tagOf_PrimOp (WriteOffAddrOp Word64Rep) = ILIT(200)
tagOf_PrimOp UnsafeFreezeArrayOp = ILIT(201)
tagOf_PrimOp UnsafeFreezeByteArrayOp = ILIT(202)
tagOf_PrimOp UnsafeThawArrayOp = ILIT(203)
tagOf_PrimOp UnsafeThawByteArrayOp = ILIT(204)
tagOf_PrimOp SizeofByteArrayOp = ILIT(205)
tagOf_PrimOp SizeofMutableByteArrayOp = ILIT(206)
tagOf_PrimOp NewMVarOp = ILIT(207)
......@@ -787,7 +786,6 @@ allThePrimOps
UnsafeFreezeArrayOp,
UnsafeFreezeByteArrayOp,
UnsafeThawArrayOp,
UnsafeThawByteArrayOp,
SizeofByteArrayOp,
SizeofMutableByteArrayOp,
NewMutVarOp,
......@@ -1380,7 +1378,6 @@ primOpInfo (WriteOffAddrOp kind)
unsafeFreezeArray# :: MutArr# s a -> State# s -> (# State# s, Array# a #)
unsafeFreezeByteArray# :: MutByteArr# s -> State# s -> (# State# s, ByteArray# #)
unsafeThawArray# :: Array# a -> State# s -> (# State# s, MutArr# s a #)
unsafeThawByteArray# :: ByteArray# -> State# s -> (# State# s, MutByteArr# s #)
-}
primOpInfo UnsafeFreezeArrayOp
......@@ -1410,15 +1407,6 @@ primOpInfo UnsafeThawArrayOp
[mkArrayPrimTy elt, state]
(unboxedPair [state, mkMutableArrayPrimTy s elt])
primOpInfo UnsafeThawByteArrayOp
= let {
s = alphaTy; s_tv = alphaTyVar;
state = mkStatePrimTy s
} in
mkGenPrimOp SLIT("unsafeThawByteArray#") [s_tv]
[byteArrayPrimTy, state]
(unboxedPair [state, mkMutableByteArrayPrimTy s])
---------------------------------------------------------------------------
primOpInfo SizeofByteArrayOp
= mkGenPrimOp
......@@ -2130,7 +2118,6 @@ primOpHasSideEffects WriteMutVarOp = True
primOpHasSideEffects UnsafeFreezeArrayOp = True
primOpHasSideEffects UnsafeFreezeByteArrayOp = True
primOpHasSideEffects UnsafeThawArrayOp = True
primOpHasSideEffects UnsafeThawByteArrayOp = True
primOpHasSideEffects TakeMVarOp = True
primOpHasSideEffects PutMVarOp = True
......
/* -----------------------------------------------------------------------------
* $Id: PrimOps.h,v 1.45 2000/01/18 12:37:33 simonmar Exp $
* $Id: PrimOps.h,v 1.46 2000/03/13 12:11:43 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -595,7 +595,6 @@ extern I_ resetGenSymZh(void);
}
#define unsafeFreezzeByteArrayzh(r,a) r=(a)
#define unsafeThawByteArrayzh(r,a) r=(a)
EF_(unsafeThawArrayzh_fast);
......
......@@ -295,7 +295,6 @@ __export PrelGHC
unsafeFreezzeByteArrayzh -- Ditto
unsafeThawArrayzh
unsafeThawByteArrayzh
sizzeofByteArrayzh -- Ditto
sizzeofMutableByteArrayzh -- Ditto
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment