#include "mini.h" gpointer mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code) { g_error ("mono_arch_get_this_arg_from_call"); } gpointer mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg) { g_error ("mono_arch_get_delegate_virtual_invoke_impl"); } void mono_arch_cpu_init (void) { // printf ("mono_arch_cpu_init\n"); } void mono_arch_finish_init (void) { // printf ("mono_arch_finish_init\n"); } void mono_arch_init (void) { // printf ("mono_arch_init\n"); } void mono_arch_cleanup (void) { } void mono_arch_register_lowlevel_calls (void) { } void mono_arch_flush_register_windows (void) { } void mono_arch_free_jit_tls_data (MonoJitTlsData *tls) { } MonoMethod* mono_arch_find_imt_method (mgreg_t *regs, guint8 *code) { g_error ("mono_arch_find_static_call_vtable"); return (MonoMethod*) regs [MONO_ARCH_IMT_REG]; } MonoVTable* mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code) { g_error ("mono_arch_find_static_call_vtable"); return (MonoVTable*) regs [MONO_ARCH_RGCTX_REG]; } gpointer mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count, gpointer fail_tramp) { g_error ("mono_arch_build_imt_trampoline"); } guint32 mono_arch_cpu_enumerate_simd_versions (void) { return 0; } guint32 mono_arch_cpu_optimizations (guint32 *exclude_mask) { return 0; } GSList* mono_arch_get_delegate_invoke_impls (void) { g_error ("mono_arch_get_delegate_invoke_impls"); return NULL; } gpointer mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_target) { g_error ("mono_arch_get_delegate_invoke_impl"); return NULL; } mgreg_t mono_arch_context_get_int_reg (MonoContext *ctx, int reg) { g_error ("mono_arch_context_get_int_reg"); return 0; } int mono_arch_get_argument_info (MonoMethodSignature *csig, int param_count, MonoJitArgumentInfo *arg_info) { g_error ("mono_arch_get_argument_info"); return 0; } void mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf) { ext->lmf.previous_lmf = (gsize)prev_lmf; /* Mark that this is a MonoLMFExt */ ext->lmf.previous_lmf = (gsize)(gpointer)(((gssize)ext->lmf.previous_lmf) | 2); } void mono_runtime_setup_stat_profiler (void) { g_error ("mono_runtime_setup_stat_profiler"); } void mono_runtime_shutdown_stat_profiler (void) { g_error ("mono_runtime_shutdown_stat_profiler"); } gboolean MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal) { g_error ("mono_chain_signal"); return FALSE; } void mono_runtime_install_handlers (void) { } void mono_runtime_cleanup_handlers (void) { } gboolean mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoThreadInfo *info) { g_error ("WASM systems don't support mono_thread_state_init_from_handle"); return FALSE; } /* The following functions don't belong here, but are due to laziness. */ //w32file-wasm.c gboolean mono_w32file_get_volume_information (const gunichar2 *path, gunichar2 *volumename, gint volumesize, gint *outserial, gint *maxcomp, gint *fsflags, gunichar2 *fsbuffer, gint fsbuffersize) { g_error ("mono_w32file_get_volume_information"); } //llvm builtin's that we should not have used in the first place //libc / libpthread missing bits from musl or shit we didn't detect :facepalm: int pthread_getschedparam (pthread_t thread, int *policy, struct sched_param *param) { g_error ("pthread_getschedparam"); return 0; } int pthread_attr_getstacksize (const pthread_attr_t *restrict attr, size_t *restrict stacksize) { return 65536; //wasm page size } int pthread_sigmask (int how, const sigset_t * restrict set, sigset_t * restrict oset) { return 0; } int sigsuspend(const sigset_t *sigmask) { g_error ("sigsuspend"); return 0; } int getdtablesize (void) { return 256; //random constant that is the fd limit } void * getgrnam (const char *name) { return NULL; } void * getgrgid (gid_t gid) { return NULL; } int inotify_init (void) { g_error ("inotify_init"); } int inotify_rm_watch (int fd, int wd) { g_error ("inotify_rm_watch"); return 0; } int inotify_add_watch (int fd, const char *pathname, uint32_t mask) { g_error ("inotify_add_watch"); return 0; } int sem_timedwait (sem_t *sem, const struct timespec *abs_timeout) { g_error ("sem_timedwait"); return 0; }