Checking if a type is a reference must be gsharing aware.
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 3 Mar 2011 21:56:14 +0000 (22:56 +0100)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 3 Mar 2011 22:09:07 +0000 (23:09 +0100)
commit7a10362a4f241ce4fcad213fdcb4877175185243
tree8646babddddb51785d5b7de5f8a0198a1f71a5e0
parent8936bf96686a4a5081635868bcb6f9a449b02f73
Checking if a type is a reference must be gsharing aware.

*  mini-generic-sharing.c: Add mini_type_is_reference
that returns true for VAR and MVAR if compiling under
gsharing.

* method-to-ir.c: Replace usage of mono_type_is_reference
with mini_type_is_reference.

* mini-gc.c: Ditto.

* mini.c: Ditto.

With the old behavior, the JIT could interpret a (M)VAR
variable and not been a reference type. This is an issue
for sgen as we could forgot to emit some write barriers
or generate the proper stack map.
mono/mini/method-to-ir.c
mono/mini/mini-gc.c
mono/mini/mini-generic-sharing.c
mono/mini/mini.c
mono/mini/mini.h