[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog dumpasm/dump_class.c
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog dumpasm/dump_class.c |
Date: |
Mon, 13 Aug 2007 17:53:48 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 07/08/13 17:53:48
Modified files:
. : ChangeLog
dumpasm : dump_class.c
Log message:
Add dumping custom attributes for generic parameters.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3484&r2=1.3485
http://cvs.savannah.gnu.org/viewcvs/pnet/dumpasm/dump_class.c?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3484
retrieving revision 1.3485
diff -u -b -r1.3484 -r1.3485
--- ChangeLog 3 Aug 2007 09:16:11 -0000 1.3484
+++ ChangeLog 13 Aug 2007 17:53:47 -0000 1.3485
@@ -1,3 +1,8 @@
+2007-08-13 Klaus Treichel <address@hidden>
+
+ * dumpasm/dump_class.c: Add dumping custom attributes for generic
+ parameters.
+
2007-08-03 Radek Polak <address@hidden>
* engine/jitc.c: Added function ILJitPrintMethod that can be used from
gdb
Index: dumpasm/dump_class.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/dumpasm/dump_class.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- dumpasm/dump_class.c 1 Jul 2007 14:15:15 -0000 1.3
+++ dumpasm/dump_class.c 13 Aug 2007 17:53:48 -0000 1.4
@@ -53,6 +53,37 @@
}
/*
+ * Dump custom attributes for generic parameters
+ */
+static void Dump_GenericParCustomAttrs(ILImage *image, FILE *outstream,
+ int
flags, int indent,
+
ILProgramItem *owner)
+{
+ ILUInt32 numGenericParams = ILGenericParGetNumParams(owner);
+ ILUInt32 current = 0;
+
+ for(current = 0; current < numGenericParams; current++)
+ {
+ ILGenericPar *genPar = ILGenericParGetFromOwner(owner, current);
+
+ if(ILProgramItemNextAttribute(ILToProgramItem(genPar), 0) != 0)
+ {
+ if(indent == 1)
+ {
+ fputs("\t", outstream);
+ }
+ else if(indent == 2)
+ {
+ fputs("\t\t", outstream);
+ }
+ fprintf(outstream, ".param type[%X]\n", current + 1);
+ ILDAsmDumpCustomAttrs(image, outstream, flags, indent,
+
ILToProgramItem(genPar));
+ }
+ }
+}
+
+/*
* Dump a method definition.
*/
static void Dump_MethodDef(ILImage *image, FILE *outstream, int flags,
@@ -118,6 +149,10 @@
putc('\n', outstream);
}
+ /* Dump the custom attributes for the generic parameters if present */
+ Dump_GenericParCustomAttrs(image, outstream, flags, 2,
+
ILToProgramItem(method));
+
/* If we have an RVA, then we need to dump the method's contents */
if(rva && (flags & ILDASM_NO_IL) == 0)
{
@@ -462,6 +497,10 @@
ILDAsmDumpCustomAttrs(image, outstream, flags, 1,
ILToProgramItem(info));
}
+
+ /* Dump the custom attributes for the generic parameters if
present */
+ Dump_GenericParCustomAttrs(image, outstream, flags, 1,
+
ILToProgramItem(info));
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog dumpasm/dump_class.c,
Klaus Treichel <=