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/trans/translate.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/trans/translate.sml

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

revision 774, Wed Jan 10 12:50:56 2001 UTC revision 879, Thu Jul 19 18:59:38 2001 UTC
# Line 6  Line 6 
6    
7    (* Invariant: transDec always applies to a top-level absyn declaration *)    (* Invariant: transDec always applies to a top-level absyn declaration *)
8    val transDec : Absyn.dec * Access.lvar list    val transDec : Absyn.dec * Access.lvar list
9                   * StaticEnv.staticEnv * CompBasic.compInfo                   * StaticEnv.staticEnv * CompInfo.compInfo
10                   -> {flint: FLINT.prog,                   -> {flint: FLINT.prog,
11                       imports: (PersStamps.persstamp                       imports: (PersStamps.persstamp
12                                 * CompBasic.importTree) list}                                 * ImportTree.importTree) list}
13    
14  end (* signature TRANSLATE *)  end (* signature TRANSLATE *)
15    
# Line 21  Line 21 
21        structure DA = Access        structure DA = Access
22        structure DI = DebIndex        structure DI = DebIndex
23        structure EM = ErrorMsg        structure EM = ErrorMsg
       structure CB = CompBasic  
24        structure II = InlInfo        structure II = InlInfo
25        structure LT = PLambdaType        structure LT = PLambdaType
26        structure M  = Modules        structure M  = Modules
# Line 95  Line 94 
94   *                 * StaticEnv.staticEnv * CompBasic.compInfo               *   *                 * StaticEnv.staticEnv * CompBasic.compInfo               *
95   *                 -> {flint: FLINT.prog,                                   *   *                 -> {flint: FLINT.prog,                                   *
96   *                     imports: (PersStamps.persstamp                       *   *                     imports: (PersStamps.persstamp                       *
97   *                               * CompBasic.importTree) list}              *   *                               * ImportTree.importTree) list}             *
98   ****************************************************************************)   ****************************************************************************)
99    
100  fun transDec (rootdec, exportLvars, env,  fun transDec (rootdec, exportLvars, env,
101                compInfo as {errorMatch,error,...}: CB.compInfo) =                compInfo as {errorMatch,error,...}: CompInfo.compInfo) =
102  let  let
103    
104  (** generate the set of ML-to-FLINT type translation functions *)  (** generate the set of ML-to-FLINT type translation functions *)
# Line 1112  Line 1111 
1111  fun wrapPidInfo (body, pidinfos) =  fun wrapPidInfo (body, pidinfos) =
1112    let val imports =    let val imports =
1113          let fun p2itree (ANON xl) =          let fun p2itree (ANON xl) =
1114                    CB.ITNODE (map (fn (i,z) => (i, p2itree z)) xl)                    ImportTree.ITNODE (map (fn (i,z) => (i, p2itree z)) xl)
1115                | p2itree (NAMED _) = CB.ITNODE []                | p2itree (NAMED _) = ImportTree.ITNODE []
1116           in map (fn (p, pi) => (p, p2itree pi)) pidinfos           in map (fn (p, pi) => (p, p2itree pi)) pidinfos
1117          end          end
1118  (*  (*
1119        val _ = let val _ = say "\n ****************** \n"        val _ = let val _ = say "\n ****************** \n"
1120                    val _ = say "\n the current import tree is :\n"                    val _ = say "\n the current import tree is :\n"
1121                    fun tree (CB.ITNODE []) = ["\n"]                    fun tree (ImportTree.ITNODE []) = ["\n"]
1122                      | tree (CB.ITNODE xl) =                      | tree (ImportTree.ITNODE xl) =
1123                          foldr (fn ((i, x), z) =>                          foldr (fn ((i, x), z) =>
1124                            let val ts = tree x                            let val ts = tree x
1125                                val u = (Int.toString i)  ^ "   "                                val u = (Int.toString i)  ^ "   "

Legend:
Removed from v.774  
changed lines
  Added in v.879

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