#include "mono/metadata/class-internals.h"
#include "mono/metadata/object-internals.h"
#include <mono/metadata/profiler-private.h>
+#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-compiler.h>
#include "mini-arch.h"
/* 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"
#else
extern gboolean mono_compile_aot;
#endif
+extern MonoMethodDesc *mono_inject_async_exc_method;
+extern int mono_inject_async_exc_pos;
struct MonoEdge {
MonoEdge *next;
BB_EXCEPTION_HANDLER = 1 << 4
};
+typedef struct MonoMemcpyArgs {
+ int size, align;
+} MonoMemcpyArgs;
+
struct MonoInst {
union {
union {
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;
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;
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 */
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;
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__ */