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

Diff of /sml/branches/arith64/compiler/FLINT/main/literals.sml

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

revision 4873, Thu Oct 4 21:39:53 2018 UTC revision 4874, Fri Oct 5 14:33:11 2018 UTC
# Line 360  Line 360 
360                          fn ce => hdr(RECORD(rk, nl, v, ce))                          fn ce => hdr(RECORD(rk, nl, v, ce))
361                        end)                        end)
362          (* register a wrapped float literal *)          (* register a wrapped float literal *)
363            fun wrapfloat (u, v, t) = if const u            fun wrapfloat (sz, u, v, t) = if const u
364                  then (enter(v, ZZ_RCD(RK_FBLOCK, [u])); Fn.id)                  then (enter(v, ZZ_RCD(RK_FBLOCK, [u])); Fn.id)
365                  else let val (nu, hh) = lpsv u                  else let val (nu, hh) = lpsv u
366                        in (fn ce => hh(PURE(P.fwrap, [nu], v, t, ce)))                        in (fn ce => hh(PURE(P.wrap(P.FLOAT sz), [nu], v, t, ce)))
367                       end                       end
368          (* fetch out the literal information *)          (* fetch out the literal information *)
369            fun getInfo () = let            fun getInfo () = let
# Line 474  Line 474 
474                     let val (nl, hh) = lpvs ul                     let val (nl, hh) = lpvs ul
475                      in hh(ARITH(p, nl, v, t, loop e))                      in hh(ARITH(p, nl, v, t, loop e))
476                     end                     end
477                 | PURE (P.fwrap, [u], v, t, e) => wrapfloat (u, v, t) (loop e)  (* QUESTION: should there be a case for `P.WRAP(P.INT _)` here? *)
478                   | PURE (P.wrap(P.FLOAT sz), [u], v, t, e) => wrapfloat (sz, u, v, t) (loop e)
479                 | PURE (p, ul, v, t, e) =>                 | PURE (p, ul, v, t, e) =>
480                     let val (nl, hh) = lpvs ul                     let val (nl, hh) = lpvs ul
481                      in hh(PURE(p, nl, v, t, loop e))                      in hh(PURE(p, nl, v, t, loop e))

Legend:
Removed from v.4873  
changed lines
  Added in v.4874

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