[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_library.c,1.18,1.19 cg_nodes.
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_library.c,1.18,1.19 cg_nodes.tc,1.70,1.71 |
Date: |
Thu, 21 Nov 2002 00:25:40 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv7632/codegen
Modified Files:
cg_library.c cg_nodes.tc
Log Message:
Add the "DefaultMember" attribute to classes that have indexers.
Index: cg_library.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_library.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** cg_library.c 27 Sep 2002 23:51:23 -0000 1.18
--- cg_library.c 21 Nov 2002 05:25:38 -0000 1.19
***************
*** 132,135 ****
--- 132,176 ----
/*
+ * Add a parameterized constructor to a class.
+ */
+ static int AddParamConstructor(ILClass *classInfo, ILType *argType1,
+ ILType *argType2)
+ {
+ ILMethod *method;
+ ILType *signature;
+ method = ILMethodCreate(classInfo, 0, ".ctor",
+ IL_META_METHODDEF_PUBLIC |
+
IL_META_METHODDEF_HIDE_BY_SIG |
+
IL_META_METHODDEF_SPECIAL_NAME |
+
IL_META_METHODDEF_RT_SPECIAL_NAME);
+ if(!method)
+ {
+ return 0;
+ }
+ signature = ILTypeCreateMethod(ILClassToContext(classInfo),
ILType_Void);
+ if(!signature)
+ {
+ return 0;
+ }
+ if(argType1 != ILType_Void)
+ {
+ if(!ILTypeAddParam(ILClassToContext(classInfo), signature,
argType1))
+ {
+ return 0;
+ }
+ }
+ if(argType2 != ILType_Void)
+ {
+ if(!ILTypeAddParam(ILClassToContext(classInfo), signature,
argType2))
+ {
+ return 0;
+ }
+ }
+ ILTypeSetCallConv(signature, IL_META_CALLCONV_HASTHIS);
+ ILMemberSetSignature((ILMember *)method, signature);
+ return 1;
+ }
+
+ /*
* Add the constructor to the "DecimalConstantAttribute" class.
*
***************
*** 234,237 ****
--- 275,279 ----
ILClass *attributeClass;
ILClass *paramAttributeClass;
+ ILClass *defMemberAttributeClass;
ILClass *decimalConstantClass;
ILClass *exceptionClass;
***************
*** 418,421 ****
--- 460,476 ----
IL_META_TYPEDEF_SEALED);
ABORT_IF(constructorOK, AddDefaultConstructor(paramAttributeClass));
+
+ /* Create the "System.Reflection.DefaultMemberAttribute" class */
+ ABORT_IF(defMemberAttributeClass,
+ ILClassCreate(scope, 0, "DefaultMemberAttribute",
+ "System.Reflection",
attributeClass));
+ ILClassSetAttrs(defMemberAttributeClass, ~0,
+ IL_META_TYPEDEF_PUBLIC |
+ IL_META_TYPEDEF_SERIALIZABLE |
+ IL_META_TYPEDEF_BEFORE_FIELD_INIT |
+ IL_META_TYPEDEF_SEALED);
+ ABORT_IF(constructorOK,
+ AddParamConstructor(defMemberAttributeClass,
+
ILType_FromClass(stringClass), ILType_Void));
/* Create "System.Runtime.CompilerServices.DecimalConstantAttribute" */
Index: cg_nodes.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_nodes.tc,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -r1.70 -r1.71
*** cg_nodes.tc 20 Nov 2002 21:08:49 -0000 1.70
--- cg_nodes.tc 21 Nov 2002 05:25:38 -0000 1.71
***************
*** 803,806 ****
--- 803,807 ----
%nocreate ILNode_ClassDefn *nestedParent = {0};
%nocreate ILVisitMode visited = {ILVisitMode_NotVisited};
+ %nocreate char *defaultMemberName = {0};
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/codegen cg_library.c,1.18,1.19 cg_nodes.tc,1.70,1.71,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1873,1.1874
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/samples I18N.CJK.dll,1.18,1.19 I18N.MidEast.dll,1.18,1.19 I18N.Other.dll,1.18,1.19 I18N.Rare.dll,1.18,1.19 I18N.West.dll,1.18,1.19 I18N.dll,1.19,1.20 System.Xml.dll,1.16,1.17 System.dll,1.20,1.21 mscorlib.dll,1.89,1.90
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1873,1.1874
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/samples I18N.CJK.dll,1.18,1.19 I18N.MidEast.dll,1.18,1.19 I18N.Other.dll,1.18,1.19 I18N.Rare.dll,1.18,1.19 I18N.West.dll,1.18,1.19 I18N.dll,1.19,1.20 System.Xml.dll,1.16,1.17 System.dll,1.20,1.21 mscorlib.dll,1.89,1.90
- Index(es):