static private RequiresFatSection ( Collection |
||
handlers | Collection |
|
return | bool |
static bool RequiresFatSection(Collection<ExceptionHandler> handlers)
{
for (int i = 0; i < handlers.Count; i++) {
var handler = handlers [i];
if (IsFatRange (handler.TryStart, handler.TryEnd))
return true;
if (IsFatRange (handler.HandlerStart, handler.HandlerEnd))
return true;
if (handler.HandlerType == ExceptionHandlerType.Filter
&& IsFatRange (handler.FilterStart, handler.HandlerStart))
return true;
}
return false;
}
private void WriteExceptionHandlers() { this.Align(4); Collection <ExceptionHandler> exceptionHandlers = this.body.ExceptionHandlers; if (exceptionHandlers.Count < 21 && !CodeWriter.RequiresFatSection(exceptionHandlers)) { this.WriteSmallSection(exceptionHandlers); return; } this.WriteFatSection(exceptionHandlers); }