dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.22,1.23


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.22,1.23
Date: Mon, 04 Nov 2002 19:25:23 -0500

Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv20413/cscc/csharp

Modified Files:
        cs_gather.c 
Log Message:


Fix an order of compilation problem in "mscorlib.dll" with "params" parameters.


Index: cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** cs_gather.c 18 Oct 2002 18:01:19 -0000      1.22
--- cs_gather.c 5 Nov 2002 00:25:20 -0000       1.23
***************
*** 825,834 ****
        }
  
        /* Create the method information block */
-       methodInfo = ILMethodCreate(classInfo, 0, name,
-                                                               
(method->modifiers & 0xFFFF));
        if(!methodInfo)
        {
!               CCOutOfMemory();
        }
        method->methodInfo = methodInfo;
--- 825,867 ----
        }
  
+       /* Special-case the constructor for "ParamArrayAttribute", because
+          we may have already created it as a reference.  Needed to resolve
+          order of compilation issues in "mscorlib.dll". */
+       if(!strcmp(name, ".ctor") &&
+          !strcmp(ILClass_Name(classInfo), "ParamArrayAttribute") &&
+          ILClass_Namespace(classInfo) != 0 &&
+          !strcmp(ILClass_Namespace(classInfo), "System"))
+       {
+               methodInfo = 0;
+               while((methodInfo = (ILMethod *)ILClassNextMemberByKind
+                                       (classInfo, (ILMember *)methodInfo,
+                                        IL_META_MEMBERKIND_METHOD)) != 0)
+               {
+                       if(!strcmp(ILMethod_Name(methodInfo), ".ctor") &&
+                          (ILMethod_Token(methodInfo) & IL_META_TOKEN_MASK) ==
+                                       IL_META_TOKEN_MEMBER_REF)
+                       {
+                               if(!ILMethodNewToken(methodInfo))
+                               {
+                                       CCOutOfMemory();
+                               }
+                               break;
+                       }
+               }
+       }
+       else
+       {
+               methodInfo = 0;
+       }
+ 
        /* Create the method information block */
        if(!methodInfo)
        {
!               methodInfo = ILMethodCreate(classInfo, 0, name,
!                                                                       
(method->modifiers & 0xFFFF));
!               if(!methodInfo)
!               {
!                       CCOutOfMemory();
!               }
        }
        method->methodInfo = methodInfo;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]