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.32,1.33 cs_lo


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.32,1.33 cs_lookup.c,1.16,1.17
Date: Fri, 20 Dec 2002 04:37:49 -0500

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

Modified Files:
        cs_gather.c cs_lookup.c 
Log Message:
I finally figure the "One True Way" to fix Bug #1970 aka nested ordering bug


Index: cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** cs_gather.c 12 Dec 2002 19:45:03 -0000      1.32
--- cs_gather.c 20 Dec 2002 09:37:47 -0000      1.33
***************
*** 136,141 ****
        if(defn->nestedParent)
        {
!               CreateType(info, globalScope, list,
                                   systemObjectName, (ILNode 
*)(defn->nestedParent));
                nestedScope = (ILProgramItem *)(defn->nestedParent->classInfo);
                if(!nestedScope || nestedScope == (ILProgramItem *)1 ||
--- 136,150 ----
        if(defn->nestedParent)
        {
!               /* this is a backward edge of the class dependency graph,
!                * since we'll be coming back to this very same class by
!                * defn->nestedParent as it's nested child or the forward
!                * edge , let's skip this loop,by returning here */
!               if(defn->nestedParent->classInfo==0)
!               {
!                       defn->classInfo=0;
!                       CreateType(info, globalScope, list,
                                   systemObjectName, (ILNode 
*)(defn->nestedParent));
+                       return; 
+               }
                nestedScope = (ILProgramItem *)(defn->nestedParent->classInfo);
                if(!nestedScope || nestedScope == (ILProgramItem *)1 ||

Index: cs_lookup.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lookup.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** cs_lookup.c 15 Nov 2002 12:50:57 -0000      1.16
--- cs_lookup.c 20 Dec 2002 09:37:47 -0000      1.17
***************
*** 1434,1437 ****
--- 1434,1438 ----
  {
        CSSemValue retSem;
+       ILNode *typeNode=NULL;
  
        /* Determine how to resolve the member from its semantic kind */
***************
*** 1492,1495 ****
--- 1493,1517 ----
                                                  "`%s' is not an instance 
member of the type `%s'",
                                                  name, 
CSTypeToName(CSSemGetType(value)));
+                       }
+               }
+               break;
+       
+               case CS_SEMKIND_TYPE_NODE:
+               {
+                       if(genInfo->typeGather)
+                       {
+                               if((typeNode =FindNestedClass(NULL,
+                                                                       
CSSemGetTypeNode(value),name)))
+                               {
+                                       CSSemSetTypeNode(retSem,typeNode);
+                                       return retSem;
+                               }
+                       }
+                       /*  Fall through to not-found processing  */
+                       if (!literalType) {
+                               CCErrorOnLine(yygetfilename(node), 
yygetlinenum(node),
+                                                 "`%s' is not a nesteed class 
or member of `%s'",
+                                                 name,((ILNode_ClassDefn*)
+                                                                 
CSSemGetTypeNode(value))->name);
                        }
                }




reply via email to

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