2005-08-21 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / object-internals.h
index 47f7efbc9bd8fd7e32eac09b8ec3b35b8ccb00b3..e463dd18ee622115f12afddc5b3222df84193ba1 100644 (file)
@@ -154,6 +154,8 @@ typedef struct {
        MonoBoolean  completed;
        MonoBoolean  endinvoke_called;
        MonoObject  *async_callback;
+       MonoObject  *execution_context;
+       MonoObject  *original_context;
 } MonoAsyncResult;
 
 typedef struct {
@@ -227,25 +229,37 @@ struct _MonoThread {
        guint32     state;
        MonoException *abort_exc;
        MonoObject *abort_state;
-       guint32 tid;
+       guint64 tid;    /* This is accessed as a gsize in the code (so it can hold a 64bit pointer on systems that need it), but needs to reserve 64 bits of space on all machines as it corresponds to a field in managed code */
        HANDLE      start_notify;
        gpointer stack_ptr;
        gpointer *static_data;
        gpointer jit_data;
        gpointer lock_data;
-       gpointer unused1;
        MonoAppContext *current_appcontext;
        int stack_size;
        MonoObject *start_obj;
        GSList *appdomain_refs;
        MonoBoolean interruption_requested;
        gpointer suspend_event;
+       gpointer suspended_event;
        gpointer resume_event;
        MonoObject *synch_lock;
        guint8* serialized_culture_info;
        guint32 serialized_culture_info_len;
        guint8* serialized_ui_culture_info;
        guint32 serialized_ui_culture_info_len;
+       MonoObject *execution_context;
+       /* 
+        * These fields are used to avoid having to increment corlib versions
+        * when a new field is added to the unmanaged MonoThread structure.
+        */
+       gpointer unused1;
+       gpointer unused2;
+       gpointer unused3;
+       gpointer unused4;
+       gpointer unused5;
+       gpointer unused6;
+       gpointer unused7;
 };
 
 typedef struct {
@@ -357,6 +371,18 @@ typedef struct {
        const void* text_info_data;
 } MonoCultureInfo;
 
+typedef struct {
+       MonoObject obj;
+       gint32 region_id;
+       MonoString *iso2name;
+       MonoString *iso3name;
+       MonoString *win3name;
+       MonoString *english_name;
+       MonoString *currency_symbol;
+       MonoString *iso_currency_symbol;
+       MonoString *currency_english_name;
+} MonoRegionInfo;
+
 typedef struct {
        MonoObject obj;
        MonoString *str;
@@ -528,6 +554,8 @@ struct _MonoReflectionAssembly {
        MonoObject *refuse;     /* PermissionSet - for SecurityAction.RequestRefuse */
        MonoObject *granted;    /* PermissionSet - for the resolved assembly granted permissions */
        MonoObject *denied;     /* PermissionSet - for the resolved assembly denied permissions */
+       /* */
+       MonoBoolean from_byte_array;
 };
 
 typedef struct {
@@ -696,6 +724,7 @@ typedef struct {
        MonoString *dll;
        MonoString *dllentry;
        guint32 charset;
+       guint32 extra_flags;
        guint32 native_cc;
        guint32 call_conv;
        MonoBoolean init_locals;
@@ -873,19 +902,14 @@ typedef struct {
        MonoString *name;
        MonoString *codebase;
        gint32 major, minor, build, revision;
-       /* FIXME: add missing stuff */
-/*     CultureInfo cultureinfo;
-       AssemblyNameFlags flags;
-       AssemblyHashAlgorithm hashalg;
-       StrongNameKeyPair keypair;
-       AssemblyVersionCompatibility versioncompat;*/
        MonoObject  *cultureInfo;
        guint32     flags;
        guint32     hashalg;
        MonoObject  *keypair;
        MonoArray   *publicKey;
        MonoArray   *keyToken;
-       MonoObject  *versioncompat;
+       guint32     versioncompat;
+       MonoObject *version;
 } MonoReflectionAssemblyName;
 
 typedef struct {
@@ -1005,6 +1029,8 @@ void mono_reflection_create_dynamic_method (MonoReflectionDynamicMethod *m);
 
 void        mono_reflection_initialize_generic_parameter (MonoReflectionGenericParam *gparam);
 
+MonoType*
+mono_class_bind_generic_parameters (MonoType *type, int type_argc, MonoType **types);
 MonoType*
 mono_reflection_bind_generic_parameters (MonoReflectionType *type, int type_argc, MonoType **types);
 MonoReflectionMethod*
@@ -1021,10 +1047,10 @@ MonoArray  *mono_reflection_sighelper_get_signature_field (MonoReflectionSigHelp
 MonoReflectionMarshal* mono_reflection_marshal_from_marshal_spec (MonoDomain *domain, MonoClass *klass, MonoMarshalSpec *spec);
 
 gpointer
-mono_reflection_lookup_dynamic_token (MonoImage *image, guint32 token);
+mono_reflection_lookup_dynamic_token (MonoImage *image, guint32 token, MonoClass **handle_class);
 
 gboolean
-mono_reflection_call_is_assignable_from (MonoClass *klass, MonoClass *oklass);
+mono_reflection_call_is_assignable_to (MonoClass *klass, MonoClass *oklass);
 
 void
 mono_image_build_metadata (MonoReflectionModuleBuilder *module);
@@ -1047,5 +1073,11 @@ mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mon
 MonoMethodSignature*
 mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 token, MonoGenericContext *context);
 
+void
+mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *klass);
+
+gpointer
+mono_get_addr_from_ftnptr (gpointer descr);
+
 #endif /* __MONO_OBJECT_INTERNALS_H__ */