+2004-08-02 Martin Baulig <martin@ximian.com>
+
+ * get.c (dis_stringify_object_with_class): Include our generic
+ arguments in the method's class name.
+
+ * main.c (dis_generic_param_and_constraints): Use the new
+ constraints syntax.
+
2004-08-02 Martin Baulig <martin@ximian.com>
* dump.c (dump_stream_blob): Format this nicely.
{
/* FIXME: handle MONO_TYPE_OBJECT ... */
const char *otype = c->byval_arg.type == MONO_TYPE_VALUETYPE ? "valuetype" : "class" ;
- char *assemblyref = NULL, *result, *esname;
+ char *assemblyref = NULL, *result, *esname, *generic = NULL;
if (m != c->image) {
if (c->image->assembly_name) {
/* we cheat */
esname = get_escaped_name (result);
g_free (result);
- result = g_strdup_printf ("%s %s%s", otype, assemblyref?assemblyref:"", esname);
+ if (c->generic_inst) {
+ MonoGenericInst *ginst = c->generic_inst;
+ GString *str = g_string_new ("");
+ int i;
+
+ for (i = 0; i < ginst->type_argc; i++){
+ char *t = dis_stringify_type (m, ginst->type_argv [i]);
+
+ g_string_append (str, t);
+ if (i+1 != ginst->type_argc)
+ g_string_append (str, ", ");
+ g_free (t);
+ }
+ generic = g_strdup_printf ("<%s>", str->str);
+ g_string_free (str, TRUE);
+ }
+
+
+ result = g_strdup_printf ("%s %s%s%s", otype, assemblyref?assemblyref:"",
+ esname, generic?generic:"");
+ g_free (generic);
g_free (assemblyref);
g_free (esname);
continue;
if (found_count == 0)
- fprintf (output, "<%s", mono_metadata_string_heap (m, cols [MONO_GENERICPARAM_NAME]));
+ fprintf (output, "<");
else
- fprintf (output, ", %s", mono_metadata_string_heap (m, cols [MONO_GENERICPARAM_NAME]));
+ fprintf (output, ", ");
for (cnst_ind = cnst_start; cnst_ind < ct->rows; cnst_ind++) {
char *sig;
if (cnst_block == NULL)
cnst_block = g_string_new ("");
sig = get_typedef_or_ref (m, ccols [MONO_GENPARCONSTRAINT_CONSTRAINT]);
- g_string_append_printf (cnst_block, " .constraint !%d is %s\n",
- cols [MONO_GENERICPARAM_NUMBER], sig);
+ fprintf (output, "(%s) ", sig);
g_free (sig);
cnst_start = cnst_ind;
}
-
+
+ fprintf (output, "%s", mono_metadata_string_heap (m, cols [MONO_GENERICPARAM_NAME]));
+
found_count++;
}