Add gsharing support for cached casts.
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 7 Oct 2010 18:45:57 +0000 (15:45 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 7 Oct 2010 20:38:57 +0000 (17:38 -0300)
commit96e48a63f67fdd2863103aead4355ce8ced864cb
tree07f75048b9b359f39caa1aa9f009987b39fda2a5
parent5518da4d14cf668e27d5446d33fa56684017fc8d
Add gsharing support for cached casts.

* class-internals.h: Add new kind of rgctx slot.

* method-to-ir.c (handle_castclass): Emit gsharing code
for cast with caching.

* method-to-ir.c (handle_isinst):

* mini-generic-sharing.c: Implement MONO_RGCTX_INFO_CAST_CACHE
slot type. It's a 2 word domain allocated memory block with the
cache on the first word and the vtable on the second.

This design does a single rgctx fetch instead of two. It's
a bit faster and can potentialy save some slots.
mono/metadata/class-internals.h
mono/mini/method-to-ir.c
mono/mini/mini-generic-sharing.c