Example #1
0
        private void getEHinfo(IntPtr _this, CORINFO_METHOD_STRUCT_* ftn, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
        {
            var methodIL = _compilation.GetMethodIL(HandleToObject(ftn));

            var ehRegion = methodIL.GetExceptionRegions()[EHnumber];

            clause.Flags = (CORINFO_EH_CLAUSE_FLAGS)ehRegion.Kind;
            clause.TryOffset = (uint)ehRegion.TryOffset;
            clause.TryLength = (uint)ehRegion.TryLength;
            clause.HandlerOffset = (uint)ehRegion.HandlerOffset;
            clause.HandlerLength = (uint)ehRegion.HandlerLength;
            clause.ClassTokenOrOffset = (uint)((ehRegion.Kind == ILExceptionRegionKind.Filter) ? ehRegion.FilterOffset : ehRegion.ClassToken);
        }
Example #2
0
 private void setEHinfo(IntPtr _this, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
 {
     // TODO: EH
 }
Example #3
0
 private void setEHinfo(uint EHnumber, ref CORINFO_EH_CLAUSE clause)
 {
     _ehClauses[EHnumber] = clause;
 }
Example #4
0
 public virtual void getEHinfo_wrapper(IntPtr _this, out IntPtr exception, CORINFO_METHOD_STRUCT_* ftn, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
 {
     exception = IntPtr.Zero;
     try
     {
         getEHinfo(ftn, EHnumber, ref clause);
         return;
     }
     catch (Exception ex)
     {
         exception = AllocException(ex);
     }
 }
Example #5
0
 static void _getEHinfo(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHOD_STRUCT_* ftn, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
 {
     var _this = GetThis(thisHandle);
     try
     {
         _this.getEHinfo(ftn, EHnumber, ref clause);
     }
     catch (Exception ex)
     {
         *ppException = _this.AllocException(ex);
     }
 }
Example #6
0
 static void _setEHinfo(IntPtr thisHandle, IntPtr* ppException, uint EHnumber, ref CORINFO_EH_CLAUSE clause)
 {
     var _this = GetThis(thisHandle);
     try
     {
         _this.setEHinfo(EHnumber, ref clause);
     }
     catch (Exception ex)
     {
         *ppException = _this.AllocException(ex);
     }
 }