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_oper.tc,1.39,1.40 cs_lva


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_oper.tc,1.39,1.40 cs_lvalue.tc,1.42,1.43
Date: Thu, 08 May 2003 11:25:59 -0400

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

Modified Files:
        cs_oper.tc cs_lvalue.tc 
Log Message:
Fix bug in attribute eval and streamline type lookups.


Index: cs_oper.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_oper.tc,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** cs_oper.tc  7 May 2003 05:58:21 -0000       1.39
--- cs_oper.tc  8 May 2003 15:25:56 -0000       1.40
***************
*** 1384,1387 ****
--- 1384,1388 ----
        CSSemValue value;
        ILNode_TypeOf *typeofNode;
+       int savedState=info->inAttrArg;
  
        info->inAttrArg=1;
***************
*** 1415,1419 ****
                }
                CSSemSetType(value, typeofNode->type);
!               return value;
        }
  
--- 1416,1420 ----
                }
                CSSemSetType(value, typeofNode->type);
!               goto cleanup;
        }
  
***************
*** 1424,1428 ****
        if(CSSemIsType(value))
        {
!               return value;
        }
  
--- 1425,1429 ----
        if(CSSemIsType(value))
        {
!               goto cleanup;
        }
  
***************
*** 1442,1446 ****
        }
  
!       info->inAttrArg=0;
  
        /* Return the semantic information to the caller */
--- 1443,1448 ----
        }
  
! cleanup:
!       info->inAttrArg=savedState;
  
        /* Return the semantic information to the caller */

Index: cs_lvalue.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lvalue.tc,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** cs_lvalue.tc        16 Apr 2003 01:34:18 -0000      1.42
--- cs_lvalue.tc        8 May 2003 15:25:57 -0000       1.43
***************
*** 808,812 ****
  {
        CSSemValue value;
!       ILScopeData *data;
        unsigned long index;
        ILNode_MethodDeclaration *method;
--- 808,812 ----
  {
        CSSemValue value;
!       ILScopeData *data=NULL;
        unsigned long index;
        ILNode_MethodDeclaration *method;
***************
*** 815,821 ****
        ILNode_UsingAlias *alias;
        ILType *type;
! 
!       /* Look for local variables in the current scope */
!       data = ILScopeLookup(info->currentScope, node->name, 1);
        if(data && ILScopeDataGetKind(data) == IL_SCOPE_LOCAL)
        {
--- 815,824 ----
        ILNode_UsingAlias *alias;
        ILType *type;
!       
!       if(!info->inSemType)
!       {
!               /* Look for local variables in the current scope */
!               data = ILScopeLookup(info->currentScope, node->name, 1);
!       }
        if(data && ILScopeDataGetKind(data) == IL_SCOPE_LOCAL)
        {
***************
*** 946,952 ****
--- 949,958 ----
        ILNode_UsingAlias *alias;
        ILScopeData *data;
+       int savedState=info->inSemType;
  
+       info->inSemType=1;
        /* Resolve the simple name */
        value = CSResolveSimpleNameQuiet(info, (ILNode *)node, node->name, 1);
+       info->inSemType=savedState;
  
        if (CSSemGetKind(value) == CS_SEMKIND_TYPE)
***************
*** 978,982 ****
--- 984,991 ----
                }
                info->resolvingAlias = 1;
+               savedState=info->inSemType;
+               info->inSemType=1;
                value = ILNode_SemAnalysis(*parent,info,parent);
+               info->inSemType=savedState;
                info->resolvingAlias = 0;
                alias->visited=ILVisitMode_Done;
***************
*** 1016,1020 ****
        CSSemValue value2;
        char *name;
!       
        /* Get the semantic value for the left part of the identifier */
        value = ILNode_SemAnalysis(node->left, info, &(node->left));
--- 1025,1033 ----
        CSSemValue value2;
        char *name;
!       int savedState = info->inSemType;
! 
!       /* Restrict lookups for types only (ie namespaces , types, nested types 
*/
!       info->inSemType = 1;
! 
        /* Get the semantic value for the left part of the identifier */
        value = ILNode_SemAnalysis(node->left, info, &(node->left));
***************
*** 1023,1026 ****
--- 1036,1041 ----
        name = ILQualIdentName(node->right, 0);
        value2 = CSResolveMemberName(info, (ILNode *)node, value, name, 1);
+       
+       info->inSemType = savedState;
  
        if (CSSemGetKind(value2) != CS_SEMKIND_TYPE)





reply via email to

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