X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini.h;h=6e0ab2f1f120c2cbd8b335124391bdf94e100d06;hb=ca030c24e1869ce323e8ed3d61e021c2d5c72811;hp=1fc3c4786867136927bee83a6906b20fb919767b;hpb=3c4158a4004faedc3be00b731494a76c58eb34f8;p=mono.git diff --git a/mono/mini/mini.h b/mono/mini/mini.h index 1fc3c478686..6e0ab2f1f12 100644 --- a/mono/mini/mini.h +++ b/mono/mini/mini.h @@ -15,6 +15,7 @@ #include "mono/metadata/class-internals.h" #include "mono/metadata/object-internals.h" #include +#include #include #include "mini-arch.h" @@ -38,16 +39,16 @@ /* for 32 bit systems */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN -#define MINI_LS_WORD_OFFSET 0 -#define MINI_MS_WORD_OFFSET 4 -#define inst_ls_word data.op[0].const_val -#define inst_ms_word data.op[1].const_val +#define MINI_LS_WORD_IDX 0 +#define MINI_MS_WORD_IDX 1 #else -#define MINI_LS_WORD_OFFSET 4 -#define MINI_MS_WORD_OFFSET 0 -#define inst_ls_word data.op[1].const_val -#define inst_ms_word data.op[0].const_val +#define MINI_LS_WORD_IDX 1 +#define MINI_MS_WORD_IDX 0 #endif +#define MINI_LS_WORD_OFFSET (MINI_LS_WORD_IDX * 4) +#define MINI_MS_WORD_OFFSET (MINI_MS_WORD_IDX * 4) +#define inst_ls_word data.op[MINI_LS_WORD_IDX].const_val +#define inst_ms_word data.op[MINI_MS_WORD_IDX].const_val /* Version number of the AOT file format */ #define MONO_AOT_FILE_VERSION "32" @@ -130,15 +131,8 @@ extern int mono_exc_esp_offset; #else extern gboolean mono_compile_aot; #endif - -typedef enum { - MONO_SECURITY_MODE_NONE, - MONO_SECURITY_MODE_CORE_CLR, - MONO_SECURITY_MODE_CAS, - MONO_SECURITY_MODE_SMCS_HACK -} MonoSecurityMode; - -extern MonoSecurityMode mono_security_mode; +extern MonoMethodDesc *mono_inject_async_exc_method; +extern int mono_inject_async_exc_pos; struct MonoEdge { MonoEdge *next; @@ -277,6 +271,10 @@ enum { BB_EXCEPTION_HANDLER = 1 << 4 }; +typedef struct MonoMemcpyArgs { + int size, align; +} MonoMemcpyArgs; + struct MonoInst { union { union { @@ -308,7 +306,8 @@ struct MonoInst { union { gint32 reg3; gint32 arg_info; - gint32 size; /* in OP_MEMSET and OP_MEMCPY */ + gint32 size; + MonoMemcpyArgs *memcpy_args; /* in OP_MEMSET and OP_MEMCPY */ gint shift_amount; gboolean is_pinvoke; /* for variables in the unmanaged marshal format */ gpointer data; @@ -448,6 +447,8 @@ typedef struct { MonoLMF *first_lmf; gpointer signal_stack; guint32 signal_stack_size; + gpointer stack_ovf_guard_base; + guint32 stack_ovf_guard_size; void (*abort_func) (MonoObject *object); } MonoJitTlsData; @@ -607,6 +608,7 @@ typedef struct { guint dont_verify_stack_merge : 1; guint unverifiable : 1; guint skip_visibility : 1; + guint generic_shared : 1; gpointer debug_info; guint32 lmf_offset; guint16 *intvars; @@ -827,6 +829,16 @@ enum { MONO_EXC_INTRINS_NUM }; +/* + * Flags for which contexts were used in inflating a generic. + */ +enum { + MONO_GENERIC_CONTEXT_USED_CLASS = 1, + MONO_GENERIC_CONTEXT_USED_METHOD = 2 +}; + +#define MONO_GENERIC_CONTEXT_USED_BOTH (MONO_GENERIC_CONTEXT_USED_CLASS | MONO_GENERIC_CONTEXT_USED_METHOD) + typedef void (*MonoInstFunc) (MonoInst *tree, gpointer data); /* main function */ @@ -946,6 +958,8 @@ CompRelation mono_opcode_to_cond (int opcode) MONO_INTERNAL; CompType mono_opcode_to_type (int opcode, int cmp_opcode) MONO_INTERNAL; /* methods that must be provided by the arch-specific port */ +void mono_arch_init (void) MONO_INTERNAL; +void mono_arch_cleanup (void) MONO_INTERNAL; void mono_arch_cpu_init (void) MONO_INTERNAL; guint32 mono_arch_cpu_optimizazions (guint32 *exclude_mask) MONO_INTERNAL; void mono_arch_instrument_mem_needs (MonoMethod *method, int *stack, int *code) MONO_INTERNAL; @@ -1098,4 +1112,15 @@ int mini_wapi_hps (int argc, char **argv); int mini_wapi_semdel (int argc, char **argv); int mini_wapi_seminfo (int argc, char **argv); +/* Generic sharing */ + +int mono_method_check_context_used (MonoMethod *method, MonoGenericContext *context) MONO_INTERNAL; +int mono_class_check_context_used (MonoClass *class, MonoGenericContext *context) MONO_INTERNAL; + +gboolean mono_method_is_generic_impl (MonoMethod *method) MONO_INTERNAL; +gboolean mono_method_is_generic_sharable_impl (MonoMethod *method) MONO_INTERNAL; + +MonoGenericContext* mono_make_shared_context (MonoCompile *cfg, MonoGenericContext *context) MONO_INTERNAL; + + #endif /* __MONO_MINI_H__ */