Index: verify_except.c =================================================================== RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_except.c,v retrieving revision 1.11 diff -u -r1.11 verify_except.c --- verify_except.c 23 May 2004 22:37:00 -0000 1.11 +++ verify_except.c 24 May 2004 00:31:25 -0000 @@ -34,7 +34,6 @@ { ILUInt32 offset; ILUInt32 end; - ILUInt32 lowestTry; ILException *exception; ILClass *classInfo; @@ -42,36 +41,33 @@ offset = 0; for(;;) { - /* Find the exception region that matches the offset */ + /* Find the end of the region that starts at "offset" */ + end = IL_MAX_UINT32; exception = exceptions; - lowestTry = IL_MAX_UINT32; while(exception != 0) { - if(offset >= exception->tryOffset && - offset < (exception->tryOffset + exception->tryLength)) + if(offset < exception->tryOffset) { - /* The offset is within this region */ - break; + /* We are in the code before this exception region */ + if(end > exception->tryOffset) + { + end = exception->tryOffset; + } } - else if(offset < exception->tryOffset) + else if(offset >= exception->tryOffset && + offset < (exception->tryOffset + exception->tryLength)) { - /* The offset starts entirely before this region */ - lowestTry = exception->tryOffset; - break; + /* We are in code in the middle of this exception region */ + if(end > (exception->tryOffset + exception->tryLength)) + { + end = exception->tryOffset + exception->tryLength; + } } exception = exception->next; } - if(!exception) + if(end == IL_MAX_UINT32) { break; - } - if(lowestTry != IL_MAX_UINT32) - { - end = lowestTry; - } - else - { - end = exception->tryOffset + exception->tryLength; } /* Output the region information to the table */