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)
6293
6293
gpointer
6294
6294
ves_icall_RuntimeMethodHandle_GetFunctionPointer (MonoMethod * method , MonoError * error )
6295
6295
{
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
+ }
6296
6301
return mono_get_runtime_callbacks ()-> get_ftnptr (method , error );
6297
6302
}
6298
6303
Original file line number Diff line number Diff line change @@ -6537,9 +6537,16 @@ MINT_IN_CASE(MINT_BRTRUE_I8_SP) ZEROP_SP(gint64, !=); MINT_IN_BREAK;
6537
6537
6538
6538
MonoMethod * cmethod = LOCAL_VAR (ip [2 ], MonoMethod * );
6539
6539
6540
- InterpMethod * m = mono_interp_get_imethod (cmethod , error );
6541
- mono_error_assert_ok (error );
6542
- LOCAL_VAR (ip [1 ], gpointer ) = imethod_to_ftnptr (m , FALSE );
6540
+ if (G_UNLIKELY (mono_method_has_unmanaged_callers_only_attribute (cmethod ))) {
6541
+ cmethod = mono_marshal_get_managed_wrapper (cmethod , NULL , (MonoGCHandle )0 , error );
6542
+ mono_error_assert_ok (error );
6543
+ gpointer addr = mini_get_interp_callbacks ()- > create_method_pointer (cmethod , TRUE , error );
6544
+ LOCAL_VAR (ip [1 ], gpointer ) = addr ;
6545
+ } else {
6546
+ InterpMethod * m = mono_interp_get_imethod (cmethod , error );
6547
+ mono_error_assert_ok (error );
6548
+ LOCAL_VAR (ip [1 ], gpointer ) = imethod_to_ftnptr (m , FALSE );
6549
+ }
6543
6550
ip + = 3 ;
6544
6551
MINT_IN_BREAK ;
6545
6552
}
You can’t perform that action at this time.
0 commit comments