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

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

[Dotgnu-pnet-commits] CVS: treecc ChangeLog,1.86,1.87 Makefile.am,1.5,1.


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: treecc ChangeLog,1.86,1.87 Makefile.am,1.5,1.6 context.c,1.5,1.6 gen_c.c,1.6,1.7 gen_cpp.c,1.5,1.6 info.h,1.10,1.11 options.c,1.8,1.9
Date: Fri, 04 Jul 2003 00:53:51 -0400

Update of /cvsroot/dotgnu-pnet/treecc
In directory subversions:/tmp/cvs-serv32530

Modified Files:
        ChangeLog Makefile.am context.c gen_c.c gen_cpp.c info.h 
        options.c 
Log Message:


Add the "gc_allocator" option to treecc, to make the node allocator use libgc.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/ChangeLog,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** ChangeLog   4 Jul 2003 01:34:30 -0000       1.86
--- ChangeLog   4 Jul 2003 04:53:48 -0000       1.87
***************
*** 4,7 ****
--- 4,14 ----
        * README: minor change to the treecc README file.
  
+       * Makefile.am, context.c, gen_c.c, gen_cpp.c, info.h, options.c,
+       doc/treecc.texi, etc/Makefile.am, etc/c_gc_skel.c, etc/c_gc_skel.h,
+       etc/cpp_gc_skel.cc, etc/cpp_gc_skel.h, tests/output17.out,
+       tests/output17.tst, tests/output18.out, tests/output18.tst,
+       tests/test_list: add the "gc_allocator" option to treecc,
+       to make the node allocator use libgc.
+ 
  2003-02-29  Rhys Weatherley  <address@hidden>
  

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Makefile.am 10 Jan 2003 22:13:37 -0000      1.5
--- Makefile.am 4 Jul 2003 04:53:48 -0000       1.6
***************
*** 29,33 ****
                                 $(top_srcdir)/etc/c_skel.h \
                                 $(top_srcdir)/etc/cpp_skel.cc \
!                                $(top_srcdir)/etc/cpp_skel.h
  
  $(srcdir)/skels.c: $(SKELETON_FILES) $(top_srcdir)/mkskel-sh
--- 29,37 ----
                                 $(top_srcdir)/etc/c_skel.h \
                                 $(top_srcdir)/etc/cpp_skel.cc \
!                                $(top_srcdir)/etc/cpp_skel.h \
!                                $(top_srcdir)/etc/c_gc_skel.h \
!                                $(top_srcdir)/etc/c_gc_skel.c \
!                                $(top_srcdir)/etc/cpp_gc_skel.h \
!                                $(top_srcdir)/etc/cpp_gc_skel.cc
  
  $(srcdir)/skels.c: $(SKELETON_FILES) $(top_srcdir)/mkskel-sh

Index: context.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/context.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** context.c   29 Jan 2003 00:16:16 -0000      1.5
--- context.c   4 Jul 2003 04:53:48 -0000       1.6
***************
*** 52,55 ****
--- 52,56 ----
        context->internal_access = 0;
        context->use_allocator = 1;
+       context->use_gc_allocator = 0;
        context->yy_replacement = "yy";
        context->state_type = "YYNODESTATE";

Index: gen_c.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/gen_c.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** gen_c.c     29 Jan 2003 00:16:16 -0000      1.6
--- gen_c.c     4 Jul 2003 04:53:48 -0000       1.7
***************
*** 1676,1680 ****
                                                  context->state_type);
        }
!       TreeCCIncludeSkeleton(context, stream, "c_skel.c");
  }
  
--- 1676,1687 ----
                                                  context->state_type);
        }
!       if(context->use_gc_allocator)
!       {
!               TreeCCIncludeSkeleton(context, stream, "c_gc_skel.c");
!       }
!       else
!       {
!               TreeCCIncludeSkeleton(context, stream, "c_skel.c");
!       }
  }
  
***************
*** 1689,1699 ****
        TreeCCNodeVisitAll(context, DeclareTypeDefs);
        TreeCCStreamPrint(context->headerStream, "\n");
