* Exception.cs: Cosmetic change to default exception message on
[mono.git] / mono / mini / mini.h
index 6e0ab2f1f120c2cbd8b335124391bdf94e100d06..3eb5926b0adca037a428ccbb8885f63b30db2ddf 100644 (file)
@@ -18,6 +18,8 @@
 #include <mono/metadata/debug-helpers.h>
 #include <mono/utils/mono-compiler.h>
 
+#define MONO_BREAKPOINT_ARRAY_SIZE 64
+
 #include "mini-arch.h"
 #include "regalloc.h"
 #include "declsec.h"
@@ -50,6 +52,9 @@
 #define inst_ls_word data.op[MINI_LS_WORD_IDX].const_val
 #define inst_ms_word data.op[MINI_MS_WORD_IDX].const_val
 
+#define MONO_FAKE_IMT_METHOD ((MonoMethod*)GINT_TO_POINTER(-1))
+#define MONO_FAKE_VTABLE_METHOD ((MonoMethod*)GINT_TO_POINTER(-2))
+
 /* Version number of the AOT file format */
 #define MONO_AOT_FILE_VERSION "32"
 
@@ -530,6 +535,14 @@ enum {
 
 #define MONO_BBLOCK_IS_IN_REGION(bblock, regtype) (((bblock)->region & (0xf << 4)) == (regtype))
 
+/*
+ * Will contain information on the generic type arguments in the
+ * future.  For now, all arguments are always reference types.
+ */
+typedef struct {
+       int dummy;
+} MonoGenericSharingContext;
+
 /*
  * Control Flow Graph and compilation unit information
  */
@@ -582,6 +595,8 @@ typedef struct {
        
        MonoDomain      *domain;
 
+       MonoGenericSharingContext *generic_sharing_context;
+
        unsigned char   *cil_start;
        unsigned char   *native_code;
        guint            code_size;
@@ -608,7 +623,6 @@ 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;
@@ -1022,6 +1036,7 @@ gboolean mono_arch_is_int_overflow              (void *sigctx, void *info) MONO_
 void     mono_arch_invalidate_method            (MonoJitInfo *ji, void *func, gpointer func_arg) MONO_INTERNAL;
 guint32  mono_arch_get_patch_offset             (guint8 *code) MONO_INTERNAL;
 gpointer*mono_arch_get_vcall_slot_addr          (guint8* code, gpointer *regs) MONO_INTERNAL;
+gpointer mono_arch_get_vcall_slot               (guint8 *code, gpointer *regs, int *displacement) MONO_INTERNAL;
 gpointer*mono_arch_get_delegate_method_ptr_addr (guint8* code, gpointer *regs) MONO_INTERNAL;
 void     mono_arch_create_vars                  (MonoCompile *cfg) MONO_INTERNAL;
 void     mono_arch_save_unwind_info             (MonoCompile *cfg) MONO_INTERNAL;
@@ -1087,6 +1102,10 @@ void      mono_debug_add_icall_wrapper          (MonoMethod *method, MonoJitICal
 void      mono_debug_print_vars                 (gpointer ip, gboolean only_arguments);
 void      mono_debugger_run_finally             (MonoContext *start_ctx);
 
+extern gssize mono_breakpoint_info_index [MONO_BREAKPOINT_ARRAY_SIZE];
+
+gboolean mono_breakpoint_clean_code (guint8 *code, guint8 *buf, int size);
+
 /* Mono Debugger support */
 void      mono_debugger_init                    (void);
 int       mono_debugger_main                    (MonoDomain *domain, MonoAssembly *assembly, int argc, char **argv);
@@ -1122,5 +1141,8 @@ gboolean mono_method_is_generic_sharable_impl (MonoMethod *method) MONO_INTERNAL
 
 MonoGenericContext* mono_make_shared_context (MonoCompile *cfg, MonoGenericContext *context) MONO_INTERNAL;
 
+MonoType* mini_get_basic_type_from_generic (MonoGenericSharingContext *gsctx, MonoType *type) MONO_INTERNAL;
+
+int mini_type_stack_size (MonoGenericSharingContext *gsctx, MonoType *t, int *align) MONO_INTERNAL;
 
 #endif /* __MONO_MINI_H__ */