void
mono_class_get_overrides_full (MonoImage *image, guint32 type_token, MonoMethod ***overrides, gint32 *num_overrides, MonoGenericContext *generic_context, MonoError *error);
-MonoMethod*
-mono_class_get_cctor (MonoClass *klass) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoMethod*
+mono_class_get_cctor (MonoClass *klass);
MonoMethod*
mono_class_get_finalizer (MonoClass *klass);
void
mono_loader_cleanup (void);
-void
-mono_loader_lock (void) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void
+mono_loader_lock (void);
-void
-mono_loader_unlock (void) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void
+mono_loader_unlock (void);
void
mono_loader_lock_track_ownership (gboolean track);
char *
mono_make_generic_name_string (MonoImage *image, int num);
-MonoClass *
-mono_class_load_from_name (MonoImage *image, const char* name_space, const char *name) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoClass *
+mono_class_load_from_name (MonoImage *image, const char* name_space, const char *name);
MonoClass*
mono_class_try_load_from_name (MonoImage *image, const char* name_space, const char *name);
mono_class_has_failure (const MonoClass *klass);
/* Kind specific accessors */
-MonoGenericClass*
-mono_class_get_generic_class (MonoClass *klass) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoGenericClass*
+mono_class_get_generic_class (MonoClass *klass);
MonoGenericClass*
mono_class_try_get_generic_class (MonoClass *klass);
gboolean
mono_class_init_checked (MonoClass *klass, MonoError *error);
-MonoType*
-mono_class_enum_basetype_internal (MonoClass *klass) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoType*
+mono_class_enum_basetype_internal (MonoClass *klass);
// Enum and static storage for JIT icalls.
#include "jit-icall-reg.h"
void mono_debugger_lock (void);
void mono_debugger_unlock (void);
-void
+MONO_LLVM_INTERNAL void
mono_debug_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file,
GPtrArray **source_file_list, int **source_files,
- MonoSymSeqPoint **seq_points, int *n_seq_points) MONO_LLVM_INTERNAL;
+ MonoSymSeqPoint **seq_points, int *n_seq_points);
MONO_API void
mono_debug_free_locals (MonoDebugLocalsInfo *info);
typedef MonoDomain* (*MonoLoadFunc) (const char *filename, const char *runtime_version);
-void mono_domain_lock (MonoDomain *domain) MONO_LLVM_INTERNAL;
-void mono_domain_unlock (MonoDomain *domain) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_domain_lock (MonoDomain *domain);
+MONO_LLVM_INTERNAL void mono_domain_unlock (MonoDomain *domain);
void
mono_install_runtime_load (MonoLoadFunc func);
#define mono_domain_alloc0_lock_free(domain, size) (g_cast (mono_domain_alloc0_lock_free ((domain), (size))))
-void*
-mono_domain_code_reserve (MonoDomain *domain, int size) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void*
+mono_domain_code_reserve (MonoDomain *domain, int size);
#define mono_domain_code_reserve(domain, size) (g_cast (mono_domain_code_reserve ((domain), (size))))
//
#if MONO_LLVM_LOADED
-MonoJitICallInfos*
-mono_get_jit_icall_info (void) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoJitICallInfos*
+mono_get_jit_icall_info (void);
#else
void
mono_marshal_set_wrapper_info (MonoMethod *method, WrapperInfo *info);
-WrapperInfo*
-mono_marshal_get_wrapper_info (MonoMethod *wrapper) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL WrapperInfo*
+mono_marshal_get_wrapper_info (MonoMethod *wrapper);
MonoMethod *
mono_marshal_get_delegate_begin_invoke (MonoMethod *method);
MonoMethod *
mono_marshal_get_icall_wrapper (MonoJitICallInfo *callinfo, gboolean check_exceptions);
-MonoMethod *
-mono_marshal_get_aot_init_wrapper (MonoAotInitSubtype subtype) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoMethod *
+mono_marshal_get_aot_init_wrapper (MonoAotInitSubtype subtype);
-const char *
-mono_marshal_get_aot_init_wrapper_name (MonoAotInitSubtype subtype) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL const char *
+mono_marshal_get_aot_init_wrapper_name (MonoAotInitSubtype subtype);
-MonoMethod *
-mono_marshal_get_llvm_func_wrapper (MonoLLVMFuncWrapperSubtype subtype) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoMethod *
+mono_marshal_get_llvm_func_wrapper (MonoLLVMFuncWrapperSubtype subtype);
MonoMethod *
mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, gboolean aot);
MONO_API void
mono_win32_compat_ZeroMemory (gpointer dest, gsize length);
-void
-mono_marshal_find_nonzero_bit_offset (guint8 *buf, int len, int *byte_offset, guint8 *bitmask) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void
+mono_marshal_find_nonzero_bit_offset (guint8 *buf, int len, int *byte_offset, guint8 *bitmask);
MonoMethodSignature*
mono_signature_no_pinvoke (MonoMethod *method);
mono_debug_lookup_method_async_debug_info (MonoMethod *method);
// The intent here is really MONO_LLVM_INTERNAL but that is not necessarily available.
-MONO_API_NO_EXTERN_C
+MONO_API
MonoDebugSourceLocation *
mono_debug_method_lookup_location (MonoDebugMethodInfo *minfo, int il_offset);
int mono_compile_deferred_assemblies (guint32 opts, const char *aot_options, gpointer **aot_state);
void* mono_aot_readonly_field_override (MonoClassField *field);
gboolean mono_aot_direct_icalls_enabled_for_method (MonoCompile *cfg, MonoMethod *method);
-gboolean mono_aot_is_shared_got_offset (int offset) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gboolean mono_aot_is_shared_got_offset (int offset);
-guint32 mono_aot_get_got_offset (MonoJumpInfo *ji) MONO_LLVM_INTERNAL;
-char* mono_aot_get_method_name (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-char* mono_aot_get_mangled_method_name (MonoMethod *method) MONO_LLVM_INTERNAL;
-gboolean mono_aot_is_direct_callable (MonoJumpInfo *patch_info) MONO_LLVM_INTERNAL;
-void mono_aot_mark_unused_llvm_plt_entry(MonoJumpInfo *patch_info) MONO_LLVM_INTERNAL;
-char* mono_aot_get_plt_symbol (MonoJumpInfoType type, gconstpointer data) MONO_LLVM_INTERNAL;
-char* mono_aot_get_direct_call_symbol (MonoJumpInfoType type, gconstpointer data) MONO_LLVM_INTERNAL;
-int mono_aot_get_method_index (MonoMethod *method) MONO_LLVM_INTERNAL;
-MonoJumpInfo* mono_aot_patch_info_dup (MonoJumpInfo* ji) MONO_LLVM_INTERNAL;
-gboolean mono_aot_can_specialize (MonoMethod *method) MONO_LLVM_INTERNAL;
-gboolean mono_aot_can_enter_interp (MonoMethod *method) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint32 mono_aot_get_got_offset (MonoJumpInfo *ji);
+MONO_LLVM_INTERNAL char* mono_aot_get_method_name (MonoCompile *cfg);
+MONO_LLVM_INTERNAL char* mono_aot_get_mangled_method_name (MonoMethod *method);
+MONO_LLVM_INTERNAL gboolean mono_aot_is_direct_callable (MonoJumpInfo *patch_info);
+MONO_LLVM_INTERNAL void mono_aot_mark_unused_llvm_plt_entry(MonoJumpInfo *patch_info);
+MONO_LLVM_INTERNAL char* mono_aot_get_plt_symbol (MonoJumpInfoType type, gconstpointer data);
+MONO_LLVM_INTERNAL char* mono_aot_get_direct_call_symbol (MonoJumpInfoType type, gconstpointer data);
+MONO_LLVM_INTERNAL int mono_aot_get_method_index (MonoMethod *method);
+MONO_LLVM_INTERNAL MonoJumpInfo* mono_aot_patch_info_dup (MonoJumpInfo* ji);
+MONO_LLVM_INTERNAL gboolean mono_aot_can_specialize (MonoMethod *method);
+MONO_LLVM_INTERNAL gboolean mono_aot_can_enter_interp (MonoMethod *method);
#endif
GSList*
mono_amd64_get_exception_trampolines (gboolean aot);
-int
-mono_amd64_get_tls_gs_offset (void) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL int
+mono_amd64_get_tls_gs_offset (void);
#if defined(TARGET_WIN32) && !defined(DISABLE_JIT)
} LLVMModuleFlags;
/* KEEP THIS IN SYNCH WITH mini-llvm-loaded.c */
-void mono_llvm_init (void) MONO_LLVM_INTERNAL;
-void mono_llvm_cleanup (void) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_method (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_call (MonoCompile *cfg, MonoCallInst *call) MONO_LLVM_INTERNAL;
-void mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, int initial_got_size, LLVMModuleFlags flags) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_aot_module (const char *filename, const char *cu_name) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len) MONO_LLVM_INTERNAL;
-void mono_llvm_check_method_supported (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-void mono_llvm_free_domain_info (MonoDomain *domain) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_llvm_init (void);
+MONO_LLVM_INTERNAL void mono_llvm_cleanup (void);
+MONO_LLVM_INTERNAL void mono_llvm_emit_method (MonoCompile *cfg);
+MONO_LLVM_INTERNAL void mono_llvm_emit_call (MonoCompile *cfg, MonoCallInst *call);
+MONO_LLVM_INTERNAL void mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, int initial_got_size, LLVMModuleFlags flags);
+MONO_LLVM_INTERNAL void mono_llvm_emit_aot_module (const char *filename, const char *cu_name);
+MONO_LLVM_INTERNAL void mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code);
+MONO_LLVM_INTERNAL void mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len);
+MONO_LLVM_INTERNAL void mono_llvm_check_method_supported (MonoCompile *cfg);
+MONO_LLVM_INTERNAL void mono_llvm_free_domain_info (MonoDomain *domain);
MONO_API void mono_personality (void);
int mono_llvm_load (const char* bpath);
-void mono_llvm_create_vars (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-void mono_llvm_fixup_aot_module (void) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_llvm_create_vars (MonoCompile *cfg);
+MONO_LLVM_INTERNAL void mono_llvm_fixup_aot_module (void);
gboolean mini_llvm_init (void);
-MonoCPUFeatures mono_llvm_get_cpu_features (void) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoCPUFeatures mono_llvm_get_cpu_features (void);
#endif
gboolean mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee);
gpointer mono_create_ftnptr (MonoDomain *domain, gpointer addr);
-MonoMethod* mono_icall_get_wrapper_method (MonoJitICallInfo* callinfo) MONO_LLVM_INTERNAL;
-gconstpointer mono_icall_get_wrapper (MonoJitICallInfo* callinfo) MONO_LLVM_INTERNAL;
-gconstpointer mono_icall_get_wrapper_full (MonoJitICallInfo* callinfo, gboolean do_compile) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoMethod* mono_icall_get_wrapper_method (MonoJitICallInfo* callinfo);
+MONO_LLVM_INTERNAL gconstpointer mono_icall_get_wrapper (MonoJitICallInfo* callinfo);
+MONO_LLVM_INTERNAL gconstpointer mono_icall_get_wrapper_full (MonoJitICallInfo* callinfo, gboolean do_compile);
MonoJumpInfo* mono_patch_info_dup_mp (MonoMemPool *mp, MonoJumpInfo *patch_info);
-guint mono_patch_info_hash (gconstpointer data) MONO_LLVM_INTERNAL;
-gint mono_patch_info_equal (gconstpointer ka, gconstpointer kb) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint mono_patch_info_hash (gconstpointer data);
+MONO_LLVM_INTERNAL gint mono_patch_info_equal (gconstpointer ka, gconstpointer kb);
MonoJumpInfo *mono_patch_info_list_prepend (MonoJumpInfo *list, int ip, MonoJumpInfoType type, gconstpointer target);
MonoJumpInfoToken* mono_jump_info_token_new (MonoMemPool *mp, MonoImage *image, guint32 token);
MonoJumpInfoToken* mono_jump_info_token_new2 (MonoMemPool *mp, MonoImage *image, guint32 token, MonoGenericContext *context);
-gpointer mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *patch_info, gboolean run_cctors, MonoError *error) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gpointer mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *patch_info, gboolean run_cctors, MonoError *error);
void mini_register_jump_site (MonoDomain *domain, MonoMethod *method, gpointer ip);
void mini_patch_jump_sites (MonoDomain *domain, MonoMethod *method, gpointer addr);
void mini_patch_llvm_jit_callees (MonoDomain *domain, MonoMethod *method, gpointer addr);
gpointer mono_jit_search_all_backends_for_jit_info (MonoDomain *domain, MonoMethod *method, MonoJitInfo **ji);
gpointer mono_jit_find_compiled_method_with_jit_info (MonoDomain *domain, MonoMethod *method, MonoJitInfo **ji);
gpointer mono_jit_find_compiled_method (MonoDomain *domain, MonoMethod *method);
-gpointer mono_jit_compile_method (MonoMethod *method, MonoError *error) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gpointer mono_jit_compile_method (MonoMethod *method, MonoError *error);
gpointer mono_jit_compile_method_jit_only (MonoMethod *method, MonoError *error);
void mono_set_bisect_methods (guint32 opt, const char *method_list_filename);
guint32 mono_get_optimizations_for_method (MonoMethod *method, guint32 default_opt);
char* mono_opt_descr (guint32 flags);
void mono_set_verbose_level (guint32 level);
-const char*mono_ji_type_to_string (MonoJumpInfoType type) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL const char*mono_ji_type_to_string (MonoJumpInfoType type);
void mono_print_ji (const MonoJumpInfo *ji);
MONO_API void mono_print_method_from_ip (void *ip);
MONO_API char *mono_pmip (void *ip);
guint8* mono_get_cached_unwind_info (guint32 index, guint32 *unwind_info_len);
-guint8* mono_unwind_decode_fde (guint8 *fde, guint32 *out_len, guint32 *code_len, MonoJitExceptionInfo **ex_info, guint32 *ex_info_len, gpointer **type_info, int *this_reg, int *this_offset) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint8* mono_unwind_decode_fde (guint8 *fde, guint32 *out_len, guint32 *code_len, MonoJitExceptionInfo **ex_info, guint32 *ex_info_len, gpointer **type_info, int *this_reg, int *this_offset);
/* Data retrieved from an LLVM Mono FDE entry */
typedef struct {
int this_offset;
} MonoLLVMFDEInfo;
-void
-mono_unwind_decode_llvm_mono_fde (guint8 *fde, int fde_len, guint8 *cie, guint8 *code, MonoLLVMFDEInfo *res, MonoJitExceptionInfo *ei, gpointer *type_info, guint8 *unw_info) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void
+mono_unwind_decode_llvm_mono_fde (guint8 *fde, int fde_len, guint8 *cie, guint8 *code, MonoLLVMFDEInfo *res, MonoJitExceptionInfo *ei, gpointer *type_info, guint8 *unw_info);
GSList* mono_unwind_get_cie_program (void);
-void mono_print_unwind_info (guint8 *unwind_info, int unwind_info_len) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_print_unwind_info (guint8 *unwind_info, int unwind_info_len);
#endif
char bytes[MONO_INST_MAX];
} MonoInstSpec;
-extern const char mini_ins_info[] MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL_EXTERN_C_BEGIN
+extern const char mini_ins_info[] MONO_LLVM_INTERNAL_NO_EXTERN_C;
+MONO_LLVM_INTERNAL_EXTERN_C_END
extern const gint8 mini_ins_sreg_counts [];
#ifndef DISABLE_JIT
/* helper methods */
MonoInst* mono_find_spvar_for_region (MonoCompile *cfg, int region);
MonoInst* mono_find_exvar_for_offset (MonoCompile *cfg, int offset);
-int mono_get_block_region_notry (MonoCompile *cfg, int region) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL int mono_get_block_region_notry (MonoCompile *cfg, int region);
-void mono_bblock_add_inst (MonoBasicBlock *bb, MonoInst *inst) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_bblock_add_inst (MonoBasicBlock *bb, MonoInst *inst);
void mono_bblock_insert_after_ins (MonoBasicBlock *bb, MonoInst *ins, MonoInst *ins_to_insert);
void mono_bblock_insert_before_ins (MonoBasicBlock *bb, MonoInst *ins, MonoInst *ins_to_insert);
void mono_verify_bblock (MonoBasicBlock *bb);
void mono_constant_fold (MonoCompile *cfg);
MonoInst* mono_constant_fold_ins (MonoCompile *cfg, MonoInst *ins, MonoInst *arg1, MonoInst *arg2, gboolean overwrite);
int mono_eval_cond_branch (MonoInst *branch);
-int mono_is_power_of_two (guint32 val) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL int mono_is_power_of_two (guint32 val);
void mono_cprop_local (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **acp, int acp_size);
-MonoInst* mono_compile_create_var (MonoCompile *cfg, MonoType *type, int opcode) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoInst* mono_compile_create_var (MonoCompile *cfg, MonoType *type, int opcode);
MonoInst* mono_compile_create_var_for_vreg (MonoCompile *cfg, MonoType *type, int opcode, int vreg);
void mono_compile_make_var_load (MonoCompile *cfg, MonoInst *dest, gssize var_index);
MonoInst* mini_get_int_to_float_spill_area (MonoCompile *cfg);
MonoType* mono_type_from_stack_type (MonoInst *ins);
-guint32 mono_alloc_ireg (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-guint32 mono_alloc_lreg (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-guint32 mono_alloc_freg (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-guint32 mono_alloc_preg (MonoCompile *cfg) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint32 mono_alloc_ireg (MonoCompile *cfg);
+MONO_LLVM_INTERNAL guint32 mono_alloc_lreg (MonoCompile *cfg);
+MONO_LLVM_INTERNAL guint32 mono_alloc_freg (MonoCompile *cfg);
+MONO_LLVM_INTERNAL guint32 mono_alloc_preg (MonoCompile *cfg);
guint32 mono_alloc_dreg (MonoCompile *cfg, MonoStackType stack_type);
-guint32 mono_alloc_ireg_ref (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-guint32 mono_alloc_ireg_mp (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-guint32 mono_alloc_ireg_copy (MonoCompile *cfg, guint32 vreg) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint32 mono_alloc_ireg_ref (MonoCompile *cfg);
+MONO_LLVM_INTERNAL guint32 mono_alloc_ireg_mp (MonoCompile *cfg);
+MONO_LLVM_INTERNAL guint32 mono_alloc_ireg_copy (MonoCompile *cfg, guint32 vreg);
void mono_mark_vreg_as_ref (MonoCompile *cfg, int vreg);
void mono_mark_vreg_as_mp (MonoCompile *cfg, int vreg);
void mono_blockset_print (MonoCompile *cfg, MonoBitSet *set, const char *name, guint idom);
void mono_print_ins_index (int i, MonoInst *ins);
GString *mono_print_ins_index_strbuf (int i, MonoInst *ins);
-void mono_print_ins (MonoInst *ins) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_print_ins (MonoInst *ins);
void mono_print_bb (MonoBasicBlock *bb, const char *msg);
void mono_print_code (MonoCompile *cfg, const char *msg);
-MONO_LLVM_INTERNAL const char* mono_inst_name (int op);
+MONO_LLVM_INTERNAL const char* mono_inst_name (int op);
int mono_op_to_op_imm (int opcode);
int mono_op_imm_to_op (int opcode);
int mono_load_membase_to_load_mem (int opcode);
void mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id);
MonoJumpInfoTarget mono_call_to_patch (MonoCallInst *call);
void mono_call_add_patch_info (MonoCompile *cfg, MonoCallInst *call, int ip);
-void mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target) MONO_LLVM_INTERNAL;
-void mono_add_patch_info_rel (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target, int relocation) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target);
+MONO_LLVM_INTERNAL void mono_add_patch_info_rel (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target, int relocation);
void mono_remove_patch_info (MonoCompile *cfg, int ip);
gpointer mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, int opt, MonoError *error);
GList *mono_varlist_insert_sorted (MonoCompile *cfg, GList *list, MonoMethodVar *mv, int sort_type);
gboolean add_sync_wrapper,
MonoError *error);
gpointer mono_create_class_init_trampoline (MonoVTable *vtable);
-gpointer mono_create_jit_trampoline (MonoDomain *domain, MonoMethod *method, MonoError *error) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gpointer mono_create_jit_trampoline (MonoDomain *domain, MonoMethod *method, MonoError *error);
gpointer mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token);
gpointer mono_create_delegate_trampoline (MonoDomain *domain, MonoClass *klass);
MonoDelegateTrampInfo* mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, MonoMethod *method);
MonoMethod* mini_get_memset_method (void);
int mini_class_check_context_used (MonoCompile *cfg, MonoClass *klass);
-CompRelation mono_opcode_to_cond (int opcode) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL CompRelation mono_opcode_to_cond (int opcode);
CompType mono_opcode_to_type (int opcode, int cmp_opcode);
CompRelation mono_negate_cond (CompRelation cond);
int mono_op_imm_to_op (int opcode);
void mono_tramp_info_free (MonoTrampInfo *info);
void mono_aot_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain);
void mono_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain);
-int mini_exception_id_by_name (const char *name) MONO_LLVM_INTERNAL;
-gboolean mini_type_is_hfa (MonoType *t, int *out_nfields, int *out_esize) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL int mini_exception_id_by_name (const char *name);
+MONO_LLVM_INTERNAL gboolean mini_type_is_hfa (MonoType *t, int *out_nfields, int *out_esize);
int mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_bblock, MonoBasicBlock *end_bblock,
MonoInst *return_var, MonoInst **inline_args,
gpointer mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method);
void mono_codegen (MonoCompile *cfg);
-void mono_call_inst_add_outarg_reg (MonoCompile *cfg, MonoCallInst *call, int vreg, int hreg, int bank) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_call_inst_add_outarg_reg (MonoCompile *cfg, MonoCallInst *call, int vreg, int hreg, int bank);
void mono_call_inst_add_outarg_vt (MonoCompile *cfg, MonoCallInst *call, MonoInst *outarg_vt);
/* methods that must be provided by the arch-specific port */
guint8* mono_arch_create_sdb_trampoline (gboolean single_step, MonoTrampInfo **info, gboolean aot);
gpointer mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean is_v4, gboolean aot);
gpointer mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot);
-guint8 *mono_arch_create_llvm_native_thunk (MonoDomain *domain, guint8* addr) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint8 *mono_arch_create_llvm_native_thunk (MonoDomain *domain, guint8* addr);
gpointer mono_arch_get_get_tls_tramp (void);
GList *mono_arch_get_allocatable_int_vars (MonoCompile *cfg);
GList *mono_arch_get_global_int_regs (MonoCompile *cfg);
void mono_arch_decompose_opts (MonoCompile *cfg, MonoInst *ins);
void mono_arch_decompose_long_opts (MonoCompile *cfg, MonoInst *ins);
GSList* mono_arch_get_delegate_invoke_impls (void);
-LLVMCallInfo* mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL LLVMCallInfo* mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig);
guint8* mono_arch_emit_load_got_addr (guint8 *start, guint8 *code, MonoCompile *cfg, MonoJumpInfo **ji);
guint8* mono_arch_emit_load_aotconst (guint8 *start, guint8 *code, MonoJumpInfo **ji, MonoJumpInfoType tramp_type, gconstpointer target);
GSList* mono_arch_get_cie_program (void);
void mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg);
guint32 mono_arch_get_patch_offset (guint8 *code);
gpointer*mono_arch_get_delegate_method_ptr_addr (guint8* code, host_mgreg_t *regs);
-void mono_arch_create_vars (MonoCompile *cfg) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL void mono_arch_create_vars (MonoCompile *cfg);
void mono_arch_save_unwind_info (MonoCompile *cfg);
void mono_arch_register_lowlevel_calls (void);
gpointer mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr);
gpointer mono_altstack_restore_prot (host_mgreg_t *regs, guint8 *code, gpointer *tramp_data, guint8* tramp);
MonoJitInfo* mini_jit_info_table_find (MonoDomain *domain, gpointer addr, MonoDomain **out_domain);
MonoJitInfo* mini_jit_info_table_find_ext (MonoDomain *domain, gpointer addr, gboolean allow_trampolines, MonoDomain **out_domain);
-G_EXTERN_C void mono_resume_unwind (MonoContext *ctx) MONO_LLVM_INTERNAL;
+G_EXTERN_C void mono_resume_unwind (MonoContext *ctx) MONO_LLVM_INTERNAL_NO_EXTERN_C;
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);
gpointer
mono_method_fill_runtime_generic_context (MonoMethodRuntimeGenericContext *mrgctx, guint32 slot, MonoError *error);
-const char*
-mono_rgctx_info_type_to_str (MonoRgctxInfoType type) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL const char*
+mono_rgctx_info_type_to_str (MonoRgctxInfoType type);
MonoJumpInfoType
mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type);
SHARE_MODE_GSHAREDVT = 0x1,
} GetSharedMethodFlags;
-MonoType* mini_get_underlying_type (MonoType *type) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoType* mini_get_underlying_type (MonoType *type);
MonoType* mini_type_get_underlying_type (MonoType *type);
MonoClass* mini_get_class (MonoMethod *method, guint32 token, MonoGenericContext *context);
MonoMethod* mini_get_shared_method_to_register (MonoMethod *method);
int mini_type_stack_size (MonoType *t, int *align);
int mini_type_stack_size_full (MonoType *t, guint32 *align, gboolean pinvoke);
void mini_type_to_eval_stack_type (MonoCompile *cfg, MonoType *type, MonoInst *inst);
-guint mono_type_to_regmove (MonoCompile *cfg, MonoType *type) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL guint mono_type_to_regmove (MonoCompile *cfg, MonoType *type);
void mono_cfg_add_try_hole (MonoCompile *cfg, MonoExceptionClause *clause, guint8 *start, MonoBasicBlock *bb);
void mono_update_jit_stats (MonoCompile *cfg);
gboolean mini_type_is_reference (MonoType *type);
-gboolean mini_type_is_vtype (MonoType *t) MONO_LLVM_INTERNAL;
-gboolean mini_type_var_is_vt (MonoType *type) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gboolean mini_type_is_vtype (MonoType *t);
+MONO_LLVM_INTERNAL gboolean mini_type_var_is_vt (MonoType *type);
gboolean mini_is_gsharedvt_type (MonoType *t);
-gboolean mini_is_gsharedvt_klass (MonoClass *klass) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gboolean mini_is_gsharedvt_klass (MonoClass *klass);
gboolean mini_is_gsharedvt_signature (MonoMethodSignature *sig);
-gboolean mini_is_gsharedvt_variable_type (MonoType *t) MONO_LLVM_INTERNAL;
-gboolean mini_is_gsharedvt_variable_klass (MonoClass *klass) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gboolean mini_is_gsharedvt_variable_type (MonoType *t);
+MONO_LLVM_INTERNAL gboolean mini_is_gsharedvt_variable_klass (MonoClass *klass);
gboolean mini_is_gsharedvt_sharable_method (MonoMethod *method);
-gboolean mini_is_gsharedvt_variable_signature (MonoMethodSignature *sig) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gboolean mini_is_gsharedvt_variable_signature (MonoMethodSignature *sig);
gboolean mini_is_gsharedvt_sharable_inst (MonoGenericInst *inst);
-gboolean mini_method_is_default_method (MonoMethod *m) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL gboolean mini_method_is_default_method (MonoMethod *m);
gboolean mini_method_needs_mrgctx (MonoMethod *m);
gpointer mini_method_get_rgctx (MonoMethod *m);
void mini_init_gsctx (MonoDomain *domain, MonoMemPool *mp, MonoGenericContext *context, MonoGenericSharingContext *gsctx);
gsize mini_magic_type_size (MonoCompile *cfg, MonoType *type);
gboolean mini_magic_is_int_type (MonoType *t);
gboolean mini_magic_is_float_type (MonoType *t);
-MonoType* mini_native_type_replace_type (MonoType *type) MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL MonoType* mini_native_type_replace_type (MonoType *type);
MonoMethod*
mini_method_to_shared (MonoMethod *method); // null if not shared
#endif
// If MONO_LLVM_INTERNAL changes, update mono_debug_method_lookup_location declaration.
-#if !defined(_MSC_VER) && !defined(HOST_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
-#if MONO_LLVM_LOADED
-#define MONO_LLVM_INTERNAL MONO_API_NO_EXTERN_C
-#else
-#define MONO_LLVM_INTERNAL
-#endif
+#if !defined(_MSC_VER) && !defined(HOST_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN && MONO_LLVM_LOADED
+
+// Normally use this.
+#define MONO_LLVM_INTERNAL MONO_API
+
+// Use these for extern data.
+#define MONO_LLVM_INTERNAL_NO_EXTERN_C MONO_API_NO_EXTERN_C
+#define MONO_LLVM_INTERNAL_EXTERN_C_BEGIN G_BEGIN_DECLS
+#define MONO_LLVM_INTERNAL_EXTERN_C_END G_END_DECLS
+
#else
-#define MONO_LLVM_INTERNAL
+#define MONO_LLVM_INTERNAL /* nothing */
+#define MONO_LLVM_INTERNAL_NO_EXTERN_C /* nothing */
+#define MONO_LLVM_INTERNAL_EXTERN_C_BEGIN /* nothing */
+#define MONO_LLVM_INTERNAL_EXTERN_C_END /* nothing */
#endif
/* Used to mark internal functions used by the profiler modules */
} MonoDl;
-MONO_API MonoDl* mono_dl_open (const char *name, int flags, char **error_msg) MONO_LLVM_INTERNAL;
+MONO_API MonoDl* mono_dl_open (const char *name, int flags, char **error_msg) MONO_LLVM_INTERNAL_NO_EXTERN_C;
MONO_EXTERN_C
-char* mono_dl_symbol (MonoDl *module, const char *name, void **symbol) MONO_LLVM_INTERNAL;
+char* mono_dl_symbol (MonoDl *module, const char *name, void **symbol) MONO_LLVM_INTERNAL_NO_EXTERN_C;
MONO_EXTERN_C
-void mono_dl_close (MonoDl *module) MONO_LLVM_INTERNAL;
+void mono_dl_close (MonoDl *module) MONO_LLVM_INTERNAL_NO_EXTERN_C;
char* mono_dl_build_path (const char *directory, const char *name, void **iter);
gboolean
mono_threads_suspend_policy_is_blocking_transition_enabled (MonoThreadsSuspendPolicy p);
-extern char mono_threads_suspend_policy_hidden_dont_modify MONO_LLVM_INTERNAL;
+MONO_LLVM_INTERNAL_EXTERN_C_BEGIN
+extern char mono_threads_suspend_policy_hidden_dont_modify MONO_LLVM_INTERNAL_NO_EXTERN_C;
+MONO_LLVM_INTERNAL_EXTERN_C_END
static inline MonoThreadsSuspendPolicy
mono_threads_suspend_policy (void) {