#include <mono/metadata/class.h>
#include <mono/metadata/object.h>
+#include <mono/metadata/mempool.h>
#include <mono/io-layer/io-layer.h>
#include "mono/utils/mono-compiler.h"
typedef struct _MonoMethodInflated MonoMethodInflated;
typedef struct _MonoMethodPInvoke MonoMethodPInvoke;
+/* Properties that applies to a group of structs should better use a higher number
+ * to avoid colision with type specific properties.
+ *
+ * This prop applies to class, method, property, event, assembly and image.
+ */
+#define MONO_PROP_DYNAMIC_CATTR 0x1000
+
typedef enum {
#define WRAPPER(e,n) MONO_WRAPPER_ ## e,
#include "wrapper-types.h"
MONO_EXCEPTION_METHOD_ACCESS = 9,
MONO_EXCEPTION_FIELD_ACCESS = 10,
MONO_EXCEPTION_GENERIC_SHARING_FAILED = 11,
- MONO_EXCEPTION_BAD_IMAGE = 12
+ MONO_EXCEPTION_BAD_IMAGE = 12,
+ MONO_EXCEPTION_OBJECT_SUPPLIED = 13 /*The exception object is already created.*/
/* add other exception type */
};
MONO_RGCTX_INFO_REFLECTION_TYPE,
MONO_RGCTX_INFO_METHOD,
MONO_RGCTX_INFO_GENERIC_METHOD_CODE,
- MONO_RGCTX_INFO_CLASS_FIELD
+ MONO_RGCTX_INFO_CLASS_FIELD,
+ MONO_RGCTX_INFO_METHOD_RGCTX
};
typedef struct _MonoRuntimeGenericContextOtherInfoTemplate {
typedef struct {
MonoClass *next_subclass;
MonoRuntimeGenericContextOtherInfoTemplate *other_infos;
+ GSList *method_templates;
} MonoRuntimeGenericContextTemplate;
+typedef struct {
+ MonoVTable *class_vtable; /* must be the first element */
+ MonoGenericInst *method_inst;
+ gpointer infos [MONO_ZERO_LEN_ARRAY];
+} MonoMethodRuntimeGenericContext;
+
+#define MONO_RGCTX_SLOT_MAKE_RGCTX(i) (i)
+#define MONO_RGCTX_SLOT_MAKE_MRGCTX(i) ((i) | 0x80000000)
+#define MONO_RGCTX_SLOT_INDEX(s) ((s) & 0x7fffffff)
+#define MONO_RGCTX_SLOT_IS_MRGCTX(s) (((s) & 0x80000000) ? TRUE : FALSE)
+
+
#define MONO_CLASS_PROP_EXCEPTION_DATA 0
struct _MonoClass {
enum {
MONO_GENERIC_SHARING_NONE,
+ MONO_GENERIC_SHARING_COLLECTIONS,
MONO_GENERIC_SHARING_CORLIB,
MONO_GENERIC_SHARING_ALL
};
gboolean
mono_class_needs_cctor_run (MonoClass *klass, MonoMethod *caller) MONO_INTERNAL;
+gboolean
+mono_class_field_is_special_static (MonoClassField *field) MONO_INTERNAL;
+
gboolean
mono_class_has_special_static_fields (MonoClass *klass) MONO_INTERNAL;
MonoMethodSignature *
mono_metadata_get_inflated_signature (MonoMethodSignature *sig, MonoGenericContext *context);
+MonoType*
+mono_class_inflate_generic_type_with_mempool (MonoMemPool *mempool, MonoType *type, MonoGenericContext *context) MONO_INTERNAL;
+
void
mono_metadata_free_inflated_signature (MonoMethodSignature *sig);
MonoJitICallInfo *
mono_find_jit_icall_by_addr (gconstpointer addr) MONO_INTERNAL;
+GHashTable*
+mono_get_jit_icall_info (void) MONO_INTERNAL;
+
gboolean
mono_class_set_failure (MonoClass *klass, guint32 ex_type, void *ex_data) MONO_INTERNAL;
char*
mono_type_get_full_name (MonoClass *class) MONO_INTERNAL;
-MonoArrayType *mono_dup_array_type (MonoArrayType *a) MONO_INTERNAL;
-MonoMethodSignature *mono_metadata_signature_deep_dup (MonoMethodSignature *sig) MONO_INTERNAL;
+MonoArrayType *mono_dup_array_type (MonoMemPool *mp, MonoArrayType *a) MONO_INTERNAL;
+MonoMethodSignature *mono_metadata_signature_deep_dup (MonoMemPool *mp, MonoMethodSignature *sig) MONO_INTERNAL;
void
mono_image_init_name_cache (MonoImage *image);
gboolean
mono_generic_class_is_generic_type_definition (MonoGenericClass *gklass) MONO_INTERNAL;
+MonoMethod*
+mono_method_get_declaring_generic_method (MonoMethod *method) MONO_INTERNAL;
+
+MonoMethod*
+mono_class_get_method_generic (MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
+
MonoType*
mono_type_get_basic_type_from_generic (MonoType *type) MONO_INTERNAL;
gpointer
mono_class_fill_runtime_generic_context (MonoVTable *class_vtable, guint32 slot) MONO_INTERNAL;
+gpointer
+mono_method_fill_runtime_generic_context (MonoMethodRuntimeGenericContext *mrgctx, guint32 slot) MONO_INTERNAL;
+
+MonoMethodRuntimeGenericContext*
+mono_method_lookup_rgctx (MonoVTable *class_vtable, MonoGenericInst *method_inst) MONO_INTERNAL;
+
int
-mono_class_rgctx_get_array_size (int n) MONO_INTERNAL;
+mono_class_rgctx_get_array_size (int n, gboolean mrgctx) MONO_INTERNAL;
-gboolean
-mono_class_lookup_or_register_other_info (MonoClass *class, gpointer data, int info_type, MonoGenericContext *generic_context) MONO_INTERNAL;
+guint32
+mono_method_lookup_or_register_other_info (MonoMethod *method, gboolean in_mrgctx, gpointer data,
+ int info_type, MonoGenericContext *generic_context) MONO_INTERNAL;
int
mono_generic_context_check_used (MonoGenericContext *context) MONO_INTERNAL;
gboolean
mono_method_can_access_field_full (MonoMethod *method, MonoClassField *field, MonoClass *context_klass) MONO_INTERNAL;
+MonoClass *
+mono_class_get_generic_type_definition (MonoClass *klass) MONO_INTERNAL;
+
#endif /* __MONO_METADATA_CLASS_INTERBALS_H__ */