#endif
#define MONO_CHECK_ARG(arg, expr) G_STMT_START{ \
- if (!(expr)) \
+ if (G_UNLIKELY (!(expr))) \
{ \
MonoException *ex; \
char *msg = g_strdup_printf ("assertion `%s' failed", \
}; }G_STMT_END
#define MONO_CHECK_ARG_NULL(arg) G_STMT_START{ \
- if (arg == NULL) \
+ if (G_UNLIKELY (arg == NULL)) \
{ \
MonoException *ex; \
if (arg) {} /* check if the name exists */ \
MonoAppContext *current_appcontext;
MonoException *pending_exception;
MonoThread *root_domain_thread;
- MonoObject _serialized_principal;
+ MonoObject *_serialized_principal;
int _serialized_principal_version;
gpointer appdomain_refs;
/* This is modified using atomic ops, so keep it a gint32 */
int stack_size;
guint8 apartment_state;
gint32 critical_region_level;
- guint32 small_id;
gint32 managed_id;
+ guint32 small_id;
MonoThreadManageCallback manage_callback;
gpointer interrupt_on_stop;
gsize flags;
MonoArray *data;
} MonoReflectionCustomAttr;
+typedef struct {
+ MonoObject object;
+ MonoString *marshal_cookie;
+ MonoString *marshal_type;
+ MonoReflectionType *marshal_type_ref;
+ MonoReflectionType *marshal_safe_array_user_defined_subtype;
+ guint32 utype;
+ guint32 array_subtype;
+ gint32 safe_array_subtype;
+ gint32 size_const;
+ gint32 IidParameterIndex;
+ gint16 size_param_index;
+} MonoReflectionMarshalAsAttribute;
+
+
typedef struct {
MonoObject object;
gint32 call_conv;
MonoArray *mono_reflection_sighelper_get_signature_field (MonoReflectionSigHelper *sig) MONO_INTERNAL;
-MonoReflectionMarshal* mono_reflection_marshal_from_marshal_spec (MonoDomain *domain, MonoClass *klass, MonoMarshalSpec *spec) MONO_INTERNAL;
+MonoReflectionMarshalAsAttribute* mono_reflection_marshal_as_attribute_from_marshal_spec (MonoDomain *domain, MonoClass *klass, MonoMarshalSpec *spec) MONO_INTERNAL;
gpointer
mono_reflection_lookup_dynamic_token (MonoImage *image, guint32 token, gboolean valid_token, MonoClass **handle_class, MonoGenericContext *context) MONO_INTERNAL;