}
void
-mono_throw_method_access (MonoMethod *callee, MonoMethod *caller)
+mono_throw_method_access (MonoMethod *caller, MonoMethod *callee)
{
- char *callee_name = mono_method_full_name (callee, 1);
char *caller_name = mono_method_full_name (caller, 1);
+ char *callee_name = mono_method_full_name (callee, 1);
MonoError error;
error_init (&error);
- mono_error_set_generic_error (&error, "System", "MethodAccessException", "Method `%s' is inaccessible from method `%s'\n", callee_name, caller_name);
+ mono_error_set_generic_error (&error, "System", "MethodAccessException", "Method `%s' is inaccessible from method `%s'", callee_name, caller_name);
mono_error_set_pending_exception (&error);
g_free (callee_name);
g_free (caller_name);
double mono_ckfinite (double d);
-void mono_throw_method_access (MonoMethod *callee, MonoMethod *caller);
+void mono_throw_method_access (MonoMethod *caller, MonoMethod *callee);
void mono_dummy_jit_icall (void);
static void
-emit_method_access_failure (MonoCompile *cfg, MonoMethod *method, MonoMethod *cil_method)
+emit_method_access_failure (MonoCompile *cfg, MonoMethod *caller, MonoMethod *callee)
{
MonoInst *args [16];
- args [0] = emit_get_rgctx_method (cfg, mono_method_check_context_used (method), method, MONO_RGCTX_INFO_METHOD);
- args [1] = emit_get_rgctx_method (cfg, mono_method_check_context_used (cil_method), cil_method, MONO_RGCTX_INFO_METHOD);
+ args [0] = emit_get_rgctx_method (cfg, mono_method_check_context_used (caller), caller, MONO_RGCTX_INFO_METHOD);
+ args [1] = emit_get_rgctx_method (cfg, mono_method_check_context_used (callee), callee, MONO_RGCTX_INFO_METHOD);
mono_emit_jit_icall (cfg, mono_throw_method_access, args);
}
call void Test::call_sfoo ()
br fail
} catch [mscorlib]System.MethodAccessException {
- pop
+ call instance string [mscorlib]System.MethodAccessException::get_Message ()
+ ldstr "Method `MethFail:sfoo ()' is inaccessible from method `Test:call_sfoo ()'"
+ call instance bool [mscorlib]System.String::Equals (string)
+ brfalse fail
br continue
} catch [mscorlib]System.Exception {
pop