CVS: sml-dist/src/compiler/DebugProf/profile tdp-instrument.sml, 1.4, 1.4.6.1 tprof.sml, 1.5, 1.5.4.1

George Kuan <[email protected]> Tue, 20 Jun 2006 10:09:21 -0700
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/src/compiler/DebugProf/profile
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32115/DebugProf/profile

Modified Files:
      Tag: primop-branch-2
	tdp-instrument.sml tprof.sml 
Log Message:
DebugProf updated to new VARexp, CONexp, CONpat absyn ty option

Index: tdp-instrument.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/DebugProf/profile/tdp-instrument.sml,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -C2 -d -r1.4 -r1.4.6.1
*** tdp-instrument.sml	15 Oct 2004 21:49:14 -0000	1.4
--- tdp-instrument.sml	20 Jun 2006 17:09:18 -0000	1.4.6.1
***************
*** 121,125 ****
  	val tdp_module_var = tmpvar ("<tdp_module>", BT.intTy)
  
! 	fun VARexp v = A.VARexp (ref v, [])
  	fun INTexp i = A.INTexp (IntInf.fromInt i, BT.intTy)
  
--- 121,125 ----
  	val tdp_module_var = tmpvar ("<tdp_module>", BT.intTy)
  
! 	fun VARexp v = A.VARexp (ref v, NONE)
  	fun INTexp i = A.INTexp (IntInf.fromInt i, BT.intTy)
  
***************
*** 253,262 ****
  			     val t = Reconstruct.expType lst
  			 in
! 			     A.RAISEexp (A.CONexp (matchcon, []), t)
  			 end
  	    in
  		A.FNexp ([A.RULE (A.VARpat arg,
  				  A.SEQexp [enterexp,
! 					    A.CASEexp (A.VARexp (ref arg, []),
  						       rl', true)]),
  			  A.RULE (A.WILDpat, re)],
--- 253,262 ----
  			     val t = Reconstruct.expType lst
  			 in
! 			     A.RAISEexp (A.CONexp (matchcon, NONE), t)
  			 end
  	    in
  		A.FNexp ([A.RULE (A.VARpat arg,
  				  A.SEQexp [enterexp,
! 					    A.CASEexp (A.VARexp (ref arg, NONE),
  						       rl', true)]),
  			  A.RULE (A.WILDpat, re)],

Index: tprof.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/DebugProf/profile/tprof.sml,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -C2 -d -r1.5 -r1.5.4.1
*** tprof.sml	6 Oct 2004 20:18:54 -0000	1.5
--- tprof.sml	20 Jun 2006 17:09:18 -0000	1.5.4.1
***************
*** 99,103 ****
        of POLYty _ =>
  	 bug ("poly["^SP.toString path^"] in Prof")
!        | ty' => VARexp(ref v, [])) (* VARexp(ref v, SOME ty') *)
    | varexp _ = bug "090924 in prof"
  
--- 99,103 ----
        of POLYty _ =>
  	 bug ("poly["^SP.toString path^"] in Prof")
!        | ty' => VARexp(ref v, NONE)) (* VARexp(ref v, SOME ty') *)
    | varexp _ = bug "090924 in prof"
  
***************
*** 149,157 ****
       fun BUMPCCexp (ccvara : int) = 
         let val lvar = tmpvar("indexvar",intTy,mkv)
! 	in APPexp(VARexp(ref updateop,[intTy]),  
  	       TUPLEexp[countarray,
  		INTexp (IntInf.fromInt ccvara, intTy),
  		   APPexp(varexp addop,
! 		     TUPLEexp[APPexp(VARexp(ref subop,[intTy]),
  			       TUPLEexp[countarray,
  			               INTexp(IntInf.fromInt ccvara,intTy)]),
--- 149,157 ----
       fun BUMPCCexp (ccvara : int) = 
         let val lvar = tmpvar("indexvar",intTy,mkv)
! 	in APPexp(VARexp(ref updateop,SOME intTy),  
  	       TUPLEexp[countarray,
  		INTexp (IntInf.fromInt ccvara, intTy),
  		   APPexp(varexp addop,
! 		     TUPLEexp[APPexp(VARexp(ref subop,SOME intTy),
  			       TUPLEexp[countarray,
  			               INTexp(IntInf.fromInt ccvara,intTy)]),
***************
*** 170,174 ****
  			      tyvars=ref nil,
  			      boundtvs=[]}],
! 		    APPexp(VARexp(ref assignop,[intTy]),  
  			   TUPLEexp[currentexp, varexp lvar]))
  	 end
--- 170,174 ----
  			      tyvars=ref nil,
  			      boundtvs=[]}],
! 		    APPexp(VARexp(ref assignop,SOME intTy),  
  			   TUPLEexp[currentexp, varexp lvar]))
  	 end
***************
*** 361,365 ****
                                                          ccvara') true) l,
                                                true)])),
!                                    RULE(WILDpat,RAISEexp(CONexp(exnMatch,[]),
                                                   Reconstruct.expType special))
                                    ], t)
--- 361,365 ----
                                                          ccvara') true) l,
                                                true)])),
!                                    RULE(WILDpat,RAISEexp(CONexp(exnMatch,NONE),
                                                   Reconstruct.expType special))
                                    ], t)
***************
*** 388,392 ****
                                         VARpat currentvar],
                            exp=APPexp(APPexp(VARexp(ref derefop,
!                                                    [profDerefTy]),
                                              varexp register),
                                       STRINGexp(concat(rev(!entries)))),
--- 388,392 ----
                                         VARpat currentvar],
                            exp=APPexp(APPexp(VARexp(ref derefop,
!                                                    SOME profDerefTy),
                                              varexp register),
                                       STRINGexp(concat(rev(!entries)))),