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/FLINT/plambda/flintnm.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/plambda/flintnm.sml

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

revision 160, Mon Oct 12 03:31:38 1998 UTC revision 161, Mon Oct 12 03:40:02 1998 UTC
# Line 1  Line 1 
1  (* COPYRIGHT (c) 1997 YALE FLINT PROJECT *)  (* COPYRIGHT (c) 1997 YALE FLINT PROJECT *)
2  (* flintnm.sml *)  (* monnier@cs.yale.edu *)
3    
4  (* Converting the Standard PLambda.lexp into the FLINT IL *)  (* Converting the Standard PLambda.lexp into the FLINT IL *)
5  signature FLINTNM =  signature FLINTNM =
# Line 12  Line 12 
12    
13  local structure LT = PLambdaType  local structure LT = PLambdaType
14        structure FL = PFlatten           (* argument flattening *)        structure FL = PFlatten           (* argument flattening *)
       structure LV = LambdaVar  
15        structure DI = DebIndex        structure DI = DebIndex
16        structure PT = PrimTyc        structure PT = PrimTyc
17        structure PO = PrimOp        structure PO = PrimOp
# Line 25  Line 24 
24    
25  val say = Control.Print.say  val say = Control.Print.say
26  val mkv = LambdaVar.mkLvar  val mkv = LambdaVar.mkLvar
27    val cplv = LambdaVar.dupLvar
28  val ident = fn le : L.lexp => le  val ident = fn le : L.lexp => le
29    
30  val (iadd_prim, uadd_prim) =  val (iadd_prim, uadd_prim) =
# Line 177  Line 177 
177                  (* then translate each function in turn *)                  (* then translate each function in turn *)
178                  val funs = map (fn ((f_lv,f_lty),L.FN(arg_lv,arg_lty,body)) =>                  val funs = map (fn ((f_lv,f_lty),L.FN(arg_lv,arg_lty,body)) =>
179                                  #1(tofundec(venv', d,                                  #1(tofundec(venv', d,
180                                              f_lv, arg_lv, arg_lty, body, true)))                                              f_lv, arg_lv, arg_lty, body, true))
181                                     | _ => bug "non-function in L.FIX")
182                                 (ListPair.zip(ListPair.zip(lvs,ltys),lexps))                                 (ListPair.zip(ListPair.zip(lvs,ltys),lexps))
183    
184                  (* finally, translate the lexp *)                  (* finally, translate the lexp *)
# Line 565  Line 566 
566  fun norm (lexp as L.FN(arg_lv,arg_lty,e)) =  fun norm (lexp as L.FN(arg_lv,arg_lty,e)) =
567      (#1(tofundec(LT.initLtyEnv, DI.top, mkv(), arg_lv, arg_lty, e, false))      (#1(tofundec(LT.initLtyEnv, DI.top, mkv(), arg_lv, arg_lty, e, false))
568      handle x => raise x)      handle x => raise x)
569  (*   | norm _ = bug "unexpected toplevel lexp" *)    | norm _ = bug "unexpected toplevel lexp"
570    
571  end (* toplevel local *)  end (* toplevel local *)
572  end (* structure FlintNM *)  end (* structure FlintNM *)

Legend:
Removed from v.160  
changed lines
  Added in v.161

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