Add single entry cache to casts of types with variant generic arguments.
* jit-icall.c (mono_object_castclass_with_cache): Check single entry cache before calling mono_object_isinst. * jit-icall.c (mono_object_isinst_with_cache): Check single entry cache before calling mono_object_isinst. This uses a positive and negative cache as it is used for type queries quite often. * jit-icalls.h: Export new icalls. * mini.c (mini_init): Register new icalls. * method-to-ir.c: Call into cache aware version of type test ops for types with variant generic arguments. This patch replaces direct calls to mono_object_castclass mono_object_isisnt to functions that check a cache first. The cache is per managed code callsite so the hit ratio is very high.
Showing
想要评论请 注册 或 登录