| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System.Collections.Generic; |
| | | 5 | | using System.Diagnostics; |
| | | 6 | | |
| | | 7 | | namespace System.Reflection.Metadata.Ecma335 |
| | | 8 | | { |
| | | 9 | | public sealed class ControlFlowBuilder |
| | | 10 | | { |
| | | 11 | | // internal for testing: |
| | | 12 | | internal readonly struct BranchInfo |
| | | 13 | | { |
| | | 14 | | // The offset to the label operand inside the instruction. |
| | | 15 | | internal readonly int OperandOffset; |
| | | 16 | | internal readonly LabelHandle Label; |
| | | 17 | | // Label offsets are calculated from the end of the instruction that contains them. |
| | | 18 | | // This value contains the displacement from the start of the label operand |
| | | 19 | | // to the end of the instruction. It is equal to one on short branches, |
| | | 20 | | // four on long branches and bigger on the switch instruction. |
| | | 21 | | private readonly int _instructionEndDisplacement; |
| | | 22 | | |
| | | 23 | | // The following two fields are used for error reporting and tests. |
| | | 24 | | |
| | | 25 | | // The offset to the start of the instruction. |
| | | 26 | | internal readonly int ILOffset; |
| | | 27 | | internal readonly ILOpCode OpCode; |
| | | 28 | | |
| | 0 | 29 | | internal bool IsShortBranch => _instructionEndDisplacement == 1; |
| | 0 | 30 | | internal int OperandSize => Math.Min(_instructionEndDisplacement, 4); |
| | | 31 | | |
| | | 32 | | internal BranchInfo(int operandOffset, LabelHandle label, int instructionEndDisplacement, int ilOffset, ILOp |
| | 0 | 33 | | { |
| | 0 | 34 | | OperandOffset = operandOffset; |
| | 0 | 35 | | Label = label; |
| | 0 | 36 | | _instructionEndDisplacement = instructionEndDisplacement; |
| | 0 | 37 | | ILOffset = ilOffset; |
| | 0 | 38 | | OpCode = opCode; |
| | 0 | 39 | | } |
| | | 40 | | |
| | | 41 | | internal int GetBranchDistance(List<int> labels) |
| | 0 | 42 | | { |
| | 0 | 43 | | int labelTargetOffset = labels[Label.Id - 1]; |
| | 0 | 44 | | if (labelTargetOffset < 0) |
| | 0 | 45 | | { |
| | 0 | 46 | | Throw.InvalidOperation_LabelNotMarked(Label.Id); |
| | | 47 | | } |
| | | 48 | | |
| | 0 | 49 | | int distance = labelTargetOffset - (OperandOffset + _instructionEndDisplacement); |
| | | 50 | | |
| | 0 | 51 | | if (IsShortBranch && unchecked((sbyte)distance) != distance) |
| | 0 | 52 | | { |
| | | 53 | | // We could potentially implement algorithm that automatically fixes up branch instructions to accom |
| | | 54 | | // however an optimal algorithm would be rather complex (something like: calculate topological order |
| | | 55 | | // and then use fixed point to eliminate cycles). If the caller doesn't care about optimal IL size t |
| | | 56 | | // distance is unknown upfront. If they do they probably implement more sophisticated algorithm for |
| | 0 | 57 | | throw new InvalidOperationException(SR.Format(SR.DistanceBetweenInstructionAndLabelTooBig, OpCode, I |
| | | 58 | | } |
| | | 59 | | |
| | 0 | 60 | | return distance; |
| | 0 | 61 | | } |
| | | 62 | | } |
| | | 63 | | |
| | | 64 | | internal readonly struct ExceptionHandlerInfo |
| | | 65 | | { |
| | | 66 | | public readonly ExceptionRegionKind Kind; |
| | | 67 | | public readonly LabelHandle TryStart, TryEnd, HandlerStart, HandlerEnd, FilterStart; |
| | | 68 | | public readonly EntityHandle CatchType; |
| | | 69 | | |
| | | 70 | | public ExceptionHandlerInfo( |
| | | 71 | | ExceptionRegionKind kind, |
| | | 72 | | LabelHandle tryStart, |
| | | 73 | | LabelHandle tryEnd, |
| | | 74 | | LabelHandle handlerStart, |
| | | 75 | | LabelHandle handlerEnd, |
| | | 76 | | LabelHandle filterStart, |
| | | 77 | | EntityHandle catchType) |
| | 0 | 78 | | { |
| | 0 | 79 | | Kind = kind; |
| | 0 | 80 | | TryStart = tryStart; |
| | 0 | 81 | | TryEnd = tryEnd; |
| | 0 | 82 | | HandlerStart = handlerStart; |
| | 0 | 83 | | HandlerEnd = handlerEnd; |
| | 0 | 84 | | FilterStart = filterStart; |
| | 0 | 85 | | CatchType = catchType; |
| | 0 | 86 | | } |
| | | 87 | | } |
| | | 88 | | |
| | | 89 | | private readonly List<BranchInfo> _branches; |
| | | 90 | | private readonly List<int> _labels; |
| | | 91 | | private List<ExceptionHandlerInfo>? _lazyExceptionHandlers; |
| | | 92 | | |
| | 0 | 93 | | public ControlFlowBuilder() |
| | 0 | 94 | | { |
| | 0 | 95 | | _branches = new List<BranchInfo>(); |
| | 0 | 96 | | _labels = new List<int>(); |
| | 0 | 97 | | } |
| | | 98 | | |
| | | 99 | | /// <summary> |
| | | 100 | | /// Clears the object's internal state, allowing the same instance to be reused. |
| | | 101 | | /// </summary> |
| | | 102 | | public void Clear() |
| | 0 | 103 | | { |
| | 0 | 104 | | _branches.Clear(); |
| | 0 | 105 | | _labels.Clear(); |
| | 0 | 106 | | _lazyExceptionHandlers?.Clear(); |
| | 0 | 107 | | RemainingSwitchBranches = 0; |
| | 0 | 108 | | } |
| | | 109 | | |
| | | 110 | | internal LabelHandle AddLabel() |
| | 0 | 111 | | { |
| | 0 | 112 | | ValidateNotInSwitch(); |
| | 0 | 113 | | _labels.Add(-1); |
| | 0 | 114 | | return new LabelHandle(_labels.Count); |
| | 0 | 115 | | } |
| | | 116 | | |
| | | 117 | | internal void AddBranch(int operandOffset, LabelHandle label, int instructionEndDisplacement, int ilOffset, ILOp |
| | 0 | 118 | | { |
| | 0 | 119 | | Debug.Assert(operandOffset >= 0); |
| | 0 | 120 | | Debug.Assert(_branches.Count == 0 || operandOffset > _branches[_branches.Count - 1].OperandOffset); |
| | 0 | 121 | | ValidateLabel(label, nameof(label)); |
| | | 122 | | #if DEBUG |
| | 0 | 123 | | switch (instructionEndDisplacement) |
| | | 124 | | { |
| | | 125 | | case 1: |
| | 0 | 126 | | Debug.Assert(opCode.GetBranchOperandSize() == 1); |
| | 0 | 127 | | break; |
| | | 128 | | case 4: |
| | 0 | 129 | | Debug.Assert(opCode == ILOpCode.Switch || opCode.GetBranchOperandSize() == 4); |
| | 0 | 130 | | break; |
| | | 131 | | default: |
| | 0 | 132 | | Debug.Assert(instructionEndDisplacement > 4 && instructionEndDisplacement % 4 == 0 && opCode == ILOp |
| | 0 | 133 | | break; |
| | | 134 | | } |
| | | 135 | | #endif |
| | 0 | 136 | | _branches.Add(new BranchInfo(operandOffset, label, instructionEndDisplacement, ilOffset, opCode)); |
| | 0 | 137 | | } |
| | | 138 | | |
| | | 139 | | internal void MarkLabel(int ilOffset, LabelHandle label) |
| | 0 | 140 | | { |
| | 0 | 141 | | Debug.Assert(ilOffset >= 0); |
| | 0 | 142 | | ValidateNotInSwitch(); |
| | 0 | 143 | | ValidateLabel(label, nameof(label)); |
| | 0 | 144 | | _labels[label.Id - 1] = ilOffset; |
| | 0 | 145 | | } |
| | | 146 | | |
| | | 147 | | private int GetLabelOffsetChecked(LabelHandle label) |
| | 0 | 148 | | { |
| | 0 | 149 | | int offset = _labels[label.Id - 1]; |
| | 0 | 150 | | if (offset < 0) |
| | 0 | 151 | | { |
| | 0 | 152 | | Throw.InvalidOperation_LabelNotMarked(label.Id); |
| | | 153 | | } |
| | | 154 | | |
| | 0 | 155 | | return offset; |
| | 0 | 156 | | } |
| | | 157 | | |
| | | 158 | | private void ValidateLabel(LabelHandle label, string parameterName) |
| | 0 | 159 | | { |
| | 0 | 160 | | if (label.IsNil) |
| | 0 | 161 | | { |
| | 0 | 162 | | Throw.ArgumentNull(parameterName); |
| | | 163 | | } |
| | | 164 | | |
| | 0 | 165 | | if (label.Id > _labels.Count) |
| | 0 | 166 | | { |
| | 0 | 167 | | Throw.LabelDoesntBelongToBuilder(parameterName); |
| | | 168 | | } |
| | 0 | 169 | | } |
| | | 170 | | |
| | | 171 | | /// <summary> |
| | | 172 | | /// Adds finally region. |
| | | 173 | | /// </summary> |
| | | 174 | | /// <param name="tryStart">Label marking the first instruction of the try block.</param> |
| | | 175 | | /// <param name="tryEnd">Label marking the instruction immediately following the try block.</param> |
| | | 176 | | /// <param name="handlerStart">Label marking the first instruction of the handler.</param> |
| | | 177 | | /// <param name="handlerEnd">Label marking the instruction immediately following the handler.</param> |
| | | 178 | | /// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associ |
| | | 179 | | /// <exception cref="ArgumentNullException">A label has default value.</exception> |
| | | 180 | | public void AddFinallyRegion(LabelHandle tryStart, LabelHandle tryEnd, LabelHandle handlerStart, LabelHandle han |
| | 0 | 181 | | AddExceptionRegion(ExceptionRegionKind.Finally, tryStart, tryEnd, handlerStart, handlerEnd); |
| | | 182 | | |
| | | 183 | | /// <summary> |
| | | 184 | | /// Adds fault region. |
| | | 185 | | /// </summary> |
| | | 186 | | /// <param name="tryStart">Label marking the first instruction of the try block.</param> |
| | | 187 | | /// <param name="tryEnd">Label marking the instruction immediately following the try block.</param> |
| | | 188 | | /// <param name="handlerStart">Label marking the first instruction of the handler.</param> |
| | | 189 | | /// <param name="handlerEnd">Label marking the instruction immediately following the handler.</param> |
| | | 190 | | /// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associ |
| | | 191 | | /// <exception cref="ArgumentNullException">A label has default value.</exception> |
| | | 192 | | public void AddFaultRegion(LabelHandle tryStart, LabelHandle tryEnd, LabelHandle handlerStart, LabelHandle handl |
| | 0 | 193 | | AddExceptionRegion(ExceptionRegionKind.Fault, tryStart, tryEnd, handlerStart, handlerEnd); |
| | | 194 | | |
| | | 195 | | /// <summary> |
| | | 196 | | /// Adds catch region. |
| | | 197 | | /// </summary> |
| | | 198 | | /// <param name="tryStart">Label marking the first instruction of the try block.</param> |
| | | 199 | | /// <param name="tryEnd">Label marking the instruction immediately following the try block.</param> |
| | | 200 | | /// <param name="handlerStart">Label marking the first instruction of the handler.</param> |
| | | 201 | | /// <param name="handlerEnd">Label marking the instruction immediately following the handler.</param> |
| | | 202 | | /// <param name="catchType">The type of exception to be caught: <see cref="TypeDefinitionHandle"/>, <see cref="T |
| | | 203 | | /// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associ |
| | | 204 | | /// <exception cref="ArgumentException"><paramref name="catchType"/> is not a valid type handle.</exception> |
| | | 205 | | /// <exception cref="ArgumentNullException">A label has default value.</exception> |
| | | 206 | | public void AddCatchRegion(LabelHandle tryStart, LabelHandle tryEnd, LabelHandle handlerStart, LabelHandle handl |
| | 0 | 207 | | { |
| | 0 | 208 | | if (!ExceptionRegionEncoder.IsValidCatchTypeHandle(catchType)) |
| | 0 | 209 | | { |
| | 0 | 210 | | Throw.InvalidArgument_Handle(nameof(catchType)); |
| | | 211 | | } |
| | | 212 | | |
| | 0 | 213 | | AddExceptionRegion(ExceptionRegionKind.Catch, tryStart, tryEnd, handlerStart, handlerEnd, catchType: catchTy |
| | 0 | 214 | | } |
| | | 215 | | |
| | | 216 | | /// <summary> |
| | | 217 | | /// Adds catch region. |
| | | 218 | | /// </summary> |
| | | 219 | | /// <param name="tryStart">Label marking the first instruction of the try block.</param> |
| | | 220 | | /// <param name="tryEnd">Label marking the instruction immediately following the try block.</param> |
| | | 221 | | /// <param name="handlerStart">Label marking the first instruction of the handler.</param> |
| | | 222 | | /// <param name="handlerEnd">Label marking the instruction immediately following the handler.</param> |
| | | 223 | | /// <param name="filterStart">Label marking the first instruction of the filter block.</param> |
| | | 224 | | /// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associ |
| | | 225 | | /// <exception cref="ArgumentNullException">A label has default value.</exception> |
| | | 226 | | public void AddFilterRegion(LabelHandle tryStart, LabelHandle tryEnd, LabelHandle handlerStart, LabelHandle hand |
| | 0 | 227 | | { |
| | 0 | 228 | | ValidateLabel(filterStart, nameof(filterStart)); |
| | 0 | 229 | | AddExceptionRegion(ExceptionRegionKind.Filter, tryStart, tryEnd, handlerStart, handlerEnd, filterStart: filt |
| | 0 | 230 | | } |
| | | 231 | | |
| | | 232 | | private void AddExceptionRegion( |
| | | 233 | | ExceptionRegionKind kind, |
| | | 234 | | LabelHandle tryStart, |
| | | 235 | | LabelHandle tryEnd, |
| | | 236 | | LabelHandle handlerStart, |
| | | 237 | | LabelHandle handlerEnd, |
| | | 238 | | LabelHandle filterStart = default(LabelHandle), |
| | | 239 | | EntityHandle catchType = default(EntityHandle)) |
| | 0 | 240 | | { |
| | 0 | 241 | | ValidateLabel(tryStart, nameof(tryStart)); |
| | 0 | 242 | | ValidateLabel(tryEnd, nameof(tryEnd)); |
| | 0 | 243 | | ValidateLabel(handlerStart, nameof(handlerStart)); |
| | 0 | 244 | | ValidateLabel(handlerEnd, nameof(handlerEnd)); |
| | 0 | 245 | | ValidateNotInSwitch(); |
| | | 246 | | |
| | 0 | 247 | | _lazyExceptionHandlers ??= new List<ExceptionHandlerInfo>(); |
| | | 248 | | |
| | 0 | 249 | | _lazyExceptionHandlers.Add(new ExceptionHandlerInfo(kind, tryStart, tryEnd, handlerStart, handlerEnd, filter |
| | 0 | 250 | | } |
| | | 251 | | |
| | | 252 | | // internal for testing: |
| | 0 | 253 | | internal IEnumerable<BranchInfo> Branches => _branches; |
| | | 254 | | |
| | | 255 | | // internal for testing: |
| | 0 | 256 | | internal IEnumerable<int> Labels => _labels; |
| | | 257 | | |
| | 0 | 258 | | internal int BranchCount => _branches.Count; |
| | | 259 | | |
| | 0 | 260 | | internal int ExceptionHandlerCount => _lazyExceptionHandlers?.Count ?? 0; |
| | | 261 | | |
| | 0 | 262 | | internal int RemainingSwitchBranches { get; set; } |
| | | 263 | | |
| | | 264 | | internal void ValidateNotInSwitch() |
| | 0 | 265 | | { |
| | 0 | 266 | | if (RemainingSwitchBranches > 0) |
| | 0 | 267 | | { |
| | 0 | 268 | | Throw.InvalidOperation(SR.SwitchInstructionEncoderTooFewBranches); |
| | | 269 | | } |
| | 0 | 270 | | } |
| | | 271 | | |
| | | 272 | | internal void SwitchBranchAdded() |
| | 0 | 273 | | { |
| | 0 | 274 | | if (RemainingSwitchBranches == 0) |
| | 0 | 275 | | { |
| | 0 | 276 | | Throw.InvalidOperation(SR.SwitchInstructionEncoderTooManyBranches); |
| | | 277 | | } |
| | 0 | 278 | | RemainingSwitchBranches--; |
| | 0 | 279 | | } |
| | | 280 | | |
| | | 281 | | /// <exception cref="InvalidOperationException" /> |
| | | 282 | | internal void CopyCodeAndFixupBranches(BlobBuilder srcBuilder, BlobBuilder dstBuilder) |
| | 0 | 283 | | { |
| | 0 | 284 | | var branch = _branches[0]; |
| | 0 | 285 | | int branchIndex = 0; |
| | | 286 | | |
| | | 287 | | // offset within the source builder |
| | 0 | 288 | | int srcOffset = 0; |
| | | 289 | | |
| | | 290 | | // current offset within the current source blob |
| | 0 | 291 | | int srcBlobOffset = 0; |
| | | 292 | | |
| | 0 | 293 | | foreach (Blob srcBlob in srcBuilder.GetBlobs()) |
| | 0 | 294 | | { |
| | 0 | 295 | | Debug.Assert(srcBlobOffset == 0); |
| | | 296 | | |
| | 0 | 297 | | while (true) |
| | 0 | 298 | | { |
| | | 299 | | // copy bytes preceding the next branch, or till the end of the blob: |
| | 0 | 300 | | int chunkSize = Math.Min(branch.OperandOffset - srcOffset, srcBlob.Length - srcBlobOffset); |
| | 0 | 301 | | dstBuilder.WriteBytes(srcBlob.Buffer, srcBlobOffset, chunkSize); |
| | 0 | 302 | | srcOffset += chunkSize; |
| | 0 | 303 | | srcBlobOffset += chunkSize; |
| | | 304 | | |
| | | 305 | | // there is no branch left in the blob: |
| | 0 | 306 | | if (srcBlobOffset == srcBlob.Length) |
| | 0 | 307 | | { |
| | 0 | 308 | | srcBlobOffset = 0; |
| | 0 | 309 | | break; |
| | | 310 | | } |
| | | 311 | | |
| | 0 | 312 | | int operandSize = branch.OperandSize; |
| | 0 | 313 | | bool isShortInstruction = branch.IsShortBranch; |
| | | 314 | | |
| | | 315 | | // Note: the 4B operand is contiguous since we wrote it via BlobBuilder.WriteInt32() |
| | 0 | 316 | | Debug.Assert( |
| | 0 | 317 | | srcBlobOffset == srcBlob.Length || |
| | 0 | 318 | | (isShortInstruction ? |
| | 0 | 319 | | srcBlob.Buffer[srcBlobOffset] == 0xff : |
| | 0 | 320 | | BitConverter.ToUInt32(srcBlob.Buffer, srcBlobOffset) == 0xffffffff)); |
| | | 321 | | |
| | 0 | 322 | | int branchDistance = branch.GetBranchDistance(_labels); |
| | | 323 | | |
| | | 324 | | // write branch operand: |
| | 0 | 325 | | if (isShortInstruction) |
| | 0 | 326 | | { |
| | 0 | 327 | | dstBuilder.WriteSByte((sbyte)branchDistance); |
| | 0 | 328 | | } |
| | | 329 | | else |
| | 0 | 330 | | { |
| | 0 | 331 | | dstBuilder.WriteInt32(branchDistance); |
| | 0 | 332 | | } |
| | | 333 | | |
| | 0 | 334 | | srcOffset += operandSize; |
| | | 335 | | |
| | | 336 | | // next branch: |
| | 0 | 337 | | branchIndex++; |
| | 0 | 338 | | if (branchIndex == _branches.Count) |
| | 0 | 339 | | { |
| | | 340 | | // We have processed all branches. The MaxValue will cause the rest |
| | | 341 | | // of the IL stream to be directly copied to the destination blob. |
| | 0 | 342 | | branch = new BranchInfo(operandOffset: int.MaxValue, label: default, |
| | 0 | 343 | | instructionEndDisplacement: default, ilOffset: default, opCode: default); |
| | 0 | 344 | | } |
| | | 345 | | else |
| | 0 | 346 | | { |
| | 0 | 347 | | branch = _branches[branchIndex]; |
| | 0 | 348 | | } |
| | | 349 | | |
| | | 350 | | // skip fake branch operand: |
| | 0 | 351 | | srcBlobOffset += operandSize; |
| | 0 | 352 | | } |
| | 0 | 353 | | } |
| | 0 | 354 | | } |
| | | 355 | | |
| | | 356 | | internal void SerializeExceptionTable(BlobBuilder builder) |
| | 0 | 357 | | { |
| | 0 | 358 | | if (_lazyExceptionHandlers == null || _lazyExceptionHandlers.Count == 0) |
| | 0 | 359 | | { |
| | 0 | 360 | | return; |
| | | 361 | | } |
| | | 362 | | |
| | 0 | 363 | | var regionEncoder = ExceptionRegionEncoder.SerializeTableHeader(builder, _lazyExceptionHandlers.Count, HasSm |
| | | 364 | | |
| | 0 | 365 | | foreach (var handler in _lazyExceptionHandlers) |
| | 0 | 366 | | { |
| | | 367 | | // Note that labels have been validated when added to the handler list, |
| | | 368 | | // they might not have been marked though. |
| | | 369 | | |
| | 0 | 370 | | int tryStart = GetLabelOffsetChecked(handler.TryStart); |
| | 0 | 371 | | int tryEnd = GetLabelOffsetChecked(handler.TryEnd); |
| | 0 | 372 | | int handlerStart = GetLabelOffsetChecked(handler.HandlerStart); |
| | 0 | 373 | | int handlerEnd = GetLabelOffsetChecked(handler.HandlerEnd); |
| | | 374 | | |
| | 0 | 375 | | if (tryStart > tryEnd) |
| | 0 | 376 | | { |
| | 0 | 377 | | Throw.InvalidOperation(SR.Format(SR.InvalidExceptionRegionBounds, tryStart, tryEnd)); |
| | | 378 | | } |
| | | 379 | | |
| | 0 | 380 | | if (handlerStart > handlerEnd) |
| | 0 | 381 | | { |
| | 0 | 382 | | Throw.InvalidOperation(SR.Format(SR.InvalidExceptionRegionBounds, handlerStart, handlerEnd)); |
| | | 383 | | } |
| | | 384 | | |
| | 0 | 385 | | int catchTokenOrOffset = handler.Kind switch |
| | 0 | 386 | | { |
| | 0 | 387 | | ExceptionRegionKind.Catch => MetadataTokens.GetToken(handler.CatchType), |
| | 0 | 388 | | ExceptionRegionKind.Filter => GetLabelOffsetChecked(handler.FilterStart), |
| | 0 | 389 | | _ => 0, |
| | 0 | 390 | | }; |
| | | 391 | | |
| | 0 | 392 | | regionEncoder.AddUnchecked( |
| | 0 | 393 | | handler.Kind, |
| | 0 | 394 | | tryStart, |
| | 0 | 395 | | tryEnd - tryStart, |
| | 0 | 396 | | handlerStart, |
| | 0 | 397 | | handlerEnd - handlerStart, |
| | 0 | 398 | | catchTokenOrOffset); |
| | 0 | 399 | | } |
| | 0 | 400 | | } |
| | | 401 | | |
| | | 402 | | private bool HasSmallExceptionRegions() |
| | 0 | 403 | | { |
| | 0 | 404 | | Debug.Assert(_lazyExceptionHandlers != null); |
| | | 405 | | |
| | 0 | 406 | | if (!ExceptionRegionEncoder.IsSmallRegionCount(_lazyExceptionHandlers.Count)) |
| | 0 | 407 | | { |
| | 0 | 408 | | return false; |
| | | 409 | | } |
| | | 410 | | |
| | 0 | 411 | | foreach (var handler in _lazyExceptionHandlers) |
| | 0 | 412 | | { |
| | 0 | 413 | | if (!ExceptionRegionEncoder.IsSmallExceptionRegionFromBounds(GetLabelOffsetChecked(handler.TryStart), Ge |
| | 0 | 414 | | !ExceptionRegionEncoder.IsSmallExceptionRegionFromBounds(GetLabelOffsetChecked(handler.HandlerStart) |
| | 0 | 415 | | { |
| | 0 | 416 | | return false; |
| | | 417 | | } |
| | 0 | 418 | | } |
| | | 419 | | |
| | 0 | 420 | | return true; |
| | 0 | 421 | | } |
| | | 422 | | } |
| | | 423 | | } |
| | | 424 | | |