[xbuild] Evaluate Import with MSBuildThisFile* properties set.
[mono.git] / mono / mini / mini.h
index 6eef9e4929ad6086bc09df6901f8e3b68b6ab92e..52676ea76f3512c566b724c3bf7b1ad265c7508d 100644 (file)
@@ -4,6 +4,9 @@
 #include "config.h"
 #include <glib.h>
 #include <signal.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 #include <mono/metadata/loader.h>
 #include <mono/metadata/mempool.h>
 #include <mono/utils/monobitset.h>
 #include <mono/metadata/profiler-private.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-machine.h>
+#include <mono/utils/mono-stack-unwinding.h>
 
 #define MONO_BREAKPOINT_ARRAY_SIZE 64
 
-/* C type matching the size of a machine register. Not always the same as 'int' */
-/* Note that member 'p' of MonoInst must be the same type, as OP_PCONST is defined
- * as one of the OP_ICONST types, so inst_c0 must be the same as inst_p0
- */
-#if SIZEOF_REGISTER == 4
-typedef gint32 mgreg_t;
-#elif SIZEOF_REGISTER == 8
-typedef gint64 mgreg_t;
-#endif
-
 #include "mini-arch.h"
 #include "regalloc.h"
 #include "declsec.h"
@@ -48,6 +43,11 @@ typedef gint64 mgreg_t;
 #define G_MININT32 (-G_MAXINT32 - 1)
 #endif
 
+#ifndef __GNUC__
+/*#define __alignof__(a) sizeof(a)*/
+#define __alignof__(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
+#endif
+
 #if DISABLE_LOGGING
 #define MINI_DEBUG(level,limit,code)
 #else
