Author: lupus
Date: 2006-03-21 10:00:40 -0500 (Tue, 21 Mar 2006)
New Revision: 58220

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/declsec.c
   trunk/mono/mono/mini/mini-exceptions.c
Log:


Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>

        * declsec.c, mini-exceptions.c: use write barrier to set reference
        fields of managed objects.



Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog      2006-03-21 14:59:26 UTC (rev 58219)
+++ trunk/mono/mono/mini/ChangeLog      2006-03-21 15:00:40 UTC (rev 58220)
@@ -1,3 +1,9 @@
+
+Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+       * declsec.c, mini-exceptions.c: use write barrier to set reference
+       fields of managed objects.
+
 2006-03-19  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.

Modified: trunk/mono/mono/mini/declsec.c
===================================================================
--- trunk/mono/mono/mini/declsec.c      2006-03-21 14:59:26 UTC (rev 58219)
+++ trunk/mono/mono/mini/declsec.c      2006-03-21 15:00:40 UTC (rev 58220)
@@ -70,8 +70,8 @@
                jinfo->cas_inited = TRUE;
        }
 
-       frame->method = mono_method_get_object (domain, jinfo->method, NULL);
-       frame->domain = domain->domain;
+       MONO_OBJECT_SETREF (frame, method, mono_method_get_object (domain, 
jinfo->method, NULL));
+       MONO_OBJECT_SETREF (frame, domain, domain->domain);
 
        /* stack modifiers on methods have priority on (i.e. replaces) 
modifiers on class */
 

Modified: trunk/mono/mono/mini/mini-exceptions.c
===================================================================
--- trunk/mono/mono/mini/mini-exceptions.c      2006-03-21 14:59:26 UTC (rev 
58219)
+++ trunk/mono/mono/mini/mini-exceptions.c      2006-03-21 15:00:40 UTC (rev 
58220)
@@ -215,11 +215,11 @@
 
                        sf->method = NULL;
                        s = mono_method_full_name (ji->method, TRUE);
-                       sf->internal_method_name = mono_string_new (domain, s);
+                       MONO_OBJECT_SETREF (sf, internal_method_name, 
mono_string_new (domain, s));
                        g_free (s);
                }
                else
-                       sf->method = mono_method_get_object (domain, 
ji->method, NULL);
+                       MONO_OBJECT_SETREF (sf, method, mono_method_get_object 
(domain, ji->method, NULL));
                sf->native_offset = (char *)ip - (char *)ji->code_start;
 
                sf->il_offset = mono_debug_il_offset_from_address (ji->method, 
sf->native_offset, domain);
@@ -229,7 +229,10 @@
                        
                        filename = mono_debug_source_location_from_address 
(ji->method, sf->native_offset, &sf->line, domain);
 
-                       sf->filename = filename? mono_string_new (domain, 
filename): NULL;
+                       if (filename)
+                               MONO_OBJECT_SETREF (sf, filename, 
mono_string_new (domain, filename));
+                       else
+                               sf->filename = NULL;
                        sf->column = 0;
 
                        g_free (filename);
@@ -598,7 +601,7 @@
        g_assert (ctx != NULL);
        if (!obj) {
                MonoException *ex = mono_get_exception_null_reference ();
-               ex->message = mono_string_new (domain, "Object reference not 
set to an instance of an object");
+               MONO_OBJECT_SETREF (ex, message, mono_string_new (domain, 
"Object reference not set to an instance of an object"));
                obj = (MonoObject *)ex;
        } 
 
@@ -742,10 +745,10 @@
                                                        if (test_only) {
                                                                if (mono_ex && 
!initial_trace_ips) {
                                                                        
trace_ips = g_list_reverse (trace_ips);
-                                                                       
mono_ex->trace_ips = glist_to_array (trace_ips, mono_defaults.int_class);
+                                                                       
MONO_OBJECT_SETREF (mono_ex, trace_ips, glist_to_array (trace_ips, 
mono_defaults.int_class));
                                                                        if 
(has_dynamic_methods)
                                                                                
/* These methods could go away anytime, so compute the stack trace now */
-                                                                               
mono_ex->stack_trace = ves_icall_System_Exception_get_trace (mono_ex);
+                                                                               
MONO_OBJECT_SETREF (mono_ex, stack_trace, ves_icall_System_Exception_get_trace 
(mono_ex));
                                                                }
                                                                g_list_free 
(trace_ips);
 
@@ -802,10 +805,10 @@
                        } else {
                                if (mono_ex && !initial_trace_ips) {
                                        trace_ips = g_list_reverse (trace_ips);
-                                       mono_ex->trace_ips = glist_to_array 
(trace_ips, mono_defaults.int_class);
+                                       MONO_OBJECT_SETREF (mono_ex, trace_ips, 
glist_to_array (trace_ips, mono_defaults.int_class));
                                        if (has_dynamic_methods)
                                                /* These methods could go away 
anytime, so compute the stack trace now */
-                                               mono_ex->stack_trace = 
ves_icall_System_Exception_get_trace (mono_ex);
+                                               MONO_OBJECT_SETREF (mono_ex, 
stack_trace, ves_icall_System_Exception_get_trace (mono_ex));
                                }
                                g_list_free (trace_ips);
                                return FALSE;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to