[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_scope.c,1.16,1.17
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_scope.c,1.16,1.17 |
Date: |
Sun, 17 Nov 2002 04:15:22 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv27337/codegen
Modified Files:
cg_scope.c
Log Message:
oh god .. let this be the last patch for this bug :-(
Index: cg_scope.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_scope.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** cg_scope.c 16 Nov 2002 15:42:56 -0000 1.16
--- cg_scope.c 17 Nov 2002 09:15:20 -0000 1.17
***************
*** 60,63 ****
--- 60,64 ----
ILRBTree nameTree; /* Tree containing all names in
the scope */
ILScopeUsingInfo *using; /* Using declarations for the scope */
+ ILScope *aliases; /* aliases lookup scope */
ILClass *classInfo; /* Data attached to the scope for
searching */
***************
*** 100,103 ****
--- 101,113 ----
}
+ if(scope->aliases)
+ {
+ data=(*(scope->aliases->lookup))(scope->aliases,name);
+ if(data !=0)
+ {
+ return data;
+ }
+ }
+
/* Search each of the "using" scopes */
using = scope->using;
***************
*** 141,144 ****
--- 151,155 ----
ILRBTreeInit(&(scope->nameTree), NameCompare, 0);
scope->using = 0;
+ scope->aliases = 0;
scope->classInfo = 0;
scope->lookup = NormalScope_Lookup;
***************
*** 401,408 ****
using->next = scope->using;
scope->using = using;
!
/* Change the lookup function to one which handles "using" clauses */
scope->lookup = UsingScope_Lookup;
-
return 1;
}
--- 412,418 ----
using->next = scope->using;
scope->using = using;
!
/* Change the lookup function to one which handles "using" clauses */
scope->lookup = UsingScope_Lookup;
return 1;
}
***************
*** 411,414 ****
--- 421,425 ----
{
scope->using = 0;
+ scope->aliases = 0;
}
***************
*** 527,544 ****
We must do this because the global "using" context will be
cleared at the end of the parse, but we need the information
! it contains after the parse . The attachScope contains the
! alias information to which the namespaceref scopes are attached
! by the following code.*/
! if(attachScope)
! {
! usingScope=attachScope; /* reuse the attachScope for ->using */
! }
! else
! {
! usingScope = ILScopeCreate(scope->info, scope);
! }
usingScope->using = scope->using;
usingScope->lookup = UsingScope_Lookup;
-
/* Create a scope to hold the type itself */
--- 538,546 ----
We must do this because the global "using" context will be
cleared at the end of the parse, but we need the information
! it contains after the parse */
! usingScope = ILScopeCreate(scope->info, scope);
! usingScope->aliases = attachScope;
usingScope->using = scope->using;
usingScope->lookup = UsingScope_Lookup;
/* Create a scope to hold the type itself */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/codegen cg_scope.c,1.16,1.17,
Gopal.V <address@hidden> <=