Nice/src/mlsub/typing/lowlevel K0.java,1.30,1.31 Engine.java,1.39,1.40

Daniel Bonniot <[email protected]> Tue, 05 Jul 2005 16:04:49 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31186/src/mlsub/typing/lowlevel

Modified Files:
	K0.java Engine.java 
Log Message:
Only create commonly used exception objects in debug mode, to speed up
typechecking (~ 10%).


Index: K0.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/K0.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** K0.java	1 Apr 2005 12:12:04 -0000	1.30
--- K0.java	5 Jul 2005 16:04:46 -0000	1.31
***************
*** 679,683 ****
      if (isRigid(x1) && isRigid(x2)) {
        if (!R.get(x1, x2)) {
!         throw new LowlevelRigidClash(indexToString(x1), indexToString(x2));
        } else {
          return;
--- 679,686 ----
      if (isRigid(x1) && isRigid(x2)) {
        if (!R.get(x1, x2)) {
!         if (debugK0)
!           throw new LowlevelRigidClash(indexToString(x1), indexToString(x2));
!         else
!           throw LowlevelUnsatisfiable.instance;
        } else {
          return;

Index: Engine.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/Engine.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** Engine.java	21 Jun 2005 18:30:59 -0000	1.39
--- Engine.java	5 Jul 2005 16:04:47 -0000	1.40
***************
*** 282,290 ****
  
  	      if(dbg)
! 		Debug.println("Bad kinding discovered by Engine : "+
! 			      k1+" != "+k2+
! 			      "\nfor elements "+e1+" and "+e2);
! 	      throw new LowlevelUnsatisfiable("Bad Kinding for "+
! 					      e1+ " and "+e2);
  	    }
  	}
--- 282,294 ----
  
  	      if(dbg)
!                 {
!                   Debug.println("Bad kinding discovered by Engine : "+
!                                 k1+" != "+k2+
!                                 "\nfor elements "+e1+" and "+e2);
!                   throw new LowlevelUnsatisfiable("Bad Kinding for "+
!                                                   e1+ " and "+e2);
!                 }
!               else
!                 throw LowlevelUnsatisfiable.instance;
  	    }
  	}



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click