2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Thu, 17 Feb 2005 16:23:59 +0000 (16:23 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Thu, 17 Feb 2005 16:23:59 +0000 (16:23 -0000)
* mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
it can be reused for MonoClass.
* mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
_LINKDEMAND.

svn path=/trunk/mono/; revision=40812

mono/mini/ChangeLog
mono/mini/mini.c
mono/mini/mini.h

index fc8e12b58f8c117c47b9e3a6ab39c2cb6b0d41a2..eee295b062a175e917f5aecbd872751676d31817 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
+       * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
+       it can be reused for MonoClass.
+       * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
+       _LINKDEMAND.
+
 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
 
        * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
index 84b693d852fb800b6e1849e9edc67e06969f2cc3..1699501d6888d19eed14d1710099ab4c757a1ab5 100644 (file)
@@ -3115,7 +3115,7 @@ void check_linkdemand (MonoCompile *cfg, MonoMethod *caller, MonoMethod *callee,
                mono_emit_method_call_spilled (cfg, bblock, secman->linkdemandsecurityexception, mono_method_signature (secman->linkdemandsecurityexception), args, ip, NULL);
        } else if (cfg->exception_type == MONO_EXCEPTION_NONE) {
                 /* don't hide previous results */
-               cfg->exception_type = MONO_EXCEPTION_SECURITY;
+               cfg->exception_type = MONO_EXCEPTION_SECURITY_LINKDEMAND;
                cfg->exception_data = result;
        }
 }
@@ -9106,7 +9106,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                mono_profiler_method_end_jit (method, MONO_PROFILE_OK);
 
        /* this can only be set if the security manager is active */
-       if (cfg->exception_type == MONO_EXCEPTION_SECURITY) {
+       if (cfg->exception_type == MONO_EXCEPTION_SECURITY_LINKDEMAND) {
                MonoAssembly *assembly = mono_image_get_assembly (method->klass->image);
                MonoReflectionAssembly *refass = (MonoReflectionAssembly*) mono_assembly_get_object (domain, assembly);
                MonoReflectionMethod *refmet = mono_method_get_object (domain, method, NULL);
index 58b1b4650a8b662ca5c55669046e381aecd293c7..966136731e8fc7c7058c47e22acb1d965d57bcab 100644 (file)
@@ -500,12 +500,6 @@ enum {
 
 #define MONO_BBLOCK_IS_IN_REGION(bblock, regtype) (((bblock)->region & (0xf << 4)) == (regtype))
 
-enum {
-       MONO_EXCEPTION_NONE = 0,
-       MONO_EXCEPTION_SECURITY = 1
-       /* add other exception type */
-};
-
 /*
  * Control Flow Graph and compilation unit information
  */