Merge pull request #347 from JamesB7/master
[mono.git] / mono / metadata / marshal.h
index a2a1946c7ad8948855a98ae4e07c5de0e1c2e241..9db6cf0e2fd0d6b5b5fba65bb2b7b9ced5c4e009 100644 (file)
@@ -101,7 +101,10 @@ typedef enum {
        WRAPPER_SUBTYPE_RUNTIME_INVOKE_DIRECT,
        WRAPPER_SUBTYPE_RUNTIME_INVOKE_VIRTUAL,
        /* Subtypes of MONO_WRAPPER_MANAGED_TO_NATIVE */
-       WRAPPER_SUBTYPE_ICALL_WRAPPER
+       WRAPPER_SUBTYPE_ICALL_WRAPPER,
+       WRAPPER_SUBTYPE_NATIVE_FUNC_AOT,
+       /* Subtypes of MONO_WRAPPER_UNKNOWN */
+       WRAPPER_SUBTYPE_SYNCHRONIZED_INNER
 } WrapperSubtype;
 
 typedef struct {
@@ -129,6 +132,10 @@ typedef struct {
        MonoMethod *method;
 } ManagedToNativeWrapperInfo;
 
+typedef struct {
+       MonoMethod *method;
+} SynchronizedInnerWrapperInfo;
+
 /*
  * This structure contains additional information to uniquely identify a given wrapper
  * method. It can be retrieved by mono_marshal_get_wrapper_info () for certain types
@@ -149,6 +156,8 @@ typedef struct {
                NativeToManagedWrapperInfo native_to_managed;
                /* MONO_WRAPPER_MANAGED_TO_NATIVE */
                ManagedToNativeWrapperInfo managed_to_native;
+               /* SYNCHRONIZED_INNER */
+               SynchronizedInnerWrapperInfo synchronized_inner;
        } d;
 } WrapperInfo;
 
@@ -292,6 +301,9 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
 MonoMethod *
 mono_marshal_get_native_func_wrapper (MonoImage *image, MonoMethodSignature *sig, MonoMethodPInvoke *piinfo, MonoMarshalSpec **mspecs, gpointer func) MONO_INTERNAL;
 
+MonoMethod*
+mono_marshal_get_native_func_wrapper_aot (MonoClass *klass) MONO_INTERNAL;
+
 MonoMethod *
 mono_marshal_get_struct_to_ptr (MonoClass *klass) MONO_INTERNAL;
 
@@ -316,6 +328,9 @@ mono_marshal_get_stfld_remote_wrapper (MonoClass *klass) MONO_INTERNAL;
 MonoMethod *
 mono_marshal_get_synchronized_wrapper (MonoMethod *method) MONO_INTERNAL;
 
+MonoMethod *
+mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method) MONO_INTERNAL;
+
 MonoMethod *
 mono_marshal_get_unbox_wrapper (MonoMethod *method) MONO_INTERNAL;
 
@@ -552,7 +567,7 @@ mono_signature_no_pinvoke (MonoMethod *method) MONO_INTERNAL;
 /* Called from cominterop.c */
 
 void
-mono_marshal_emit_native_wrapper (MonoImage *image, MonoMethodBuilder *mb, MonoMethodSignature *sig, MonoMethodPInvoke *piinfo, MonoMarshalSpec **mspecs, gpointer func, gboolean aot, gboolean check_exceptions) MONO_INTERNAL;
+mono_marshal_emit_native_wrapper (MonoImage *image, MonoMethodBuilder *mb, MonoMethodSignature *sig, MonoMethodPInvoke *piinfo, MonoMarshalSpec **mspecs, gpointer func, gboolean aot, gboolean check_exceptions, gboolean func_param) MONO_INTERNAL;
 
 void
 mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *invoke_sig, MonoMarshalSpec **mspecs, EmitMarshalContext* m, MonoMethod *method, uint32_t target_handle) MONO_INTERNAL;
@@ -570,6 +585,9 @@ mono_mb_create_and_cache (GHashTable *cache, gpointer key,
 void
 mono_marshal_emit_thread_interrupt_checkpoint (MonoMethodBuilder *mb) MONO_INTERNAL;
 
+void
+mono_marshal_use_aot_wrappers (gboolean use) MONO_INTERNAL;
+
 G_END_DECLS
 
 #endif /* __MONO_MARSHAL_H__ */