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); }
private void setEHinfo(IntPtr _this, uint EHnumber, ref CORINFO_EH_CLAUSE clause) { // TODO: EH }
private void setEHinfo(uint EHnumber, ref CORINFO_EH_CLAUSE clause) { _ehClauses[EHnumber] = clause; }
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); } }
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); } }
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); } }