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/pickle-util.sml
ViewVC logotype

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

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

revision 651, Thu Jun 1 18:34:03 2000 UTC revision 652, Tue Jun 6 02:14:56 2000 UTC
# Line 239  Line 239 
239          val v = thunk ()          val v = thunk ()
240          (* The larger the value of trialStart, the smaller the chance that          (* The larger the value of trialStart, the smaller the chance that
241           * the loop (see below) will run more than once.  However, some           * the loop (see below) will run more than once.  However, some
242           * space may be wasted.  2 sounds like a good compromise to me. *)           * space may be wasted.  3 should avoid this most of the time.
243          val trialStart = 2           * (Experience shows: 2 doesn't.) *)
244            val trialStart = 3
245          (* This loop is ugly, but we don't expect it to run very often.          (* This loop is ugly, but we don't expect it to run very often.
246           * It is needed because we must first write the length of the           * It is needed because we must first write the length of the
247           * encoding of the thunk's value, but that encoding depends           * encoding of the thunk's value, but that encoding depends
# Line 258  Line 259 
259                  if n = 0 then pr                  if n = 0 then pr
260                  else pad (CONCAT (null, pr), n - 1)                  else pad (CONCAT (null, pr), n - 1)
261          in          in
262              if ilen < iesz then loop (nxt + 1, ilen + 1)              if ilen < iesz then
263                    (print (concat ["%LAZY-PICKLE LOOP: sz = ", Int.toString sz,
264                                    ", iesz = ", Int.toString iesz, "\n"]);
265                     loop (nxt + 1, ilen + 1))
266              else (codes, CONCAT (pad (STRING ie, ilen - iesz), pr), state)              else (codes, CONCAT (pad (STRING ie, ilen - iesz), pr), state)
267          end          end
268      in      in

Legend:
Removed from v.651  
changed lines
  Added in v.652

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