!       if(context->commonHeader)
        {
!               TreeCCIncludeSkeleton(context, context->commonHeader, 
"c_skel.h");
        }
        else
        {
!               TreeCCIncludeSkeleton(context, context->headerStream, 
"c_skel.h");
        }
        TreeCCNodeVisitAll(context, BuildTypeDecls);
--- 1696,1722 ----
        TreeCCNodeVisitAll(context, DeclareTypeDefs);
        TreeCCStreamPrint(context->headerStream, "\n");
!       if(context->use_gc_allocator)
        {
!               if(context->commonHeader)
!               {
!                       TreeCCIncludeSkeleton
!                               (context, context->commonHeader, "c_gc_skel.h");
!               }
!               else
!               {
!                       TreeCCIncludeSkeleton
!                               (context, context->headerStream, "c_gc_skel.h");
!               }
        }
        else
        {
!               if(context->commonHeader)
!               {
!                       TreeCCIncludeSkeleton(context, context->commonHeader, 
"c_skel.h");
!               }
!               else
!               {
!                       TreeCCIncludeSkeleton(context, context->headerStream, 
"c_skel.h");
!               }
        }
        TreeCCNodeVisitAll(context, BuildTypeDecls);

Index: gen_cpp.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/gen_cpp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** gen_cpp.c   29 Mar 2003 04:04:45 -0000      1.5
--- gen_cpp.c   4 Jul 2003 04:53:48 -0000       1.6
***************
*** 807,811 ****
  
        /* Include the header skeleton */
!       TreeCCIncludeSkeleton(context, stream, "cpp_skel.h");
  
        /* Singleton handling for non-reentrant systems */
--- 807,818 ----
  
        /* Include the header skeleton */
!       if(context->use_gc_allocator)
!       {
!               TreeCCIncludeSkeleton(context, stream, "cpp_gc_skel.h");
!       }
!       else
!       {
!               TreeCCIncludeSkeleton(context, stream, "cpp_skel.h");
!       }
  
        /* Singleton handling for non-reentrant systems */
***************
*** 964,968 ****
                                                  context->state_type);
        }
!       TreeCCIncludeSkeleton(context, stream, "cpp_skel.cc");
  
        /* Implement the create functions for all of the node types */
--- 971,982 ----
                                                  context->state_type);
        }
!       if(context->use_gc_allocator)
!       {
!               TreeCCIncludeSkeleton(context, stream, "cpp_gc_skel.cc");
!       }
!       else
!       {
!               TreeCCIncludeSkeleton(context, stream, "cpp_skel.cc");
!       }
  
        /* Implement the create functions for all of the node types */

Index: info.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/info.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** info.h      29 Jan 2003 00:16:16 -0000      1.10
--- info.h      4 Jul 2003 04:53:48 -0000       1.11
***************
*** 228,231 ****
--- 228,232 ----
        int                             internal_access : 1; /* Use "internal" 
classes in C# */
        int                             use_allocator : 1;      /* Use the 
skeleton allocator */
+       int                             use_gc_allocator : 1; /* Use the libgc 
allocator */
  
        /* String to use to replace "yy" in output files */

Index: options.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/treecc/options.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** options.c   29 Jan 2003 00:16:16 -0000      1.8
--- options.c   4 Jul 2003 04:53:48 -0000       1.9
***************
*** 367,370 ****
--- 367,386 ----
  
  /*
+  * "gc_allocator": use (or don't use) the libgc treecc allocator for C/C++.
+  */
+ static int GCAllocatorOption(TreeCCContext *context, char *value, int flag)
+ {
+       if(value)
+       {
+               return TREECC_OPT_NO_VALUE;
+       }
+       else
+       {
+               context->use_gc_allocator = flag;
+               return TREECC_OPT_OK;
+       }
+ }
+ 
+ /*
   * Table of option handlers.
   */
***************
*** 405,408 ****
--- 421,426 ----
        {"allocator",                   AllocatorOption,                1},
        {"no_allocator",                AllocatorOption,                0},
+       {"gc_allocator",                GCAllocatorOption,              1},
+       {"no_gc_allocator",             GCAllocatorOption,              0},
        {0,                                             0,                      
                        0},
  };





reply via email to

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