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-3/compiler/FLINT/kernel/ltybasic.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-3/compiler/FLINT/kernel/ltybasic.sml

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

revision 251, Mon Apr 19 02:55:26 1999 UTC revision 422, Sun Sep 5 22:49:38 1999 UTC
# Line 271  Line 271 
271   ***************************************************************************)   ***************************************************************************)
272    
273  (** utility values and functions on ltyEnv *)  (** utility values and functions on ltyEnv *)
274  type ltyEnv = (lty * DebIndex.depth) IntmapF.intmap  type ltyEnv = (lty * DebIndex.depth) IntBinaryMap.map
275    
276  exception ltUnbound  exception ltUnbound
277  val initLtyEnv : ltyEnv = IntmapF.empty  val initLtyEnv : ltyEnv = IntBinaryMap.empty
278    
279  fun ltLookup (venv, lv, nd) =  fun ltLookup (venv, lv, nd) =
280    let val (lt, d) = (IntmapF.lookup venv lv) handle _ =>    (case IntBinaryMap.find(venv, lv)
281         of NONE  =>
282                          (say "**** hmmm, I didn't find the variable ";                          (say "**** hmmm, I didn't find the variable ";
283                           say (Int.toString lv); say "\n";                           say (Int.toString lv); say "\n";
284                           raise ltUnbound)                           raise ltUnbound)
285     in if d=nd then lt        | SOME (lt, d) =>
286              if d=nd then lt
287        else if d > nd then bug "unexpected depth info in ltLookup"        else if d > nd then bug "unexpected depth info in ltLookup"
288             else ltc_env(lt, 0, nd - d, LK.initTycEnv)             else ltc_env(lt, 0, nd - d, LK.initTycEnv)
289    end    (*easc*))
290    
291  fun ltInsert (venv, lv, lt, d) = IntmapF.add(venv, lv, (lt, d))  fun ltInsert (venv, lv, lt, d) = IntBinaryMap.insert(venv, lv, (lt, d))
292    
293  end (* top-level local *)  end (* top-level local *)
294  end (* structure LtyBasic *)  end (* structure LtyBasic *)

Legend:
Removed from v.251  
changed lines
  Added in v.422

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