2003-07-13 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Sun, 13 Jul 2003 20:24:07 +0000 (20:24 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sun, 13 Jul 2003 20:24:07 +0000 (20:24 -0000)
* interp.c: Keep alloca()-d data on a free list to prevent stack
overflow errors when valuetypes are allocated in a loop. Fixes
#27420. Is the new code still faster than using malloc/free ?

* interp.c (interp_mono_runtime_invoke): Unbox value type instances
before calling the method. Fixes appdomain2.exe.

* interp.c: Fix warnings.

* interp.c: Report unhandled exceptions correctly.

* interp.c: Implement CEE_ISINST and CEE_CASTCLASS using
mono_object_isinst. Fixes bug #45539 and reflection-enum.exe.

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

mono/interpreter/ChangeLog
mono/interpreter/interp.c

index 8792a272b966e5bfbd755298aa64904362f545c6..5dfb625591ddf5ee3ac574603d2a110c5167f078 100644 (file)
@@ -4,6 +4,9 @@
        overflow errors when valuetypes are allocated in a loop. Fixes
        #27420. Is the new code still faster than using malloc/free ?
 
+       * interp.c (interp_mono_runtime_invoke): Unbox value type instances
+       before calling the method. Fixes appdomain2.exe.
+
        * interp.c: Fix warnings.
        
        * interp.c: Report unhandled exceptions correctly.
index 485196062025b608ccd0414859bf7f8b4f79b2a0..fd3ccc7249fe39e4c2bfd27238d2081e6937c0de 100644 (file)
@@ -1220,6 +1220,10 @@ handle_enum:
                }
        }
 
+       if (method->klass->valuetype)
+               /* Unbox the instance, since valuetype methods expect an interior pointer. */
+               obj = mono_object_unbox (obj);
+
        /* chain with managed parent if any */
        parent = TlsGetValue (frame_thread_id);
        INIT_FRAME(&frame,parent,obj,args,&result,method);