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/compiler/FLINT/main/literals.sml
ViewVC logotype

Diff of /sml/trunk/compiler/FLINT/main/literals.sml

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

revision 733, Fri Nov 17 05:13:45 2000 UTC revision 773, Mon Jan 8 16:18:37 2001 UTC
# Line 365  Line 365 
365                 in g(exports, [])                 in g(exports, [])
366                end                end
367    
368              fun mklit (v, lit) =              fun mklit (v, lit) = let
369                (case IntHashTable.lookup m v                  fun unREAL (CPS.REAL s) = s
370                  of (ZZ_FLT _) => (* float is wrapped *)                    | unREAL _ = bug "unREAL"
371                    fun unINT32 (CPS.INT32 w) = w
372                      | unINT32 _ = bug "unINT32"
373                in
374                    case IntHashTable.lookup m v of
375                        (ZZ_FLT _) => (* float is wrapped *)
376                       bug "currently we don't expect ZZ_FLT in mklit"                       bug "currently we don't expect ZZ_FLT in mklit"
377                       (* LI_F64BLOCK([s], v, lit) *)                       (* LI_F64BLOCK([s], v, lit) *)
378                   | (ZZ_STR s) =>                   | (ZZ_STR s) =>
379                       bug "currently we don't expect ZZ_STR in mklit"                       bug "currently we don't expect ZZ_STR in mklit"
380                       (* lit   --- or we could inline string *)                       (* lit   --- or we could inline string *)
381                   | (ZZ_RCD(CPS.RK_FBLOCK, vs)) =>                   | (ZZ_RCD(CPS.RK_FBLOCK, vs)) =>
382                       LI_F64BLOCK(map (fn (CPS.REAL s) => s) vs, v, lit)                      LI_F64BLOCK(map unREAL vs, v, lit)
383                   | (ZZ_RCD(CPS.RK_I32BLOCK, vs)) =>                   | (ZZ_RCD(CPS.RK_I32BLOCK, vs)) =>
384                       LI_I32BLOCK(map (fn (CPS.INT32 w) => w) vs, v, lit)                     LI_I32BLOCK(map unINT32 vs, v, lit)
385                   | (ZZ_RCD(rk, vs)) =>                   | (ZZ_RCD(rk, vs)) =>
386                       LI_BLOCK(rk2bk rk, map val2lit vs, v, lit))                       LI_BLOCK(rk2bk rk, map val2lit vs, v, lit)
387                end
388    
389              (** build up the literal structure *)              (** build up the literal structure *)
390              val lit = foldl mklit toplit allvars              val lit = foldl mklit toplit allvars
# Line 457  Line 463 
463             | PURE (p, ul, v, t, e) =>             | PURE (p, ul, v, t, e) =>
464                 let val (nl, hh) = lpvs ul                 let val (nl, hh) = lpvs ul
465                  in hh(PURE(p, nl, v, t, loop e))                  in hh(PURE(p, nl, v, t, loop e))
466                   end
467               | RCC (p, ul, v, t, e) =>
468                   let val (nl, hh) = lpvs ul
469                    in hh(RCC(p, nl, v, t, loop e))
470                 end)                 end)
471    
472        val newbody = loop body        val newbody = loop body

Legend:
Removed from v.733  
changed lines
  Added in v.773

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