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/primop-branch/src/compiler/FLINT/trans/translate.sml
ViewVC logotype

Diff of /sml/branches/primop-branch/src/compiler/FLINT/trans/translate.sml

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

revision 1475, Fri Apr 9 19:05:33 2004 UTC revision 1476, Fri Apr 16 20:51:46 2004 UTC
# Line 1  Line 1 
1  (* COPYRIGHT (c) 1996 Bell Laboratories *)  (* COPYRIGHT (c) 1996 Bell Laboratories *)
2  (* translate.sml *)  (* translate.sml *)
3    
4    (* PRIMOP:
5     * mkVE and mkCE now take instantiated type as second argument rather than
6     *  instantiation lists
7     *)
8    
9  signature TRANSLATE =  signature TRANSLATE =
10  sig  sig
11    
# Line 1122  Line 1127 
1127    
1128        and g (VARexp (ref v, ty)) = mkVE(v, ty, d)        and g (VARexp (ref v, ty)) = mkVE(v, ty, d)
1129    
1130          | g (CONexp (dc, ts)) = mkCE(dc, ts, NONE, d)          | g (CONexp (dc, ty)) = mkCE(dc, ty, NONE, d)
1131          | g (APPexp (CONexp(dc, ts), e2)) = mkCE(dc, ts, SOME(g e2), d)          | g (APPexp (CONexp(dc, ty), e2)) = mkCE(dc, ty, SOME(g e2), d)
1132    
1133          | g (INTexp (s, t)) =          | g (INTexp (s, t)) =
1134               ((if TU.equalType (t, BT.intTy) then INT (LN.int s)               ((if TU.equalType (t, BT.intTy) then INT (LN.int s)
# Line 1254  Line 1259 
1259       * no indication within the program that we are really       * no indication within the program that we are really
1260       * dealing with a constant value that -- in principle --       * dealing with a constant value that -- in principle --
1261       * could be subject to such things as constant folding. *)       * could be subject to such things as constant folding. *)
1262      let val consexp = CONexp (BT.consDcon, [BT.wordTy])      let val consexp = CONexp (BT.consDcon, [BT.wordTy])   (* PRIMOP unfinished *)
1263          fun build [] = CONexp (BT.nilDcon, [BT.wordTy])          fun build [] = CONexp (BT.nilDcon, [BT.wordTy])   (* PRIMOP unfinished *)
1264            | build (d :: ds) = let            | build (d :: ds) = let
1265                  val i = Word.toIntX d                  val i = Word.toIntX d
1266              in              in

Legend:
Removed from v.1475  
changed lines
  Added in v.1476

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