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/compiler/MiscUtil/library/unpickle-util.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/MiscUtil/library/unpickle-util.sml

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

revision 568, Tue Mar 7 03:59:09 2000 UTC revision 569, Tue Mar 7 04:01:07 2000 UTC
# Line 208  Line 208 
208                | _ => raise Format                | _ => raise Format
209    
210          fun f_largeint cvt rd () = let          fun f_largeint cvt rd () = let
211              val (w, negative) = f_anyint rd ()              val (wpos, negative) = f_anyint rd ()
212              val i = LargeWord.toLargeInt w handle _ => raise Format              (* The negation must be done in word domain to prevent
213                 * overflow on minInt. For the same reason we must then
214                 * use toIntX. *)
215                val w = if negative then 0w0 - wpos else wpos
216                val i = LargeWord.toLargeIntX w
217          in          in
218              (if negative then cvt (~i) else cvt i)              cvt i handle _ => raise Format
             handle _ => raise Format  
219          end          end
220      in      in
221          val f_int = f_largeint Int.fromLarge          val f_int = f_largeint Int.fromLarge

Legend:
Removed from v.568  
changed lines
  Added in v.569

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