File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -6293,6 +6293,11 @@ ves_icall_System_Environment_get_TickCount64 (void)
62936293gpointer
62946294ves_icall_RuntimeMethodHandle_GetFunctionPointer (MonoMethod * method , MonoError * error )
62956295{
6296+ /* WISH: we should do this in managed */
6297+ if (G_UNLIKELY (mono_method_has_unmanaged_callers_only_attribute (method ))) {
6298+ method = mono_marshal_get_managed_wrapper (method , NULL , (MonoGCHandle )0 , error );
6299+ return_val_if_nok (error , NULL );
6300+ }
62966301 return mono_get_runtime_callbacks ()-> get_ftnptr (method , error );
62976302}
62986303
Original file line number Diff line number Diff line change @@ -6542,9 +6542,16 @@ MINT_IN_CASE(MINT_BRTRUE_I8_SP) ZEROP_SP(gint64, !=); MINT_IN_BREAK;
65426542
65436543 MonoMethod * cmethod = LOCAL_VAR (ip [2 ], MonoMethod * );
65446544
6545- InterpMethod * m = mono_interp_get_imethod (cmethod , error );
6546- mono_error_assert_ok (error );
6547- LOCAL_VAR (ip [1 ], gpointer ) = imethod_to_ftnptr (m , FALSE );
6545+ if (G_UNLIKELY (mono_method_has_unmanaged_callers_only_attribute (cmethod ))) {
6546+ cmethod = mono_marshal_get_managed_wrapper (cmethod , NULL , (MonoGCHandle )0 , error );
6547+ mono_error_assert_ok (error );
6548+ gpointer addr = mini_get_interp_callbacks ()- > create_method_pointer (cmethod , TRUE , error );
6549+ LOCAL_VAR (ip [1 ], gpointer ) = addr ;
6550+ } else {
6551+ InterpMethod * m = mono_interp_get_imethod (cmethod , error );
6552+ mono_error_assert_ok (error );
6553+ LOCAL_VAR (ip [1 ], gpointer ) = imethod_to_ftnptr (m , FALSE );
6554+ }
65486555 ip + = 3 ;
65496556 MINT_IN_BREAK ;
65506557 }
You can’t perform that action at this time.
0 commit comments