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/kernel/ltyextern.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/kernel/ltyextern.sml

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

revision 198, Sun Nov 22 02:11:29 1998 UTC revision 199, Wed Nov 25 18:30:38 1998 UTC
# Line 793  Line 793 
793            | GREATER => intersect(s1, t2)            | GREATER => intersect(s1, t2)
794            | EQUAL => (h1,n) :: intersect(t1, t2)            | EQUAL => (h1,n) :: intersect(t1, t2)
795    
796  val s_iter = Stats.makeStat "Cvt Iterations"  (* val s_iter = Stats.makeStat "Cvt Iterations" *)
797  val s_hits = Stats.makeStat "Cvt Hits in dict"  (* val s_hits = Stats.makeStat "Cvt Hits in dict" *)
798  val s_cuts = Stats.makeStat "Cvt Freevar cutoffs"  (* val s_cuts = Stats.makeStat "Cvt Freevar cutoffs" *)
799    
800  val s_tvoffs = Stats.makeStat "Cvt tvoffs length"  (* val s_tvoffs = Stats.makeStat "Cvt tvoffs length" *)
801  val s_nvars = Stats.makeStat "Cvt free nvars length"  (* val s_nvars = Stats.makeStat "Cvt free nvars length" *)
802    
803  fun tc_nvar_cvt_gen() = let  fun tc_nvar_cvt_gen() = let
804      val dict = ref (TcDict.mkDict())      val dict = ref (TcDict.mkDict())
805    
806      fun tc_nvar_cvt (tvoffs:tvoffs) d tyc =      fun tc_nvar_cvt (tvoffs:tvoffs) d tyc =
807          (Stats.addStat s_iter 1;          ((* Stats.addStat s_iter 1; *)
808           Stats.addStat s_tvoffs (length tvoffs);           (* Stats.addStat s_tvoffs (length tvoffs); *)
809           Stats.addStat s_nvars (length (LK.tc_nvars tyc));           (* Stats.addStat s_nvars (length (LK.tc_nvars tyc)); *)
810          (* check if substitution overlaps with free vars list *)          (* check if substitution overlaps with free vars list *)
811          case intersect(tvoffs, LK.tc_nvars tyc) of          case intersect(tvoffs, LK.tc_nvars tyc) of
812              [] => (Stats.addStat s_cuts 1;              [] => ((* Stats.addStat s_cuts 1; *)
813                     tyc           (* nothing to cvt *)                     tyc           (* nothing to cvt *)
814                     )                     )
815            | tvoffs =>            | tvoffs =>
# Line 819  Line 819 
819          val tycdepth = tcc_proj (tyc, d)          val tycdepth = tcc_proj (tyc, d)
820      in      in
821          case TcDict.peek(!dict, tycdepth) of          case TcDict.peek(!dict, tycdepth) of
822              SOME t => (Stats.addStat s_hits 1;              SOME t => ((* Stats.addStat s_hits 1; *)
823                         t                 (* hit! *)                         t                 (* hit! *)
824                         )                         )
825            | NONE => let                 (* must recompute *)            | NONE => let                 (* must recompute *)

Legend:
Removed from v.198  
changed lines
  Added in v.199

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