@@ -111,7 +111,7 @@ typedef gint64 mgreg_t;
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION "71"
+#define MONO_AOT_FILE_VERSION 75
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -149,19 +149,81 @@ typedef enum {
 /* This structure is stored in the AOT file */
 typedef struct MonoAotFileInfo
 {
+       /* The version number of the AOT file format, should match MONO_AOT_FILE_VERSION */
+       guint32 version;
+       /* For alignment */
+       guint32 dummy;
+
+       /* All the pointers should be at the start to avoid alignment problems */
+
+       /* Mono's Global Offset Table */
+       gpointer got;
+       /* Compiled code for methods */
+       gpointer methods;
+       /* Mono EH Frame created by llc when using LLVM */
+       gpointer mono_eh_frame;
+       /* Data blob */
+       gpointer blob;
+       gpointer class_name_table;
+       gpointer class_info_offsets;
+       gpointer method_info_offsets;
+       gpointer ex_info_offsets;
+       gpointer code_offsets;
+       gpointer extra_method_info_offsets;
+       gpointer extra_method_table;
+       gpointer got_info_offsets;
+       gpointer methods_end;
+       gpointer unwind_info;
+       gpointer mem_end;
+       gpointer image_table;
+       /* Start of Mono's Program Linkage Table */
+       gpointer plt;
+       /* End of Mono's Program Linkage Table */
+       gpointer plt_end;
+       /* The GUID of the assembly which the AOT image was generated from */
+       gpointer assembly_guid;
+       /*
+        * The runtime version string for AOT images generated using 'bind-to-runtime-version',
+        * NULL otherwise.
+        */
+       gpointer runtime_version;
+       /* Blocks of various kinds of trampolines */
+       gpointer specific_trampolines;
+       gpointer static_rgctx_trampolines;
+       gpointer imt_thunks;
+       /*
+        * The end of LLVM generated thumb code, or NULL.
+        */
+       gpointer thumb_end;
+       /* In static mode, points to a table of global symbols for trampolines etc */
+       gpointer globals;
+       /* Points to a string containing the assembly name*/
+       gpointer assembly_name;
+
+       /* The index of the first GOT slot used by the PLT */
        guint32 plt_got_offset_base;
+       /* Number of entries in the GOT */
        guint32 got_size;
+       /* Number of entries in the PLT */
        guint32 plt_size;
+       /* Number of methods */
        guint32 nmethods;
+       /* A union of MonoAotFileFlags */
        guint32 flags;
        /* Optimization flags used to compile the module */
        guint32 opts;
        /* Index of the blob entry holding the GC used by this module */
        gint32 gc_name_index;
 
+       /* Number of trampolines */
        guint32 num_trampolines [MONO_AOT_TRAMP_NUM];
+       /* The indexes of the first GOT slots used by the trampolines */
        guint32 trampoline_got_offset_base [MONO_AOT_TRAMP_NUM];
+       /* The size of one trampoline */
        guint32 trampoline_size [MONO_AOT_TRAMP_NUM];
+
+       /* These are used for sanity checking object layout problems when cross-compiling */
+       guint32 double_align, long_align;
 } MonoAotFileInfo;
 
 /* Per-domain information maintained by the JIT */
@@ -197,50 +259,21 @@ typedef struct {
 
 #define domain_jit_info(domain) ((MonoJitDomainInfo*)((domain)->runtime_info))
 
+/* Contains a list of ips which needs to be patched when a method is compiled */
+typedef struct {
+       GSList *list;
+} MonoJumpList;
+
 /* Arch-specific */
 typedef struct {
        int dummy;
 } MonoDynCallInfo;
 
 /*
- * Possible frame types returned by the stack walker.
- */
-typedef enum {
-       /* Normal managed frames */
-       FRAME_TYPE_MANAGED = 0,
-       /* Pseudo frame marking the start of a method invocation done by the soft debugger */
-       FRAME_TYPE_DEBUGGER_INVOKE = 1,
-       /* Frame for transitioning to native code */
-       FRAME_TYPE_MANAGED_TO_NATIVE = 2,
-       FRAME_TYPE_SENTINEL = 3
-} StackFrameType;
-
-/*
- * Information about a stack frame
+ * Information about a stack frame.
+ * FIXME This typedef exists only to avoid tons of code rewriting
  */
-typedef struct {
-       StackFrameType type;
-       /* 
-        * For FRAME_TYPE_MANAGED, otherwise NULL.
-        */
-       MonoJitInfo *ji;
-       /*
-        * Same as ji->method.
-        */
-       MonoMethod *method;
-       /*
-        * If ji->method is a gshared method, this is the actual method instance.
-        */
-       MonoMethod *actual_method;
-       /* The domain containing the code executed by this frame */
-       MonoDomain *domain;
-       gboolean managed;
-       int native_offset;
-       int il_offset;
-       gpointer lmf;
-       guint32 unwind_info_len;
-       guint8 *unwind_info;
-} StackFrameInfo;
+typedef MonoStackFrameInfo StackFrameInfo;
 
 typedef struct {
        int il_offset, native_offset;
@@ -452,6 +485,8 @@ struct MonoSpillInfo {
 typedef struct {
        /* The next offset after the call instruction */
        int pc_offset;
+       /* The basic block containing the call site */
+       MonoBasicBlock *bb;
        /* 
         * The set of variables live at the call site.
         * Has length cfg->num_varinfo in bits.
@@ -730,6 +765,7 @@ struct MonoCallInst {
        regmask_t used_fregs;
        GSList *out_ireg_args;
        GSList *out_freg_args;
+       GSList *outarg_vts;
 #ifdef ENABLE_LLVM
        LLVMCallInfo *cinfo;
        int rgctx_arg_reg, imt_arg_reg;
@@ -765,6 +801,11 @@ enum {
        MONO_INST_NORANGECHECK   = 16,
        /* On loads, the source address can be null */
        MONO_INST_FAULT = 32,
+       /* 
+        * On variables, identifies LMF variables. These variables have a dummy type (int), but
+        * require stack space for a MonoLMF struct.
+        */
+       MONO_INST_LMF = 32,
        /* On loads, the source address points to a constant value */
        MONO_INST_CONSTANT_LOAD = 64,
        /* On variables, the variable needs GC tracking */
@@ -912,11 +953,17 @@ typedef struct {
        /* Stores state needed by handler block with a guard */
        MonoContext     ex_ctx;
        ResumeState resume_state;
-       /* handle block return address */
+
+       /*Variabled use to implement handler blocks (finally/catch/etc) guards during interruption*/
+       /* handler block return address */
        gpointer handler_block_return_address;
-       /* handler block been guarded */
+
+       /* handler block been guarded. It's safe to store this even for dynamic methods since there
+       is an activation on stack making sure it will remain alive.*/
        MonoJitExceptionInfo *handler_block;
 
+       /* context to be used by the guard trampoline when resuming interruption.*/
+       MonoContext handler_block_context;
        /* 
         * Stores the state at the exception throw site to be used by mono_stack_walk ()
         * when it is called from profiler functions during exception handling.
@@ -1056,13 +1103,8 @@ enum {
 
 #define vreg_is_volatile(cfg, vreg) (G_UNLIKELY (get_vreg_to_inst ((cfg), (vreg)) && (get_vreg_to_inst ((cfg), (vreg))->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT))))
 
-#ifdef HAVE_SGEN_GC
 #define vreg_is_ref(cfg, vreg) ((vreg) < (cfg)->vreg_is_ref_len ? (cfg)->vreg_is_ref [(vreg)] : 0)
 #define vreg_is_mp(cfg, vreg) ((vreg) < (cfg)->vreg_is_mp_len ? (cfg)->vreg_is_mp [(vreg)] : 0)
-#else
-#define vreg_is_ref(cfg, vreg) FALSE
-#define vreg_is_mp(cfg, vreg) FALSE
-#endif
 
 /*
  * Control Flow Graph and compilation unit information
@@ -1306,6 +1348,13 @@ typedef struct {
 
        /* Points to a MonoCompileGC */
        gpointer gc_info;
+
+       /*
+        * The encoded GC map along with its size. This contains binary data so it can be saved in an AOT
+        * image etc, but it requires a 4 byte alignment.
+        */
+       guint8 *gc_map;
+       guint32 gc_map_size;
 } MonoCompile;
 
 typedef enum {
@@ -1420,7 +1469,7 @@ enum {
 #endif
 
 /* Opcodes to load/store regsize quantities */
-#ifdef __mono_ilp32__
+#if defined (__mono_ilp32__)
 #define OP_LOADR_MEMBASE OP_LOADI8_MEMBASE
 #define OP_STORER_MEMBASE_REG OP_STOREI8_MEMBASE_REG
 #else
@@ -1499,6 +1548,7 @@ typedef struct {
        gboolean mdb_optimizations;
        gboolean no_gdb_backtrace;
        gboolean suspend_on_sigsegv;
+       gboolean suspend_on_unhandled;
        gboolean dyn_runtime_invoke;
        gboolean gdb;
        gboolean gen_seq_points;
@@ -1650,7 +1700,7 @@ guint     mono_type_to_store_membase        (MonoCompile *cfg, MonoType *type) M
 guint     mini_type_to_stind                (MonoCompile* cfg, MonoType *type) MONO_INTERNAL;
 guint32   mono_reverse_branch_op            (guint32 opcode) MONO_INTERNAL;
 void      mono_disassemble_code             (MonoCompile *cfg, guint8 *code, int size, char *id) MONO_INTERNAL;
-void      mono_add_patch_info               (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target) MONO_INTERNAL;
+void      mono_add_patch_info               (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target) MONO_LLVM_INTERNAL;
 void      mono_remove_patch_info            (MonoCompile *cfg, int ip) MONO_INTERNAL;
 MonoJumpInfo* mono_patch_info_dup_mp        (MonoMemPool *mp, MonoJumpInfo *patch_info) MONO_INTERNAL;
 guint     mono_patch_info_hash (gconstpointer data) MONO_INTERNAL;
@@ -1706,6 +1756,7 @@ void      mono_linterval_split              (MonoCompile *cfg, MonoLiveInterval
 void      mono_liveness_handle_exception_clauses (MonoCompile *cfg) MONO_INTERNAL;
 
 /* Native Client functions */
+gpointer mono_realloc_native_code(MonoCompile *cfg);
 #ifdef __native_client_codegen__
 void mono_nacl_align_inst(guint8 **pcode, int instlen);
 void mono_nacl_align_call(guint8 **start, guint8 **pcode);
@@ -1716,6 +1767,18 @@ void mono_nacl_fix_patches(const guint8 *code, MonoJumpInfo *ji);
 guint8 *mono_arch_nacl_pad(guint8 *code, int pad);
 guint8 *mono_arch_nacl_skip_nops(guint8 *code);
 
+extern const guint kNaClAlignment;
+extern const guint kNaClAlignmentMask;
+#endif
+
+#if defined(__native_client__) || defined(__native_client_codegen__)
+void mono_nacl_gc();
+#endif
+
+#if defined(__native_client_codegen__) || defined(__native_client__)
+#define NACL_SIZE(a, b) (b)
+#else
+#define NACL_SIZE(a, b) (a)
 #endif
 
 /* AOT */
@@ -1824,9 +1887,11 @@ char*             mono_get_rgctx_fetch_trampoline_name (int slot) MONO_INTERNAL;
 
 gboolean          mono_running_on_valgrind (void) MONO_INTERNAL;
 void*             mono_global_codeman_reserve (int size) MONO_INTERNAL;
+void*             nacl_global_codeman_get_dest(void *data) MONO_INTERNAL;
+void              mono_global_codeman_commit(void *data, int size, int newsize) MONO_INTERNAL;
+void              nacl_global_codeman_validate(guint8 **buf_base, int buf_size, guint8 **code_end) MONO_INTERNAL;
 const char       *mono_regname_full (int reg, int bank) MONO_INTERNAL;
-gint32*           mono_allocate_stack_slots_full (MonoCompile *cfg, gboolean backward, guint32 *stack_size, guint32 *stack_align) MONO_INTERNAL;
-gint32*           mono_allocate_stack_slots (MonoCompile *cfg, guint32 *stack_size, guint32 *stack_align) MONO_INTERNAL;
+gint32*           mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_size, guint32 *stack_align) MONO_INTERNAL;
 void              mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb) MONO_INTERNAL;
 MonoInst         *mono_branch_optimize_exception_target (MonoCompile *cfg, MonoBasicBlock *bb, const char * exname) MONO_INTERNAL;
 void              mono_remove_critical_edges (MonoCompile *cfg) MONO_INTERNAL;
@@ -1871,6 +1936,7 @@ void     *mono_arch_instrument_epilog           (MonoCompile *cfg, void *func, v
 void     *mono_arch_instrument_epilog_full     (MonoCompile *cfg, void *func, void *p, gboolean enable_arguments, gboolean preserve_argument_registers) MONO_INTERNAL;
 void      mono_codegen                          (MonoCompile *cfg) MONO_INTERNAL;
 void      mono_call_inst_add_outarg_reg         (MonoCompile *cfg, MonoCallInst *call, int vreg, int hreg, int bank) MONO_LLVM_INTERNAL;
+void      mono_call_inst_add_outarg_vt          (MonoCompile *cfg, MonoCallInst *call, MonoInst *outarg_vt) MONO_INTERNAL;
 const char *mono_arch_regname                   (int reg) MONO_INTERNAL;
 const char *mono_arch_fregname                  (int reg) MONO_INTERNAL;
 void      mono_arch_exceptions_init             (void) MONO_INTERNAL;
@@ -1886,7 +1952,7 @@ GList    *mono_arch_get_global_fp_regs          (MonoCompile *cfg) MONO_INTERNAL
 GList    *mono_arch_get_iregs_clobbered_by_call (MonoCallInst *call) MONO_INTERNAL;
 GList    *mono_arch_get_fregs_clobbered_by_call (MonoCallInst *call) MONO_INTERNAL;
 guint32   mono_arch_regalloc_cost               (MonoCompile *cfg, MonoMethodVar *vmv) MONO_INTERNAL;
-void      mono_arch_patch_code                  (MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors) MONO_INTERNAL;
+void      mono_arch_patch_code                  (MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, MonoCodeManager *dyn_code_mp, gboolean run_cctors) MONO_INTERNAL;
 void      mono_arch_flush_icache                (guint8 *code, gint size) MONO_INTERNAL;
 int       mono_arch_max_epilog_size             (MonoCompile *cfg) MONO_INTERNAL;
 guint8   *mono_arch_emit_prolog                 (MonoCompile *cfg) MONO_INTERNAL;
@@ -1896,7 +1962,6 @@ void      mono_arch_lowering_pass               (MonoCompile *cfg, MonoBasicBloc
 void      mono_arch_peephole_pass_1             (MonoCompile *cfg, MonoBasicBlock *bb) MONO_INTERNAL;
 void      mono_arch_peephole_pass_2             (MonoCompile *cfg, MonoBasicBlock *bb) MONO_INTERNAL;
 void      mono_arch_output_basic_block          (MonoCompile *cfg, MonoBasicBlock *bb) MONO_INTERNAL;
-gboolean  mono_arch_has_unwind_info             (gconstpointer addr) MONO_INTERNAL;
 void      mono_arch_setup_jit_tls_data          (MonoJitTlsData *tls) MONO_INTERNAL;
 void      mono_arch_free_jit_tls_data           (MonoJitTlsData *tls) MONO_INTERNAL;
 void      mono_arch_fill_argument_info          (MonoCompile *cfg) MONO_INTERNAL;
@@ -1952,6 +2017,7 @@ gpointer  mono_arch_get_throw_pending_exception (MonoTrampInfo **info, gboolean
 gboolean mono_arch_handle_exception             (void *sigctx, gpointer obj, gboolean test_only) MONO_INTERNAL;
 void     mono_arch_handle_altstack_exception    (void *sigctx, gpointer fault_addr, gboolean stack_ovf) MONO_INTERNAL;
 gboolean mono_handle_soft_stack_ovf             (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx, guint8* fault_addr) MONO_INTERNAL;
+void     mono_handle_hard_stack_ovf             (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx, guint8* fault_addr) MONO_INTERNAL;
 gpointer mono_arch_ip_from_context              (void *sigctx) MONO_INTERNAL;
 void     mono_arch_sigctx_to_monoctx            (void *sigctx, MonoContext *ctx) MONO_INTERNAL;
 void     mono_arch_monoctx_to_sigctx            (MonoContext *mctx, void *ctx) MONO_INTERNAL;
@@ -1993,7 +2059,6 @@ gpointer mono_create_handler_block_trampoline (void) MONO_INTERNAL;
 gboolean mono_install_handler_block_guard (MonoInternalThread *thread, MonoContext *ctx) MONO_INTERNAL;
 
 /* Exception handling */
-
 typedef gboolean (*MonoJitStackWalk)            (StackFrameInfo *frame, MonoContext *ctx, gpointer data);
 
 void     mono_exceptions_init                   (void) MONO_INTERNAL;
@@ -2002,9 +2067,13 @@ gboolean mono_handle_exception                  (MonoContext *ctx, gpointer obj,
 void     mono_handle_native_sigsegv             (int signal, void *sigctx) MONO_INTERNAL;
 void     mono_print_thread_dump                 (void *sigctx);
 void     mono_print_thread_dump_from_ctx        (MonoContext *ctx);
-void     mono_jit_walk_stack                    (MonoStackWalk func, gboolean do_il_offset, gpointer user_data) MONO_INTERNAL;
-void     mono_jit_walk_stack_from_ctx           (MonoStackWalk func, MonoContext *ctx, gboolean do_il_offset, gpointer user_data) MONO_INTERNAL;
-void     mono_walk_stack                        (MonoJitStackWalk func, MonoDomain *domain, MonoContext *start_ctx, gboolean do_il_offset, MonoInternalThread *thread, MonoLMF *lmf, gpointer user_data) MONO_INTERNAL;
+void     mono_walk_stack_with_ctx               (MonoJitStackWalk func, MonoContext *start_ctx, MonoUnwindOptions unwind_options, void *user_data) MONO_INTERNAL;
+void     mono_walk_stack_with_state             (MonoJitStackWalk func, MonoThreadUnwindState *state, MonoUnwindOptions unwind_options, void *user_data) MONO_INTERNAL;
+void     mono_walk_stack                        (MonoJitStackWalk func, MonoUnwindOptions options, void *user_data) MONO_INTERNAL;
+gboolean mono_thread_state_init_from_sigctx     (MonoThreadUnwindState *ctx, void *sigctx) MONO_INTERNAL;
+gboolean mono_thread_state_init_from_current    (MonoThreadUnwindState *ctx) MONO_INTERNAL;
+gboolean mono_thread_state_init_from_monoctx    (MonoThreadUnwindState *ctx, MonoContext *mctx) MONO_INTERNAL;
+
 void     mono_setup_altstack                    (MonoJitTlsData *tls) MONO_INTERNAL;
 void     mono_free_altstack                     (MonoJitTlsData *tls) MONO_INTERNAL;
 gpointer mono_altstack_restore_prot             (mgreg_t *regs, guint8 *code, gpointer *tramp_data, guint8* tramp) MONO_INTERNAL;
@@ -2033,6 +2102,7 @@ MonoBoolean ves_icall_get_frame_info            (gint32 skip, MonoBoolean need_f
                                                 gint32 *iloffset, gint32 *native_offset,
                                                 MonoString **file, gint32 *line, gint32 *column) MONO_INTERNAL;
 MonoString *ves_icall_System_Exception_get_trace (MonoException *exc) MONO_INTERNAL;
+void mono_set_cast_details                      (MonoClass *from, MonoClass *to) MONO_INTERNAL;
 
 /* Dominator/SSA methods */
 void        mono_compile_dominator_info         (MonoCompile *cfg, int dom_flags) MONO_INTERNAL;
@@ -2133,6 +2203,9 @@ mono_method_lookup_or_register_other_info (MonoMethod *method, gboolean in_mrgct
 MonoGenericContext
 mono_method_construct_object_context (MonoMethod *method) MONO_INTERNAL;
 
+MonoMethod*
+mono_method_get_declaring_generic_method (MonoMethod *method) MONO_INTERNAL;
+
 int
 mono_generic_context_check_used (MonoGenericContext *context) MONO_INTERNAL;
 
@@ -2188,6 +2261,8 @@ guint mono_type_to_regmove (MonoCompile *cfg, MonoType *type) MONO_INTERNAL;
 void mono_cfg_add_try_hole (MonoCompile *cfg, MonoExceptionClause *clause, guint8 *start, MonoBasicBlock *bb) MONO_INTERNAL;
 
 void mono_cfg_set_exception (MonoCompile *cfg, int type) MONO_INTERNAL;
+gboolean mini_type_is_reference (MonoCompile *cfg, MonoType *type) MONO_INTERNAL;
+
 
 /* wapihandles.c */
 int mini_wapi_hps (int argc, char **argv) MONO_INTERNAL;
@@ -2301,7 +2376,7 @@ gboolean mono_gdb_render_native_backtraces (void) MONO_INTERNAL;
 #define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, siginfo_t *info, void *context)
 #define SIG_HANDLER_PARAMS _dummy, info, context
 #elif defined(HOST_WIN32)
-#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, EXCEPTION_RECORD *info, void *context)
+#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, EXCEPTION_POINTERS *info, void *context)
 #define SIG_HANDLER_PARAMS _dummy, info, context
 #elif defined(__HAIKU__)
 #define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, void *userData, vregs regs)
@@ -2324,6 +2399,7 @@ enum {
        MONO_AOT_WRAPPER_ELEMENT_ADDR,
        MONO_AOT_WRAPPER_PTR_TO_STRUCTURE,
        MONO_AOT_WRAPPER_STRUCTURE_TO_PTR,
+       MONO_AOT_WRAPPER_CASTCLASS_WITH_CACHE,
        MONO_AOT_WRAPPER_LAST
 };