Merge pull request #1222 from LogosBible/uri-trycreate
[mono.git] / mono / mini / mini.h
index 4f57200d16d3c902f55e050f1b9c8e584e4e51f5..11b446709a9d72e8bb7228c4abbc64f26038e79d 100644 (file)
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 110
+#define MONO_AOT_FILE_VERSION 115
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -482,7 +482,6 @@ extern gboolean mono_break_on_exc;
 extern int mono_exc_esp_offset;
 extern gboolean mono_compile_aot;
 extern gboolean mono_aot_only;
-extern gboolean mono_use_imt;
 extern MonoMethodDesc *mono_inject_async_exc_method;
 extern int mono_inject_async_exc_pos;
 extern MonoMethodDesc *mono_break_at_bb_method;
@@ -1123,6 +1122,14 @@ typedef enum {
        /* The address of Nullable<T>.Box () */
        MONO_RGCTX_INFO_NULLABLE_CLASS_BOX,
        MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX,
+       /* MONO_PATCH_INFO_VCALL_METHOD */
+       MONO_RGCTX_INFO_VIRT_METHOD_CODE,
+       /*
+        * MONO_PATCH_INFO_VCALL_METHOD
+        * Same as MONO_RGCTX_INFO_CLASS_BOX_TYPE, but for the class
+        * which implements the method.
+        */
+       MONO_RGCTX_INFO_VIRT_METHOD_BOX_TYPE
 } MonoRgctxInfoType;
 
 typedef struct _MonoRuntimeGenericContextInfoTemplate {
@@ -1216,6 +1223,17 @@ typedef struct MonoJumpInfoImtTramp {
 
 typedef struct MonoJumpInfoGSharedVtCall MonoJumpInfoGSharedVtCall;
 
+/*
+ * Represents the method which is called when a virtual call is made to METHOD
+ * on a receiver of type KLASS.
+ */
+typedef struct {
+       /* Receiver class */
+       MonoClass *klass;
+       /* Virtual method */
+       MonoMethod *method;
+} MonoJumpInfoVirtMethod;
+
 typedef struct MonoJumpInfo MonoJumpInfo;
 struct MonoJumpInfo {
        MonoJumpInfo *next;
@@ -1252,10 +1270,16 @@ struct MonoJumpInfo {
                MonoGSharedVtMethodInfo *gsharedvt_method;
                MonoMethodSignature *sig;
                MonoDelegateClassMethodPair *del_tramp;
+               /* MONO_PATCH_INFO_VIRT_METHOD */
+               MonoJumpInfoVirtMethod *virt_method;
        } data;
 };
  
-/* Contains information describing an rgctx entry */
+/*
+ * Contains information for computing the
+ * property given by INFO_TYPE of the runtime
+ * object described by DATA.
+ */
 struct MonoJumpInfoRgctxEntry {
        MonoMethod *method;
        gboolean in_mrgctx;
@@ -1518,7 +1542,7 @@ typedef struct {
        guint            keep_cil_nops : 1;
        guint            gen_seq_points : 1;
        /* Generate seq points for use by the debugger */
-       guint            gen_seq_points_debug_data : 1;
+       guint            gen_sdb_seq_points : 1;
        guint            explicit_null_checks : 1;
        guint            compute_gc_maps : 1;
        guint            soft_breakpoints : 1;
@@ -1541,6 +1565,8 @@ typedef struct {
        GHashTable       *token_info_hash;
        MonoCompileArch  arch;
        guint32          inline_depth;
+       /* Size of memory reserved for thunks */
+       int              thunk_area;
        guint32          exception_type;        /* MONO_EXCEPTION_* */
        guint32          exception_data;
        char*            exception_message;
@@ -1884,7 +1910,7 @@ typedef struct {
         * Whenever data such as next sequence points and flags is required.
         * Next sequence points and flags are required by the debugger agent.
         */
-       gboolean gen_seq_points_debug_data;
+       gboolean gen_sdb_seq_points;
        gboolean gen_seq_points_compact_data;
        gboolean explicit_null_checks;
        /*
@@ -2614,6 +2640,7 @@ void     mono_setup_altstack                    (MonoJitTlsData *tls);
 void     mono_free_altstack                     (MonoJitTlsData *tls);
 gpointer mono_altstack_restore_prot             (mgreg_t *regs, guint8 *code, gpointer *tramp_data, guint8* tramp);
 MonoJitInfo* mini_jit_info_table_find           (MonoDomain *domain, char *addr, MonoDomain **out_domain);
+MonoJitInfo* mini_jit_info_table_find_ext       (MonoDomain *domain, char *addr, gboolean allow_trampolines, MonoDomain **out_domain);
 void     mono_resume_unwind                     (MonoContext *ctx) MONO_LLVM_INTERNAL;
 
 MonoJitInfo * mono_find_jit_info                (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *res, MonoJitInfo *prev_ji, MonoContext *ctx, MonoContext *new_ctx, char **trace, MonoLMF **lmf, int *native_offset, gboolean *managed);
@@ -2784,6 +2811,9 @@ mini_class_is_generic_sharable (MonoClass *klass);
 gboolean
 mono_is_partially_sharable_inst (MonoGenericInst *inst);
 
+gboolean
+mini_is_gsharedvt_gparam (MonoType *t);
+
 MonoGenericSharingContext* mono_get_generic_context_from_code (guint8 *code);
 
 MonoGenericContext* mini_method_get_context (MonoMethod *method);