use of org.jikesrvm.compilers.opt.ir.operand.TypeOperand in project JikesRVM by JikesRVM.
the class ExceptionHandlerBasicBlock method mayCatchException.
/**
* Return YES/NO/MAYBE values that answer the question is it possible for
* this handler block to catch an exception of the type et.
*
* @param cand the TypeReference of the exception in question.
* @return YES, NO, MAYBE
*/
public byte mayCatchException(TypeReference cand) {
boolean seenMaybe = false;
byte t;
for (TypeOperand exceptionType : exceptionTypes) {
t = ClassLoaderProxy.includesType(exceptionType.getTypeRef(), cand);
if (t == YES)
return YES;
seenMaybe |= (t == MAYBE);
t = ClassLoaderProxy.includesType(cand, exceptionType.getTypeRef());
if (t == YES)
return YES;
seenMaybe |= (t == MAYBE);
}
return seenMaybe ? MAYBE : NO;
}
Aggregations