CVS: sml-dist/src/compiler/FLINT/plambda flintnm.sml, 1.17.10.3, 1.17.10.4

George Kuan <[email protected]> Wed, 26 Jul 2006 08:22:52 -0700
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/src/compiler/FLINT/plambda
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1834/src/compiler/FLINT/plambda

Modified Files:
      Tag: primop-branch-2
	flintnm.sml 
Log Message:
typesutil, moduleutils, and translate...debugging output now checks debugging flag...more debugging for flintnm/ltykernel

Index: flintnm.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/plambda/flintnm.sml,v
retrieving revision 1.17.10.3
retrieving revision 1.17.10.4
diff -C2 -d -r1.17.10.3 -r1.17.10.4
*** flintnm.sml	24 Jul 2006 23:07:36 -0000	1.17.10.3
--- flintnm.sml	26 Jul 2006 15:22:09 -0000	1.17.10.4
***************
*** 26,30 ****
  val say = Control_Print.say
  
! val debugging = ref false;
  fun debugmsg (msg : string) = 
      if !debugging then (say msg; say "\n") else ()
--- 26,30 ----
  val say = Control_Print.say
  
! val debugging = ref true;
  fun debugmsg (msg : string) = 
      if !debugging then (say msg; say "\n") else ()
***************
*** 117,124 ****
  
  fun tofundec (venv,d,f_lv,arg_lv,arg_lty,body,isrec) =
!     let (* val _ = (print (concat ["tofundec translate body: ", 
  				(LtyBasic.lt_print arg_lty),
  				" "]);
! 		 PPLexp.printLexp body; print "\n") *)
  	val (body',body_lty) =
          (* first, we translate the body (in the extended env) *)
--- 117,124 ----
  
  fun tofundec (venv,d,f_lv,arg_lv,arg_lty,body,isrec) =
!     let val _ = (debugmsg (concat ["tofundec translate body: ", 
  				(LtyBasic.lt_print arg_lty),
  				" "]);
! 		 PPLexp.printLexp body) 
  	val (body',body_lty) =
          (* first, we translate the body (in the extended env) *)
***************
*** 147,152 ****
  		 {isrec=rettype, known=false, inline=F.IH_SAFE,
  		  cconv=F.CC_FCT})
! 			
!     in ((fkind, f_lv, ListPair.zip(arg_lvs, map FL.ltc_raw arg_ltys), body''),
  	f_lty)
      end
--- 147,153 ----
  		 {isrec=rettype, known=false, inline=F.IH_SAFE,
  		  cconv=F.CC_FCT})
! 	val arg_ltys' =  map FL.ltc_raw arg_ltys
! 	val _ = debugmsg "<<tofundec"
!     in ((fkind, f_lv, ListPair.zip(arg_lvs, arg_ltys'), body''),
  	f_lty)
      end
***************
*** 587,592 ****
  
  fun norm (lexp as L.FN(arg_lv,arg_lty,e)) =
!     (#1(tofundec(LT.initLtyEnv, DI.top, mkv(), arg_lv, arg_lty, e, false))
!     handle x => raise x)
    | norm _ = bug "unexpected toplevel lexp"
  
--- 588,596 ----
  
  fun norm (lexp as L.FN(arg_lv,arg_lty,e)) =
!     let val r = 
! 	    (#1(tofundec(LT.initLtyEnv, DI.top, mkv(), arg_lv, arg_lty, e, false))
! 	     handle x => raise x)
!     in (debugmsg "<<norm"; r)
!     end
    | norm _ = bug "unexpected toplevel lexp"
  


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV