[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/dumpasm dump_type.c,1.10,1.11
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/dumpasm dump_type.c,1.10,1.11 |
Date: |
Tue, 18 Feb 2003 21:42:45 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/dumpasm
In directory subversions:/tmp/cvs-serv2535/dumpasm
Modified Files:
dump_type.c
Log Message:
Dump method specifications correctly in ildasm.
Index: dump_type.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/dumpasm/dump_type.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** dump_type.c 19 Feb 2003 02:20:46 -0000 1.10
--- dump_type.c 19 Feb 2003 02:42:43 -0000 1.11
***************
*** 484,490 ****
}
! void ILDumpMethodType(FILE *stream, ILImage *image, ILType *type, int flags,
! ILClass *info, const char *methodName,
! ILMethod *methodInfo)
{
ILUInt32 callingConventions;
--- 484,494 ----
}
! /*
! * Internal version of "ILDumpMethodType" that can also handle
! * instantiations of generic method calls.
! */
! static void DumpMethodType(FILE *stream, ILImage *image, ILType *type,
! int flags, ILClass *info,
const char *methodName,
! ILMethod *methodInfo, ILType
*withTypes)
{
ILUInt32 callingConventions;
***************
*** 496,499 ****
--- 500,505 ----
ILProgramItem *constraint;
ILTypeSpec *spec;
+ unsigned long numWithParams;
+ unsigned long withParam;
/* Determine if we need to dump the generic parameters */
***************
*** 587,590 ****
--- 593,612 ----
}
}
+ else if(withTypes)
+ {
+ /* Dump the instantiation types from a method specification */
+ putc('<', stream);
+ numWithParams = ILTypeNumParams(withTypes);
+ for(withParam = 1; withParam <= numWithParams; ++withParam)
+ {
+ if(withParam != 1)
+ {
+ fputs(", ", stream);
+ }
+ ILDumpType(stream, image,
+ ILTypeGetParam(withTypes,
withParam), flags);
+ }
+ putc('>', stream);
+ }
/* Dump the parameters */
***************
*** 592,595 ****
--- 614,645 ----
DumpParams(stream, image, type, methodInfo, flags);
putc(')', stream);
+ }
+
+ void ILDumpMethodType(FILE *stream, ILImage *image, ILType *type, int flags,
+ ILClass *info, const char *methodName,
+ ILMethod *methodInfo)
+ {
+ DumpMethodType(stream, image, type, flags, info,
+ methodName, methodInfo, 0);
+ }
+
+ void ILDumpMethodSpec(FILE *stream, ILImage *image,
+ ILMethodSpec *spec, int flags)
+ {
+ ILMember *member;
+ ILMethod *method;
+
+ /* Extract the member and make sure it is a method */
+ member = ILMemberResolve(ILMethodSpec_Method(spec));
+ if(!ILMember_IsMethod(member))
+ {
+ return;
+ }
+ method = (ILMethod *)member;
+
+ /* Dump the method information, together with the instantiation types */
+ DumpMethodType(stream, image, ILMethod_Signature(method), flags,
+ ILMethod_Owner(method),
ILMethod_Name(method),
+ 0, ILMethodSpec_Type(spec));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/dumpasm dump_type.c,1.10,1.11,
Rhys Weatherley <address@hidden> <=