CVS: sml-dist/src/system/Basis/Implementation num-scan.sml, 1.4.8.1, 1.4.8.2 word32.sml, 1.6, 1.6.4.1
George Kuan <[email protected]> Thu, 07 Sep 2006 13:57:37 -0700
| Newsgroups | gmane.comp.lang.sml.smlnj.commits |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/smlnj/sml-dist/src/system/Basis/Implementation
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26118/src/system/Basis/Implementation
Modified Files:
Tag: primop-branch-2
num-scan.sml word32.sml
Log Message:
fixed built-in.sml Word32.toLargeIntX (needed type annotation), num-scan.sml compiles
Index: num-scan.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/system/Basis/Implementation/num-scan.sml,v
retrieving revision 1.4.8.1
retrieving revision 1.4.8.2
diff -C2 -d -r1.4.8.1 -r1.4.8.2
*** num-scan.sml 5 Sep 2006 17:59:51 -0000 1.4.8.1
--- num-scan.sml 7 Sep 2006 20:57:35 -0000 1.4.8.2
***************
*** 9,22 ****
structure NumScan : sig
!
! (* val scanWord : StringCvt.radix
-> (char, 'a) StringCvt.reader -> (Word32.word, 'a) StringCvt.reader
val scanInt : StringCvt.radix
-> (char, 'a) StringCvt.reader -> (Int32.int, 'a) StringCvt.reader
! val scanReal : (char, 'a) StringCvt.reader -> (real, 'a) StringCvt.reader *)
(** should be to LargeReal.real **)
!
end = struct
! (*
structure W = InlineT.Word32
structure I = InlineT.Int31
--- 9,23 ----
structure NumScan : sig
!
! val scanWord : StringCvt.radix
-> (char, 'a) StringCvt.reader -> (Word32.word, 'a) StringCvt.reader
val scanInt : StringCvt.radix
-> (char, 'a) StringCvt.reader -> (Int32.int, 'a) StringCvt.reader
! val scanReal : (char, 'a) StringCvt.reader -> (real, 'a) StringCvt.reader
(** should be to LargeReal.real **)
!
end = struct
! (* val z = InlineT.Word32.toLargeIntX *)
!
structure W = InlineT.Word32
structure I = InlineT.Int31
***************
*** 29,34 ****
val op + = W.+
val op - = W.-
! val op * = W.* *)
! (*
val largestWordDiv10 : word = 0w429496729 (* 2^32-1 divided by 10 *)
val largestWordMod10 : word = 0w5 (* remainder *)
--- 30,35 ----
val op + = W.+
val op - = W.-
! val op * = W.*
!
val largestWordDiv10 : word = 0w429496729 (* 2^32-1 divided by 10 *)
val largestWordMod10 : word = 0w5 (* remainder *)
***************
*** 37,41 ****
val largestPosInt32 : word = 0wx7fffffff
val minInt32 : Int32.int = ~2147483648
! *)
(* A table for mapping digits to values. Whitespace characters map to
* 128, "+" maps to 129, "-","~" map to 130, "." maps to 131, and the
--- 38,42 ----
val largestPosInt32 : word = 0wx7fffffff
val minInt32 : Int32.int = ~2147483648
!
(* A table for mapping digits to values. Whitespace characters map to
* 128, "+" maps to 129, "-","~" map to 130, "." maps to 131, and the
***************
*** 43,47 ****
* characters map to 255.
*)
! (*
local
val cvtTable = "\
--- 44,48 ----
* characters map to 255.
*)
!
local
val cvtTable = "\
***************
*** 269,277 ****
| scanWord StringCvt.DEC = finalWord scanDec
| scanWord StringCvt.HEX = finalWord scanHex
! *)
local
! val fromword32 = InlineT.Int32.fromLarge o InlineT.Word32.toLargeIntX
in
! (*
fun finalInt scanFn getc cs = (case (scanFn false getc cs)
of NONE => NONE
--- 270,282 ----
| scanWord StringCvt.DEC = finalWord scanDec
| scanWord StringCvt.HEX = finalWord scanHex
!
local
! (* Type check Bug test case
! fun test x = InlineT.Int32.fromLarge (InlineT.Word32.toLargeIntX x)
! *)
!
! val fromword32 = InlineT.Int32.fromLarge o InlineT.Word32.toLargeIntX
in
!
fun finalInt scanFn getc cs = (case (scanFn false getc cs)
of NONE => NONE
***************
*** 289,295 ****
SOME(fromword32 word, rest)
(* end case *))
! *)
end (* end local *)
! (*
fun scanInt StringCvt.BIN = finalInt scanBin
| scanInt StringCvt.OCT = finalInt scanOct
--- 294,300 ----
SOME(fromword32 word, rest)
(* end case *))
!
end (* end local *)
!
fun scanInt StringCvt.BIN = finalInt scanBin
| scanInt StringCvt.OCT = finalInt scanOct
***************
*** 423,428 ****
(* end case *))
! end
! *)
end;
--- 428,433 ----
(* end case *))
! end
!
end;
Index: word32.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/system/Basis/Implementation/word32.sml,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -C2 -d -r1.6 -r1.6.4.1
*** word32.sml 11 Nov 2004 06:15:33 -0000 1.6
--- word32.sml 7 Sep 2006 20:57:35 -0000 1.6.4.1
***************
*** 17,23 ****
val fromLargeWord : LargeWord.word -> word = W32.fromLargeWord
! val toLargeInt = W32.toLargeInt
! val toLargeIntX = W32.toLargeIntX
! val fromLargeInt = W32.fromLargeInt
val toInt : word -> int = W32.toInt
--- 17,23 ----
val fromLargeWord : LargeWord.word -> word = W32.fromLargeWord
! val toLargeInt : word -> LargeInt.int = W32.toLargeInt
! val toLargeIntX : word -> LargeInt.int = W32.toLargeIntX
! val fromLargeInt : LargeInt.int -> word = W32.fromLargeInt
val toInt : word -> int = W32.toInt
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642