From: rrt Date: Wed, 31 Oct 2001 17:03:12 +0000 (+0000) Subject: [project @ 2001-10-31 17:00:49 by rrt] X-Git-Tag: Approximately_9120_patches~659 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=bbaa82e5b5a0ae8937616a7b774772506b6b067e;p=ghc-hetmet.git [project @ 2001-10-31 17:00:49 by rrt] Beginnings of .NET Integer support. --- diff --git a/ghc/compiler/prelude/primops.txt.pp b/ghc/compiler/prelude/primops.txt.pp index 7d6b000..ee64b05 100644 --- a/ghc/compiler/prelude/primops.txt.pp +++ b/ghc/compiler/prelude/primops.txt.pp @@ -1,5 +1,5 @@ ----------------------------------------------------------------------- --- $Id: primops.txt.pp,v 1.8 2001/10/17 11:26:04 simonpj Exp $ +-- $Id: primops.txt.pp,v 1.9 2001/10/31 17:03:12 rrt Exp $ -- -- Primitive Operations -- @@ -351,9 +351,15 @@ section "Integer#" implemented via the GMP package. An integer is represented as a pair consisting of an Int\# representing the number of 'limbs' in use and the sign, and a ByteArr\# containing the 'limbs' themselves. Such pairs -are returned as unboxed pairs, but must be passed as separate components.} +are returned as unboxed pairs, but must be passed as separate +components. + +For .NET these operations are implemented by foreign imports, so the +primops are omitted.} ------------------------------------------------------------------------ +#ifndef ILX + primop IntegerAddOp "plusInteger#" GenPrimOp Int# -> ByteArr# -> Int# -> ByteArr# -> (# Int#, ByteArr# #) with commutable = True @@ -458,6 +464,7 @@ primop IntegerComplementOp "complementInteger#" GenPrimOp Int# -> ByteArr# -> (# Int#, ByteArr# #) with out_of_line = True +#endif /* ILX */ ------------------------------------------------------------------------ section "Double#" diff --git a/ghc/lib/std/PrelGHC.hi-boot.pp b/ghc/lib/std/PrelGHC.hi-boot.pp index d551efc..d478480 100644 --- a/ghc/lib/std/PrelGHC.hi-boot.pp +++ b/ghc/lib/std/PrelGHC.hi-boot.pp @@ -211,6 +211,9 @@ __export PrelGHC ztztzhzh decodeDoublezh +-- Integer is implemented by foreign imports on .NET, so no primops + +#ifndef ILX cmpIntegerzh cmpIntegerIntzh plusIntegerzh @@ -244,6 +247,7 @@ __export PrelGHC orIntegerzh xorIntegerzh complementIntegerzh +#endif Arrayzh ByteArrayzh