[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/ilsize ilsize.c,1.3,1.4
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/ilsize ilsize.c,1.3,1.4 |
Date: |
Thu, 13 Feb 2003 19:26:48 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/ilsize
In directory subversions:/tmp/cvs-serv31718/ilsize
Modified Files:
ilsize.c
Log Message:
Report all of the token table sizes in the "-D" (detailed) mode.
Index: ilsize.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilsize/ilsize.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ilsize.c 15 Jan 2002 23:49:01 -0000 1.3
--- ilsize.c 14 Feb 2003 00:26:44 -0000 1.4
***************
*** 312,344 ****
if(radix == 10)
{
! printf("%-16s %7lu\n", name, value);
}
else if(radix == 16)
{
! printf("%-16s %#10lx\n", name, value);
}
else
{
! printf("%-16s %#10lo\n", name, value);
}
}
/*
! * Count the number of nested types in an image.
*/
! static unsigned long numNestedTypes(ILImage *image)
{
! ILClass *info = 0;
! unsigned long num = 0;
! while((info = (ILClass *)ILImageNextToken
! (image, IL_META_TOKEN_TYPE_DEF, info)) != 0)
! {
! if(ILClassGetNestedParent(info) != 0)
! {
! ++num;
! }
! }
! return num;
! }
/*
--- 312,373 ----
if(radix == 10)
{
! printf("%-20s %7lu\n", name, value);
}
else if(radix == 16)
{
! printf("%-20s %#10lx\n", name, value);
}
else
{
! printf("%-20s %#10lo\n", name, value);
}
}
/*
! * Token tables and their names.
*/
! static struct
{
! const char *name;
! ILToken type;
!
! } tokenTables[] = {
! {"modules", IL_META_TOKEN_MODULE},
! {"type refs", IL_META_TOKEN_TYPE_REF},
! {"type defs", IL_META_TOKEN_TYPE_DEF},
! {"fields", IL_META_TOKEN_FIELD_DEF},
! {"methods", IL_META_TOKEN_METHOD_DEF},
! {"parameters", IL_META_TOKEN_PARAM_DEF},
! {"interface decls", IL_META_TOKEN_INTERFACE_IMPL},
! {"member refs", IL_META_TOKEN_MEMBER_REF},
! {"constants", IL_META_TOKEN_CONSTANT},
! {"attributes", IL_META_TOKEN_CUSTOM_ATTRIBUTE},
! {"marshal decls", IL_META_TOKEN_FIELD_MARSHAL},
! {"security decls", IL_META_TOKEN_DECL_SECURITY},
! {"class layout decls", IL_META_TOKEN_CLASS_LAYOUT},
! {"field layout decls", IL_META_TOKEN_FIELD_LAYOUT},
! {"stand along sigs", IL_META_TOKEN_STAND_ALONE_SIG},
! {"event mappings", IL_META_TOKEN_EVENT_MAP},
! {"events", IL_META_TOKEN_EVENT},
! {"property mappings", IL_META_TOKEN_PROPERTY_MAP},
! {"properties", IL_META_TOKEN_PROPERTY},
! {"semantic decls", IL_META_TOKEN_METHOD_SEMANTICS},
! {"overrides", IL_META_TOKEN_METHOD_IMPL},
! {"module refs", IL_META_TOKEN_MODULE_REF},
! {"type specs", IL_META_TOKEN_TYPE_SPEC},
! {"pinvoke decls", IL_META_TOKEN_IMPL_MAP},
! {"field rva decls", IL_META_TOKEN_FIELD_RVA},
! {"assemblies", IL_META_TOKEN_ASSEMBLY},
! {"processor defs", IL_META_TOKEN_PROCESSOR_DEF},
! {"os defs", IL_META_TOKEN_OS_DEF},
! {"assembly refs", IL_META_TOKEN_ASSEMBLY_REF},
! {"processor refs", IL_META_TOKEN_PROCESSOR_REF},
! {"os refs", IL_META_TOKEN_OS_REF},
! {"files", IL_META_TOKEN_FILE},
! {"exported types", IL_META_TOKEN_EXPORTED_TYPE},
! {"manifest resources", IL_META_TOKEN_MANIFEST_RESOURCE},
! {"nested classes", IL_META_TOKEN_NESTED_CLASS},
! {0, 0}
! };
/*
***************
*** 353,356 ****
--- 382,387 ----
unsigned long res;
unsigned long other;
+ int index;
+ unsigned long num;
/* Attempt to load the image into memory */
***************
*** 372,396 ****
/* Print count information for the various token types */
! print("types", radix,
! ILImageNumTokens(image, IL_META_TOKEN_TYPE_DEF));
! print("fields", radix,
! ILImageNumTokens(image, IL_META_TOKEN_FIELD_DEF));
! print("methods", radix,
! ILImageNumTokens(image, IL_META_TOKEN_METHOD_DEF));
! print("events", radix,
! ILImageNumTokens(image, IL_META_TOKEN_EVENT));
! print("properties", radix,
! ILImageNumTokens(image, IL_META_TOKEN_PROPERTY));
! print("parameters", radix,
! ILImageNumTokens(image, IL_META_TOKEN_PARAM_DEF));
! print("attributes", radix,
! ILImageNumTokens(image, IL_META_TOKEN_CUSTOM_ATTRIBUTE));
! print("pinvoke", radix,
! ILImageNumTokens(image, IL_META_TOKEN_IMPL_MAP));
! print("module refs", radix,
! ILImageNumTokens(image, IL_META_TOKEN_MODULE_REF));
! print("assembly refs", radix,
! ILImageNumTokens(image, IL_META_TOKEN_ASSEMBLY_REF));
! print("nested types", radix, numNestedTypes(image));
/* Add some space between multiple files */
--- 403,416 ----
/* Print count information for the various token types */
! index = 0;
! while(tokenTables[index].name != 0)
! {
! num = ILImageNumTokens(image, tokenTables[index].type);
! if(num > 0)
! {
! print(tokenTables[index].name, radix, num);
! }
! ++index;
! }
/* Add some space between multiple files */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/ilsize ilsize.c,1.3,1.4,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2127,1.2128
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/image member.c,1.21,1.22 meta_build.c,1.16,1.17 program.h,1.11,1.12
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2127,1.2128
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/image member.c,1.21,1.22 meta_build.c,1.16,1.17 program.h,1.11,1.12
- Index(es):