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

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

[Dotgnu-pnet-commits] CVS: pnet/codegen cg_decls.tc,1.46,1.47 cg_gen.c,


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/codegen cg_decls.tc,1.46,1.47 cg_gen.c,1.44,1.45 cg_gen.h,1.36,1.37 cg_nodemap.c,1.3,1.4 cg_nodemap.h,1.2,1.3
Date: Tue, 25 Feb 2003 19:07:28 -0500

Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv3149/codegen

Modified Files:
        cg_decls.tc cg_gen.c cg_gen.h cg_nodemap.c cg_nodemap.h 
Log Message:


Begin implementing type gathering for generic types.


Index: cg_decls.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_decls.tc,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** cg_decls.tc 11 Jan 2003 21:16:36 -0000      1.46
--- cg_decls.tc 26 Feb 2003 00:07:25 -0000      1.47
***************
*** 132,135 ****
--- 132,156 ----
                                                 IL_DUMP_QUOTE_NAMES);
  
+               /* Output the generic parameters, if any */
+               if(ILGenericParGetNumParams(ILToProgramItem(classInfo)) > 0)
+               {
+                       ILUInt32 number = 0;
+                       ILGenericPar *genPar;
+                       putc('<', info->asmOutput);
+                       while((genPar = ILGenericParGetFromOwner
+                                       (ILToProgramItem(classInfo), number)) 
!= 0)
+                       {
+                               if(number > 0)
+                               {
+                                       fputs(", ", info->asmOutput);
+                               }
+                               /* TODO: generic type constraints */
+                               ILDumpIdentifier(info->asmOutput, 
ILGenericPar_Name(genPar),
+                                                                0, 
IL_DUMP_QUOTE_NAMES);
+                               ++number;
+                       }
+                       putc('>', info->asmOutput);
+               }
+ 
                /* Output the name of the parent class */
                if(ILClass_ParentRef(classInfo) != 0)

Index: cg_gen.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_gen.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** cg_gen.c    28 Nov 2002 01:51:43 -0000      1.44
--- cg_gen.c    26 Feb 2003 00:07:25 -0000      1.45
***************
*** 136,139 ****
--- 136,141 ----
        info->arrayInit = 0;
        info->itemHash = 0;
+       info->currentTypeFormals = 0;
+       info->currentMethodFormals = 0;
        if(useBuiltinLibrary)
        {

Index: cg_gen.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_gen.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** cg_gen.h    8 Dec 2002 02:54:46 -0000       1.36
--- cg_gen.h    26 Feb 2003 00:07:25 -0000      1.37
***************
*** 140,143 ****
--- 140,145 ----
        ILHashTable    *itemHash;                       /* Hash program items 
to nodes */
        ILVarUsageTable *varUsage;                      /* Variable usage table 
*/
+       ILNode             *currentTypeFormals; /* Current generic type formals 
*/
+       ILNode             *currentMethodFormals; /* Current generic method 
formals */
  
  };

Index: cg_nodemap.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_nodemap.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** cg_nodemap.c        28 Nov 2002 01:51:43 -0000      1.3
--- cg_nodemap.c        26 Feb 2003 00:07:25 -0000      1.4
***************
*** 193,196 ****
--- 193,198 ----
        context->currentClass = info->currentClass;
        context->currentNamespace = info->currentNamespace;
+       context->currentTypeFormals = info->currentTypeFormals;
+       context->currentMethodFormals = info->currentMethodFormals;
        context->overflowInsns = info->overflowInsns;
  
***************
*** 236,243 ****
--- 238,249 ----
                        info->currentScope = globalScope;
                }
+               info->currentTypeFormals = classNode->typeFormals;
+               info->currentMethodFormals = 0;
        }
        else
        {
                info->currentScope = globalScope;
+               info->currentTypeFormals = 0;
+               info->currentMethodFormals = 0;
        }
        info->overflowInsns = info->overflowGlobal;
***************
*** 252,255 ****
--- 258,263 ----
        info->currentClass = context->currentClass;
        info->currentNamespace = context->currentNamespace;
+       info->currentTypeFormals = context->currentTypeFormals;
+       info->currentMethodFormals = context->currentMethodFormals;
        info->overflowInsns = context->overflowInsns;
  }

Index: cg_nodemap.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_nodemap.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** cg_nodemap.h        28 Nov 2002 01:51:43 -0000      1.2
--- cg_nodemap.h        26 Feb 2003 00:07:25 -0000      1.3
***************
*** 34,37 ****
--- 34,39 ----
        ILNode  *currentClass;
        ILNode  *currentNamespace;
+       ILNode  *currentTypeFormals;
+       ILNode  *currentMethodFormals;
        int              overflowInsns;
  





reply via email to

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