typedef struct {
MonoMethod *method;
- /* Array of MonoRuntimeGenericContextInfoTemplate* entries */
- GPtrArray *entries;
+ MonoRuntimeGenericContextInfoTemplate *entries;
+ int num_entries, count_entries;
} MonoGSharedVtMethodInfo;
/* This is used by gsharedvt methods to allocate locals and compute local offsets */
MONO_OPT_LAST
};
+/* Flags for mini_method_compile () */
+typedef enum {
+ /* Whenever to run cctors during JITting */
+ JIT_FLAG_RUN_CCTORS = (1 << 0),
+ /* Whenever this is an AOT compilation */
+ JIT_FLAG_AOT = (1 << 1),
+ /* Whenever this is a full AOT compilation */
+ JIT_FLAG_FULL_AOT = (1 << 2)
+} JitFlags;
+
/* Bit-fields in the MonoBasicBlock.region */
#define MONO_REGION_TRY 0
#define MONO_REGION_FINALLY 16
MonoGenericSharingContext *generic_sharing_context;
MonoGenericSharingContext gsctx;
+ MonoGenericContext *gsctx_context;
gboolean gsharedvt;
guint run_cctors : 1;
guint need_lmf_area : 1;
guint compile_aot : 1;
+ guint full_aot : 1;
guint compile_llvm : 1;
guint got_var_allocated : 1;
guint ret_var_is_local : 1;
MonoLMF * mono_get_lmf (void) MONO_INTERNAL;
MonoLMF** mono_get_lmf_addr (void) MONO_INTERNAL;
void mono_set_lmf (MonoLMF *lmf) MONO_INTERNAL;
+MonoJitTlsData* mono_get_jit_tls (void) MONO_INTERNAL;
MONO_API MonoDomain *mono_jit_thread_attach (MonoDomain *domain);
MONO_API void mono_jit_set_domain (MonoDomain *domain);
MonoNativeTlsKey mono_get_jit_tls_key (void) MONO_INTERNAL;
void mono_global_regalloc (MonoCompile *cfg) MONO_INTERNAL;
void mono_create_jump_table (MonoCompile *cfg, MonoInst *label, MonoBasicBlock **bbs, int num_blocks) MONO_INTERNAL;
int mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options) MONO_INTERNAL;
-MonoCompile *mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gboolean run_cctors, gboolean compile_aot, int parts) MONO_INTERNAL;
+MonoCompile *mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFlags flags, int parts) MONO_INTERNAL;
void mono_destroy_compile (MonoCompile *cfg) MONO_INTERNAL;
MonoJitICallInfo *mono_find_jit_opcode_emulation (int opcode) MONO_INTERNAL;
void mono_print_ins_index (int i, MonoInst *ins) MONO_INTERNAL;
gpointer mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_sig, MonoMethodSignature *gsharedvt_sig, MonoGenericSharingContext *gsctx, gboolean gsharedvt_in, gint32 vcall_offset, gboolean calli) MONO_INTERNAL;
gboolean mono_arch_opcode_needs_emulation (MonoCompile *cfg, int opcode) MONO_INTERNAL;
-gboolean mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
+gboolean mono_arch_tail_call_supported (MonoCompile *cfg, MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
int mono_arch_translate_tls_offset (int offset) MONO_INTERNAL;
#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
/* Handle block guard */
gpointer mono_arch_install_handler_block_guard (MonoJitInfo *ji, MonoJitExceptionInfo *clause, MonoContext *ctx, gpointer new_value) MONO_INTERNAL;
-gpointer mono_arch_create_handler_block_trampoline (void) MONO_INTERNAL;
+gpointer mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_create_handler_block_trampoline (void) MONO_INTERNAL;
gboolean mono_install_handler_block_guard (MonoThreadUnwindState *ctx) MONO_INTERNAL;
typedef gboolean (*MonoExceptionFrameWalk) (MonoMethod *method, gpointer ip, size_t native_offset, gboolean managed, gpointer user_data);
gboolean mono_exception_walk_trace (MonoException *ex, MonoExceptionFrameWalk func, gpointer user_data);
void mono_restore_context (MonoContext *ctx) MONO_INTERNAL;
+guint8* mono_jinfo_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len) MONO_INTERNAL;
gboolean
mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
gboolean mini_is_gsharedvt_type (MonoCompile *cfg, MonoType *t) MONO_INTERNAL;
gboolean mini_is_gsharedvt_signature (MonoCompile *cfg, MonoMethodSignature *sig) MONO_INTERNAL;
gboolean mini_is_gsharedvt_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t) MONO_INTERNAL;
-gboolean mini_is_gsharedvt_variable_type (MonoCompile *cfg, MonoType *t) MONO_INTERNAL;
-gboolean mini_is_gsharedvt_variable_klass (MonoCompile *cfg, MonoClass *klass) MONO_INTERNAL;
+gboolean mini_is_gsharedvt_variable_type (MonoCompile *cfg, MonoType *t) MONO_LLVM_INTERNAL;
+gboolean mini_is_gsharedvt_variable_klass (MonoCompile *cfg, MonoClass *klass) MONO_LLVM_INTERNAL;
gboolean mini_is_gsharedvt_sharable_method (MonoMethod *method) MONO_INTERNAL;
gboolean mini_is_gsharedvt_variable_signature (MonoMethodSignature *sig) MONO_INTERNAL;
gboolean mini_is_gsharedvt_sharable_inst (MonoGenericInst *inst) MONO_INTERNAL;
gpointer mini_method_get_rgctx (MonoMethod *m) MONO_INTERNAL;
-void mini_init_gsctx (MonoGenericContext *context, MonoGenericSharingContext *gsctx) MONO_INTERNAL;
+void mini_init_gsctx (MonoDomain *domain, MonoMemPool *mp, MonoGenericContext *context, MonoGenericSharingContext *gsctx) MONO_INTERNAL;
gpointer mini_get_gsharedvt_wrapper (gboolean gsharedvt_in, gpointer addr, MonoMethodSignature *normal_sig, MonoMethodSignature *gsharedvt_sig, MonoGenericSharingContext *gsctx,
gint32 vcall_offset, gboolean calli) MONO_INTERNAL;
guint32 mono_arch_cpu_enumerate_simd_versions (void) MONO_INTERNAL;
void mono_simd_intrinsics_init (void) MONO_INTERNAL;
+MonoInst* mono_emit_native_types_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) MONO_INTERNAL;
+MonoType* mini_native_type_replace_type (MonoType *type) MONO_INTERNAL;
+
#ifdef __linux__
/* maybe enable also for other systems? */
#define ENABLE_JIT_MAP 1