From: rrt Date: Fri, 13 Jul 2001 11:39:48 +0000 (+0000) Subject: [project @ 2001-07-13 11:39:48 by rrt] X-Git-Tag: Approximately_9120_patches~1565 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6cd9b27216b5f13e37afffc0ab84da0532506ad1;p=ghc-hetmet.git [project @ 2001-07-13 11:39:48 by rrt] Make eqForeignObj a primop; N.B. Not implemented for the NCG --- diff --git a/ghc/compiler/prelude/primops.txt b/ghc/compiler/prelude/primops.txt index 4722f5b..58ee3e1 100644 --- a/ghc/compiler/prelude/primops.txt +++ b/ghc/compiler/prelude/primops.txt @@ -1,5 +1,5 @@ ----------------------------------------------------------------------- --- $Id: primops.txt,v 1.20 2001/05/04 14:43:49 simonmar Exp $ +-- $Id: primops.txt,v 1.21 2001/07/13 11:39:48 rrt Exp $ -- -- Primitive Operations -- @@ -739,6 +739,10 @@ primop IndexOffAddrOp_Word64 "indexWord64OffAddr#" GenPrimOp Addr# -> Int# -> Word64# +primop EqForeignObj "eqForeignObj#" GenPrimOp + ForeignObj# -> ForeignObj# -> Bool + with commutable = True + primop IndexOffForeignObjOp_Char "indexCharOffForeignObj#" GenPrimOp ForeignObj# -> Int# -> Char# @@ -1296,10 +1300,7 @@ primop ParAtForNowOp "parAtForNow#" GenPrimOp usage = { mangle ParAtForNowOp [mkO, mkZ, mkP, mkP, mkP, mkP, mkM] mkM } has_side_effects = True --- copyable# and noFollow# have no corresponding entry in --- PrelGHC.hi-boot, so I don't know whether they should still --- be here or not. JRS, 15 Jan 01 --- not implemented; please, keep the comment as reminder -- HWL 12/3/01 +-- copyable# and noFollow# are yet to be implemented (for GpH) -- --primop CopyableOp "copyable#" GenPrimOp -- a -> Int# diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h index f49253a..e648ef0 100644 --- a/ghc/includes/PrimOps.h +++ b/ghc/includes/PrimOps.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.h,v 1.76 2001/03/22 03:51:09 hwloidl Exp $ + * $Id: PrimOps.h,v 1.77 2001/07/13 11:39:48 rrt Exp $ * * (c) The GHC Team, 1998-2000 * @@ -912,8 +912,7 @@ EXTFUN_RTS(mkForeignObjzh_fast); #define writeForeignObjzh(res,datum) \ (ForeignObj_CLOSURE_DATA(res) = (P_)(datum)) -#define eqForeignObj(f1,f2) ((f1)==(f2)) - +#define eqForeignObjzh(f1,f2) ((f1)==(f2)) #define indexCharOffForeignObjzh(r,fo,i) indexCharOffAddrzh(r,ForeignObj_CLOSURE_DATA(fo),i) #define indexWideCharOffForeignObjzh(r,fo,i) indexWideCharOffAddrzh(r,ForeignObj_CLOSURE_DATA(fo),i) #define indexIntOffForeignObjzh(r,fo,i) indexIntOffAddrzh(r,ForeignObj_CLOSURE_DATA(fo),i) diff --git a/ghc/lib/std/PrelGHC.hi-boot b/ghc/lib/std/PrelGHC.hi-boot index b829d31..ace6e25 100644 --- a/ghc/lib/std/PrelGHC.hi-boot +++ b/ghc/lib/std/PrelGHC.hi-boot @@ -336,6 +336,7 @@ __export PrelGHC writeWord32OffAddrzh writeWord64OffAddrzh + eqForeignObjzh indexCharOffForeignObjzh indexWideCharOffForeignObjzh indexIntOffForeignObjzh