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/MiscUtil/profile/tprof.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/MiscUtil/profile/tprof.sml

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

revision 586, Thu Mar 30 05:08:07 2000 UTC revision 587, Thu Mar 30 09:01:52 2000 UTC
# Line 74  Line 74 
74      end      end
75    
76  fun varexp(v as VALvar{typ=ref ty,path,...}) =  fun varexp(v as VALvar{typ=ref ty,path,...}) =
77      case TypesUtil.headReduceType ty      (case TypesUtil.headReduceType ty
78        of POLYty _ =>        of POLYty _ =>
79             bug ("poly["^SP.toString path^"] in Prof")             bug ("poly["^SP.toString path^"] in Prof")
80         | ty' => VARexp(ref v, []) (* VARexp(ref v, SOME ty') *)         | ty' => VARexp(ref v, [])) (* VARexp(ref v, SOME ty') *)
81      | varexp _ = bug "090924 in prof"
82    
83  fun clean (path as name::names) = if S.eq(name,anonSym) then names else path  fun clean (path as name::names) = if S.eq(name,anonSym) then names else path
84    | clean x = x    | clean x = x
# Line 92  Line 93 
93       val currentvar = tmpvar("profCurrent",CONty(refTycon,[intTy]), mkv)       val currentvar = tmpvar("profCurrent",CONty(refTycon,[intTy]), mkv)
94       val currentexp = varexp currentvar       val currentexp = varexp currentvar
95    
96       val V.VAL register = Lookup.lookVal       val register =
97             case Lookup.lookVal
98           (coreEnv,           (coreEnv,
99            SP.SPATH [S.strSymbol "Core",            SP.SPATH [S.strSymbol "Core",
100                           S.varSymbol "profile_register"],                           S.varSymbol "profile_register"],
101            fn _ => fn s => fn _ => bug "222 in prof")                     fn _ => fn s => fn _ => bug "222 in prof") of
102                 V.VAL r => r
103       local val VALvar{typ=ref ty,...} = register             | _ => bug "09824 in prof"
104             val CONty(reff,[ty']) = TypesUtil.headReduceType ty  
105        in val profDerefTy = ty'       local
106             val ty = case register of
107                          VALvar { typ = ref ty, ... } => ty
108                        | _ => bug "298374 in prof"
109         in
110             val profDerefTy =
111                 case TypesUtil.headReduceType ty of
112                     CONty (_, [ty']) => ty'
113                   | _ => bug "298342 in prof"
114       end       end
115    
116       val entries = ref (nil: string list)       val entries = ref (nil: string list)
# Line 306  Line 316 
316                             val ccvara' = makeEntry(name)                             val ccvara' = makeEntry(name)
317                             val lvar = tmpvar("fnvar",t,mkv);                             val lvar = tmpvar("fnvar",t,mkv);
318    
319                             val V.CON exnMatch = Lookup.lookVal                             val exnMatch =
320                                    (coreEnv, SP.SPATH [S.strSymbol "Core",                                 case Lookup.lookVal
321                                            (coreEnv,
322                                             SP.SPATH [S.strSymbol "Core",
323                                                        S.varSymbol "Match"],                                                        S.varSymbol "Match"],
324                                     fn _ => fn s => fn _ =>                                     fn _ => fn s => fn _ =>
325                                             bug "250 in prof")                                             bug "250 in prof")
326                                    of V.CON e => e
327                                     | _ => bug "no CON for exnMatch"
328    
329                             val RULE(_,special) = List.last l                             val RULE(_,special) = List.last l
330                          in FNexp ([RULE(VARpat(lvar),                          in FNexp ([RULE(VARpat(lvar),

Legend:
Removed from v.586  
changed lines
  Added in v.587

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