Пример #1
0
 static CallSite()
 {
     MethodHandleImpl.InitStatics();
     try
     {
         GET_TARGET = IMPL_LOOKUP.findVirtual(typeof(CallSite), "getTarget", MethodType.MethodType(typeof(MethodHandle)));
         THROW_UCS  = IMPL_LOOKUP.findStatic(typeof(CallSite), "uninitializedCallSite", MethodType.MethodType(typeof(Object), typeof(Object[])));
     }
     catch (ReflectiveOperationException e)
     {
         throw newInternalError(e);
     }
     try
     {
         TARGET_OFFSET = UNSAFE.objectFieldOffset(typeof(CallSite).getDeclaredField("target"));
     }
     catch (Exception ex)
     {
         throw new Error(ex);
     }
 }