Nice/src/bossa/modules Package.java,1.139,1.140

Daniel Bonniot <[email protected]> Sun, 13 Mar 2005 12:15:34 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv388/src/bossa/modules

Modified Files:
	Package.java 
Log Message:
Added chronometers for more passes (for --bench).


Index: Package.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** Package.java	11 Mar 2005 17:35:53 -0000	1.139
--- Package.java	13 Mar 2005 12:15:31 -0000	1.140
***************
*** 239,242 ****
--- 239,249 ----
    private boolean scoped = false;
  
+   static nice.tools.util.Chronometer scopeChrono = nice.tools.util.Chronometer.make("Scope");
+   static nice.tools.util.Chronometer resolveChrono = nice.tools.util.Chronometer.make("Resolve");
+   static nice.tools.util.Chronometer readAltChrono = nice.tools.util.Chronometer.make("Read alternatives");
+   static nice.tools.util.Chronometer tresolveChrono = nice.tools.util.Chronometer.make("Typed resolve");
+   static nice.tools.util.Chronometer lresolveChrono = nice.tools.util.Chronometer.make("Local resolve");
+   static nice.tools.util.Chronometer typecheckChrono = nice.tools.util.Chronometer.make("Typecheck");
+ 
    public void scope()
    {
***************
*** 244,248 ****
      scoped = true;
  
!     ast.buildScope();
  
      addProgress(PROGRESS_SCOPE);
--- 251,260 ----
      scoped = true;
  
!     scopeChrono.start();
!     try {
!       ast.buildScope();
!     } finally {
!       scopeChrono.stop();
!     }
  
      addProgress(PROGRESS_SCOPE);
***************
*** 251,259 ****
    public void load()
    {
!     ast.resolveScoping();
  
!     // this must be done before freezing
!     if (!compiling())
!       readAlternatives();
  
      addProgress(PROGRESS_LOAD);
--- 263,281 ----
    public void load()
    {
!     resolveChrono.start();
!     try {
!       ast.resolveScoping();
!     } finally {
!       resolveChrono.stop();
!     }
  
!     readAltChrono.start();
!     try {
!       // this must be done before freezing
!       if (!compiling())
!         readAlternatives();
!     } finally {
!       readAltChrono.stop();
!     }
  
      addProgress(PROGRESS_LOAD);
***************
*** 262,266 ****
    public void typedResolve()
    {
!     ast.typedResolve();
  
      addProgress(PROGRESS_TYPED_RESOLVE);
--- 284,293 ----
    public void typedResolve()
    {
!     tresolveChrono.start();
!     try {
!       ast.typedResolve();
!     } finally {
!       tresolveChrono.stop();
!     }
  
      addProgress(PROGRESS_TYPED_RESOLVE);
***************
*** 269,273 ****
    public void localResolve()
    {
!     ast.localResolve();
  
      addProgress(PROGRESS_LOCAL_RESOLVE);
--- 296,305 ----
    public void localResolve()
    {
!     tresolveChrono.start();
!     try {
!       ast.localResolve();
!     } finally {
!       tresolveChrono.stop();
!     }
  
      addProgress(PROGRESS_LOCAL_RESOLVE);
***************
*** 332,337 ****
      if (compiling())
        compilation.progress(this, "typechecking");
!     
!     ast.typechecking(compiling());
  
      addProgress(PROGRESS_TYPECHECK);
--- 364,374 ----
      if (compiling())
        compilation.progress(this, "typechecking");
! 
!     typecheckChrono.start();
!     try {
!       ast.typechecking(compiling());
!     } finally {
!       typecheckChrono.stop();
!     }
  
      addProgress(PROGRESS_TYPECHECK);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click