示例#1
0
 internal static LeaveExceptionHandlerInstruction Create(int labelIndex, bool hasValue)
 {
     if (labelIndex < CacheSize)
     {
         int index = (2 * labelIndex) | (hasValue ? 1 : 0);
         return(s_cache[index] ?? (s_cache[index] = new LeaveExceptionHandlerInstruction(labelIndex, hasValue)));
     }
     return(new LeaveExceptionHandlerInstruction(labelIndex, hasValue));
 }
示例#2
0
 public void EmitLeaveExceptionHandler(bool hasValue, BranchLabel tryExpressionEndLabel)
 {
     Emit(LeaveExceptionHandlerInstruction.Create(EnsureLabelIndex(tryExpressionEndLabel), hasValue));
 }