Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/ml-nlffi-lib/internals/c-int.sml
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffi-lib/internals/c-int.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1035, Thu Jan 24 19:07:18 2002 UTC revision 1036, Fri Jan 25 22:05:44 2002 UTC
# Line 36  Line 36 
36           *     1.......1 0.......0 1.......1    = im           *     1.......1 0.......0 1.......1    = im
37           *           *
38           * l + r = lr *)           * l + r = lr *)
39          type cword = MLRep.UInt.word          type cword = MLRep.Unsigned.word
40          type bf = { a: addr, l: word, r: word, lr: word, m: cword, im: cword }          type bf = { a: addr, l: word, r: word, lr: word, m: cword, im: cword }
41    
42          fun pair_type_addr (t: objt) (a: addr) = (a, t)          fun pair_type_addr (t: objt) (a: addr) = (a, t)
# Line 51  Line 51 
51          val op ++ = CMemory.++          val op ++ = CMemory.++
52    
53          infix << >> ~>> && || ^^          infix << >> ~>> && || ^^
54          val op << = MLRep.UInt.<<          val op << = MLRep.Unsigned.<<
55          val op >> = MLRep.UInt.>>          val op >> = MLRep.Unsigned.>>
56          val op ~>> = MLRep.UInt.~>>          val op ~>> = MLRep.Unsigned.~>>
57          val op && = MLRep.UInt.andb          val op && = MLRep.Unsigned.andb
58          val op || = MLRep.UInt.orb          val op || = MLRep.Unsigned.orb
59          val op ^^ = MLRep.UInt.xorb          val op ^^ = MLRep.Unsigned.xorb
60          val ~~ = MLRep.UInt.notb          val ~~ = MLRep.Unsigned.notb
61      in      in
62    
63      type ('t, 'c) obj = addr * objt     (* RTTI for stored value *)      type ('t, 'c) obj = addr * objt     (* RTTI for stored value *)
# Line 77  Line 77 
77      type voidptr = addr      type voidptr = addr
78      type 'tag su = unit      type 'tag su = unit
79    
80      type schar = MLRep.SChar.int      type schar = MLRep.Signed.int
81      type uchar = MLRep.UChar.word      type uchar = MLRep.Unsigned.word
82      type sint = MLRep.SInt.int      type sint = MLRep.Signed.int
83      type uint = MLRep.UInt.word      type uint = MLRep.Unsigned.word
84      type sshort = MLRep.SShort.int      type sshort = MLRep.Signed.int
85      type ushort = MLRep.UShort.word      type ushort = MLRep.Unsigned.word
86      type slong = MLRep.SLong.int      type slong = MLRep.Signed.int
87      type ulong = MLRep.ULong.word      type ulong = MLRep.Unsigned.word
88      type float = MLRep.Float.real      type float = MLRep.Real.real
89      type double = MLRep.Double.real      type double = MLRep.Real.real
90    
91      type 'c schar_obj = (schar, 'c) obj      type 'c schar_obj = (schar, 'c) obj
92      type 'c uchar_obj = (uchar, 'c) obj      type 'c uchar_obj = (uchar, 'c) obj
# Line 310  Line 310 
310            | fptr _ = bug "Get.fptr (non-function-pointer)"            | fptr _ = bug "Get.fptr (non-function-pointer)"
311    
312          local          local
313              val u2s = MLRep.SInt.fromLarge o MLRep.UInt.toLargeIntX              val u2s = MLRep.Signed.fromLarge o MLRep.Unsigned.toLargeIntX
314          in          in
315              fun ubf ({ a, l, r, lr, m, im } : bf) =              fun ubf ({ a, l, r, lr, m, im } : bf) =
316                  (CMemory.load_uint a << l) >> lr                  (CMemory.load_uint a << l) >> lr
# Line 363  Line 363 
363                                     ((x << r) && m))                                     ((x << r) && m))
364    
365          local          local
366              val s2u = MLRep.UInt.fromLargeInt o MLRep.SInt.toLarge              val s2u = MLRep.Unsigned.fromLargeInt o MLRep.Signed.toLarge
367          in          in
368              fun sbf (f, x) = ubf (f, s2u x)              fun sbf (f, x) = ubf (f, s2u x)
369          end          end

Legend:
Removed from v.1035  
changed lines
  Added in v.1036

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0