2004-01-19 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / metadata.h
index 848260b5c3521e06c0987f1ddc267ffc36953a75..8f252d2111bde43a6251ce4b1dd2cd8e9464eb07 100644 (file)
@@ -229,7 +229,7 @@ void        mono_metadata_field_info (MonoImage *meta,
                                      guint32      *rva,
                                      MonoMarshalSpec **marshal_spec);
 
-guint32     mono_metadata_get_constant_index (MonoImage *meta, guint32 token);
+guint32     mono_metadata_get_constant_index (MonoImage *meta, guint32 token, guint32 hint);
 
 /*
  * Functions to extract information from the Blobs
@@ -275,15 +275,6 @@ struct _MonoArrayType {
        int *lobounds;
 };
 
-/*
- * Generic instantiation data type encoding.
- */
-struct _MonoGenericInst {
-       MonoType *generic_type;
-       int type_argc;
-       MonoType **type_argv;
-};
-
 struct _MonoType {
        union {
                MonoClass *klass; /* for VALUETYPE and CLASS */
@@ -309,7 +300,7 @@ struct _MonoMethodSignature {
        unsigned int  ref_count : 23;
        guint16       param_count;
        guint16       sentinelpos;
-       MonoGenericInst *geninst;
+       guint16       generic_param_count;
        MonoType     *ret;
        MonoType     *params [MONO_ZERO_LEN_ARRAY];
 };
@@ -323,6 +314,8 @@ typedef struct {
        unsigned int init_locals : 1;
        guint16      num_locals;
        MonoExceptionClause *clauses;
+       MonoGenericParam *gen_params;
+       MonoGenericInst *geninst;
        MonoType    *locals [MONO_ZERO_LEN_ARRAY];
 } MonoMethodHeader;
 
@@ -335,14 +328,6 @@ typedef enum {
        MONO_PARSE_FIELD
 } MonoParseTypeMode;
 
-struct _MonoGenericParam {
-       MonoClass *klass;
-       const char *name;
-       guint16 flags;
-       guint16 num;
-       MonoClass** constraints; /* NULL means end of list */
-};
-
 guint32     mono_metadata_parse_typedef_or_ref (MonoImage      *m,
                                                 const char      *ptr,
                                                 const char     **rptr);
@@ -406,7 +391,7 @@ mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec,
 /*
  * Makes a token based on a table and an index
  */
-#define mono_metadata_make_token(table,idx) (((table) << 24)| idx)
+#define mono_metadata_make_token(table,idx) (((table) << 24)| (idx))
 
 /*
  * Returns the table index that this token encodes.
@@ -425,6 +410,4 @@ guint32 mono_metadata_token_from_dor (guint32 dor_index);
 
 char *mono_guid_to_string (const guint8 *guid);
 
-MonoGenericParam *mono_metadata_load_generic_params (MonoImage *image, guint32 token, guint32 *num);
-
 #endif /* __MONO_METADATA_H__ */