shebs       02/08/16 23:29:17

  Modified:    gcc      c-decl.c c-lex.c c-objc-common.c cppfiles.c
                        cppinit.c cpplib.c cppmacro.c dbxout.c diagnostic.c
                        emit-rtl.c except.c ggc-page.c stringpool.c
                        toplev.c varasm.c varray.c
               gcc/config darwin.c darwin.h
               gcc/cp   class.c decl.c decl2.c semantics.c
               gcc/objc objc-act.c
               gcc/objcp objcp-decl.c
               gcc/pfe  c-freeze-thaw.c cp-freeze-thaw.c cp-freeze-thaw.h
                        freeze-thaw.c objc-freeze-thaw.c pfe-header.c
                        pfe-header.h pfe-mem.c pfe.c pfe.h
  Log:
  Make PFE work completely for C, also standardize on PFE_DUMPING and
  PFE_LOADING macros and convert all the uses.
  
  Revision  Changes    Path
  1.114     +4 -4      gcc3/gcc/c-decl.c
  
  Index: c-decl.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/c-decl.c,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- c-decl.c  2002/08/16 17:06:53     1.113
  +++ c-decl.c  2002/08/17 06:29:03     1.114
  @@ -2789,7 +2789,7 @@
     c_parse_init ();
   
     /* APPLE LOCAL begin PFE */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
         /* Here global_binding_level is already initialized from 
pfe_compiler_state_ptr.  */
         global_binding_level->level_chain = current_binding_level;
  @@ -2919,7 +2919,7 @@
     /* APPLE LOCAL begin PFE */
     tree decl = NULL;
     /* If already loaded from the precompiled header, then use it.  */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
          decl = lookup_name_current_level ( get_identifier (name));
          if (decl)
  @@ -6273,7 +6273,7 @@
             of the function body info.  So until the time comes to
             adddress these issues, all but static inlines cause an
             error when trying to compile into a dump file.  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       if (TREE_PUBLIC (decl1) || !DECL_INLINE (decl1))
         error ("only static inline functions are allowed in the dump file");
     /* APPLE LOCAL end PFE */
  @@ -7500,7 +7500,7 @@
        
     if (pp == NULL)
       {
  -      if (PFE_FREEZING)
  +      if (PFE_DUMPING)
        {
          hdr->global_binding_level = global_binding_level;
          p = PFE_FREEZE_THAW_PTR (&hdr->global_binding_level);
  
  
  
  1.39      +1 -1      gcc3/gcc/c-lex.c
  
  Index: c-lex.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/c-lex.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- c-lex.c   2002/08/08 03:19:50     1.38
  +++ c-lex.c   2002/08/17 06:29:03     1.39
  @@ -167,7 +167,7 @@
     /* Check command line macros, which were defined (and undefined)
        when the PFE was built, are consistent with current macro
        definitions.  */
  -  if (pfe_macro_validation && pfe_operation == PFE_LOAD)
  +  if (pfe_macro_validation && PFE_LOADING)
       pfe_check_cmd_ln_macros ();
     /* APPLE LOCAL end PFE */
   
  
  
  
  1.17      +1 -1      gcc3/gcc/c-objc-common.c
  
  Index: c-objc-common.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/c-objc-common.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- c-objc-common.c   2002/08/16 17:06:54     1.16
  +++ c-objc-common.c   2002/08/17 06:29:03     1.17
  @@ -284,7 +284,7 @@
   
     /* APPLE LOCAL begin PFE dpatel */
     /* We will expand deferred_fns during load.  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       return;
     /* APPLE LOCAL end PFE dpatel */
   
  
  
  
  1.51      +3 -2      gcc3/gcc/cppfiles.c
  
  Index: cppfiles.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cppfiles.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- cppfiles.c        2002/08/14 21:39:39     1.50
  +++ cppfiles.c        2002/08/17 06:29:03     1.51
  @@ -71,6 +71,7 @@
   #define USING_DARWIN_MMAP 0
   #endif
   #if MMAP_THRESHOLD && USING_DARWIN_MMAP
  +#include <mach/mach_init.h>
   #include <mach/mach_host.h>
   static kernel_version_t darwin_kernel_version;
   static int darwin_mmap_allowed = 1;
  @@ -1073,7 +1074,7 @@
        _cpp_never_reread (inc);
   
         /* APPLE LOCAL begin PFE */
  -      if (pfe_operation == PFE_LOAD)
  +      if (PFE_LOADING)
        {
          /* Determine whether the specified file has already been 
             included in a pre-compiled header.  If so, skip the include 
  @@ -1086,7 +1087,7 @@
              return 0;
            }
        }
  -      else if (pfe_operation == PFE_DUMP)
  +      else if (PFE_DUMPING)
        {
          /* Add the header name in the list of headers included in the
             precompiled header.  */
  
  
  
  1.66      +1 -1      gcc3/gcc/cppinit.c
  
  Index: cppinit.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cppinit.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- cppinit.c 2002/08/14 21:39:40     1.65
  +++ cppinit.c 2002/08/17 06:29:03     1.66
  @@ -1156,7 +1156,7 @@
         /* APPLE LOCAL begin PFE */
         /* Do not init the builtins, if already loaded from the
            precompiled header.  */
  -      if (pfe_operation != PFE_LOAD)
  +      if (!PFE_LOADING)
         /* APPLE LOCAL end PFE */
         init_builtins (pfile);
         _cpp_do_file_change (pfile, LC_RENAME, _("<command line>"), 1, 0);
  
  
  
  1.38      +2 -4      gcc3/gcc/cpplib.c
  
  Index: cpplib.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cpplib.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- cpplib.c  2002/08/16 17:47:59     1.37
  +++ cpplib.c  2002/08/17 06:29:04     1.38
  @@ -1769,7 +1769,7 @@
                 only care because some configs are wired to pass some
                 of these, and unlike macros, identical dups are not
                 accepted silently.  */
  -           if (pfe_operation == PFE_LOAD && pfe_is_cmd_ln_processing ())
  +           if (PFE_LOADING && pfe_is_cmd_ln_processing ())
                return;
              /* APPLE LOCAL end PFE */
              cpp_error (pfile, DL_WARNING, "\"%s\" re-asserted",
  @@ -1855,9 +1855,7 @@
     buf[count] = '\0';
   
     /* APPLE LOCAL begin PFE validation dpatel */
  -  if (pfe_operation == PFE_LOAD 
  -      && pfe_is_cmd_ln_processing ()
  -      && pfe_macro_validation)
  +  if (PFE_LOADING && pfe_is_cmd_ln_processing () && pfe_macro_validation)
       {
         pfe_macro_status = 0;
         pfe_find_macro (buf);
  
  
  
  1.44      +5 -5      gcc3/gcc/cppmacro.c
  
  Index: cppmacro.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cppmacro.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- cppmacro.c        2002/08/16 17:47:59     1.43
  +++ cppmacro.c        2002/08/17 06:29:04     1.44
  @@ -1579,7 +1579,7 @@
         if (warn_of_redefinition (pfile, node, macro))
        {
          /* APPLE LOCAL begin PFE dpatel */
  -          if (pfe_operation == PFE_LOAD && pfe_is_cmd_ln_processing ())
  +          if (PFE_LOADING && pfe_is_cmd_ln_processing ())
               {
                 if (pfe_macro_validation)
                   cpp_error (pfile, DL_ERROR,
  @@ -1607,7 +1607,7 @@
         /* APPLE LOCAL begin PFE dpatel */
         else
           {
  -          if (pfe_operation == PFE_LOAD 
  +          if (PFE_LOADING
                 && pfe_is_cmd_ln_processing ()
                 && pfe_macro_validation
                 && (pfe_macro_status & PFE_MACRO_FOUND)
  @@ -1622,7 +1622,7 @@
     /* APPLE LOCAL begin PFE dpatel */
     else
       {
  -      if (pfe_operation == PFE_LOAD 
  +      if (PFE_LOADING
             && pfe_is_cmd_ln_processing()
             && pfe_macro_validation
             && (pfe_macro_status & PFE_MACRO_FOUND))
  @@ -1836,7 +1836,7 @@
     
   #if 0
     /* ??? FF_diagnostic  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         printf("pfe_freeze_thaw_cpp_macro: 0x%x\n", (unsigned)m);
         if (m->file == NULL)
  @@ -1900,7 +1900,7 @@
   
   #if 0
     /* ??? FF_diagnostic  */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
         printf("pfe_freeze_thaw_cpp_macro: 0x%x\n", (unsigned)m);
         if (m->file == NULL)
  
  
  
  1.28      +5 -5      gcc3/gcc/dbxout.c
  
  Index: dbxout.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/dbxout.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- dbxout.c  2002/08/07 03:13:07     1.27
  +++ dbxout.c  2002/08/17 06:29:04     1.28
  @@ -166,15 +166,15 @@
      There is a different macro to cover 0, 1, and 2 argument calls.  */
      
   #define DBXOUT_SAVE_ARGUMENTS_0(code)                \
  -  if (pfe_operation == PFE_DUMP)             \
  +  if (PFE_DUMPING)           \
       dbxout_save_arguments (code);
       
   #define DBXOUT_SAVE_ARGUMENTS_1(code, arg1)  \
  -  if (pfe_operation == PFE_DUMP)             \
  +  if (PFE_DUMPING)           \
       dbxout_save_arguments (code, arg1);
   
   #define DBXOUT_SAVE_ARGUMENTS_2(code, arg1, arg2) \
  -  if (pfe_operation == PFE_DUMP)             \
  +  if (PFE_DUMPING)           \
       dbxout_save_arguments (code, arg1, arg2);        \
   
   /* Layout of a dbxout_data_array entry.  Each entry variant depends on
  @@ -719,9 +719,9 @@
        debug_hooks so that we can intercept all their calls to allow us
        to record each call's arguments int the dbxout_data_array used
        when loading.  */
  -  if (pfe_operation != PFE_LOAD)
  +  if (!PFE_LOADING)
       {
  -      if (pfe_operation == PFE_DUMP)
  +      if (PFE_DUMPING)
           {
          actual_debug_hooks = debug_hooks;
          debug_hooks        = &intercept_debug_hooks;
  
  
  
  1.31      +5 -5      gcc3/gcc/diagnostic.c
  
  Index: diagnostic.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/diagnostic.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- diagnostic.c      2002/08/14 05:33:17     1.30
  +++ diagnostic.c      2002/08/17 06:29:04     1.31
  @@ -984,7 +984,7 @@
     VA_CLOSE (ap);
   
     /* APPLE LOCAL PFE */
  -  pfe_close_pfe_file (pfe_operation == PFE_DUMP);
  +  pfe_close_pfe_file (PFE_DUMPING);
   
     exit (FATAL_EXIT_CODE);
   }
  @@ -1198,7 +1198,7 @@
     fnotice (stderr, "compilation terminated.\n");
   
     /* APPLE LOCAL PFE */
  -  pfe_close_pfe_file (pfe_operation == PFE_DUMP);
  +  pfe_close_pfe_file (PFE_DUMPING);
   
     exit (FATAL_EXIT_CODE);
   }
  @@ -1221,7 +1221,7 @@
               input_filename, lineno);
   
         /* APPLE LOCAL PFE */
  -      pfe_close_pfe_file (pfe_operation == PFE_DUMP);
  +      pfe_close_pfe_file (PFE_DUMPING);
   
         exit (FATAL_EXIT_CODE);
       }
  @@ -1241,7 +1241,7 @@
   See %s for instructions.\n", GCCBUGURL);
   
     /* APPLE LOCAL PFE */
  -  pfe_close_pfe_file (pfe_operation == PFE_DUMP);
  +  pfe_close_pfe_file (PFE_DUMPING);
   
     exit (FATAL_EXIT_CODE);
   }
  @@ -1353,7 +1353,7 @@
   See %s for instructions.\n", GCCBUGURL);
   
     /* APPLE LOCAL PFE */
  -  pfe_close_pfe_file (pfe_operation == PFE_DUMP);
  +  pfe_close_pfe_file (PFE_DUMPING);
   
     exit (FATAL_EXIT_CODE);
   }
  
  
  
  1.33      +10 -11    gcc3/gcc/emit-rtl.c
  
  Index: emit-rtl.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/emit-rtl.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- emit-rtl.c        2002/08/07 03:13:08     1.32
  +++ emit-rtl.c        2002/08/17 06:29:04     1.33
  @@ -5329,13 +5329,6 @@
   #endif
   }
   
  -/* APPLE LOCAL begin PFE */
  -#define PFE_BEGIN_DOING_THE_FOLLOWING_IF_NOT_LOAD(x) \
  -  if (pfe_operation != PFE_LOAD) {
  -#define PFE_END_DOING_THE_ABOVE_IF_NOT_LOAD(x) \
  -  }
  -/* APPLE LOCAL end PFE */
  -
   /* Generate the constant 0.  */
   
   static rtx
  @@ -5441,7 +5434,8 @@
        is in a union and some compilers can't initialize unions.  */
   
     /* APPLE LOCAL PFE */
  -  PFE_BEGIN_DOING_THE_FOLLOWING_IF_NOT_LOAD(++++++++++++++++++++++++++)
  +  if (!PFE_LOADING) {
  +
     pc_rtx = gen_rtx (PC, VOIDmode);
     cc0_rtx = gen_rtx (CC0, VOIDmode);
     stack_pointer_rtx = gen_raw_REG (Pmode, STACK_POINTER_REGNUM);
  @@ -5487,8 +5481,9 @@
       const_true_rtx = const_int_rtx[STORE_FLAG_VALUE + MAX_SAVED_CONST_INT];
     else
       const_true_rtx = gen_rtx_CONST_INT (VOIDmode, STORE_FLAG_VALUE);
  +
     /* APPLE LOCAL PFE */
  -  PFE_END_DOING_THE_ABOVE_IF_NOT_LOAD(--------------------------------)
  +  }
   
     REAL_VALUE_FROM_INT (dconst0,   0,  0, double_mode);
     REAL_VALUE_FROM_INT (dconst1,   1,  0, double_mode);
  @@ -5496,7 +5491,8 @@
     REAL_VALUE_FROM_INT (dconstm1, -1, -1, double_mode);
   
     /* APPLE LOCAL PFE */
  -  PFE_BEGIN_DOING_THE_FOLLOWING_IF_NOT_LOAD(++++++++++++++++++++++++++)
  +  if (!PFE_LOADING) {
  +
     for (i = 0; i <= 2; i++)
       {
         REAL_VALUE_TYPE *r =
  @@ -5585,7 +5581,7 @@
       pic_offset_table_rtx = gen_raw_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
   
     /* APPLE LOCAL PFE */
  -  PFE_END_DOING_THE_ABOVE_IF_NOT_LOAD(--------------------------------)
  +  }
   }
   
   /* Query and clear/ restore no_line_numbers.  This is used by the
  @@ -5684,8 +5680,11 @@
   pfe_freeze_thaw_emitrtl (hdr)
        pfe_compiler_state *hdr;
   {
  +  int i;
  +
     PFE_GLOBAL_TO_HDR_IF_FREEZING (label_num);
     PFE_HDR_TO_GLOBAL_IF_THAWING (label_num);
  +  PFE_FREEZE_THAW_GLOBAL_RTX_ARRAY (static_regno_reg_rtx, FIRST_PSEUDO_REGISTER);
   }
   /* APPLE LOCAL end PFE */
   
  
  
  
  1.30      +9 -8      gcc3/gcc/except.c
  
  Index: except.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/except.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- except.c  2002/08/08 03:19:51     1.29
  +++ except.c  2002/08/17 06:29:05     1.30
  @@ -3786,7 +3786,7 @@
   {
     struct eh_status *eh = PFE_FREEZE_THAW_PTR (ehp);
     struct eh_region **rp, *r;
  -  int    i;
  +  int i;
     
     if (!eh)
       return;
  @@ -3822,7 +3822,8 @@
              rp = &r->next_peer;
            }
        }
  -    tree_done:;
  +    tree_done:
  +      ;
       }
     
     pfe_freeze_thaw_ptr_fp (&eh->cur_region);
  @@ -3837,10 +3838,10 @@
         /* The call_site_data is a "buried" struct that we must explicitly
            reference.  Thus we cannot use a common freeze/thaw operation
            on it.  */
  -      if (PFE_THAWING)
  +      if (PFE_LOADING)
           pfe_thaw_ptr (&eh->call_site_data);
         PFE_FREEZE_THAW_RTX (eh->call_site_data->landing_pad);
  -      if (PFE_FREEZING)
  +      if (PFE_DUMPING)
           pfe_freeze_ptr (&eh->call_site_data);
       }
     PFE_FREEZE_THAW_RTX (eh->ehr_stackadj);
  @@ -3850,11 +3851,11 @@
     PFE_FREEZE_THAW_RTX (eh->sjlj_exit_after);
   }
   
  -/* Freeze/thaw a struct eh_region field of a struct eh_status.
  -   The function returns the (unfrozen) *rp as it's result because
  +/* Freeze/thaw a struct eh_region field of a struct eh_status.  The
  +   function returns the (unfrozen) *rp as its result because
      pfe_freeze_thaw_eh_status() needs it.  In addition, we don't
  -   freeze/thaw a eh_region's inner, outer, or next_peer fields
  -   here since those need to be handled by pfe_freeze_thaw_eh_status().  */
  +   freeze/thaw a eh_region's inner, outer, or next_peer fields here
  +   since those need to be handled by pfe_freeze_thaw_eh_status().  */
   static struct eh_region *
   freeze_thaw_eh_region (rp)
        struct eh_region **rp;
  
  
  
  1.31      +15 -17    gcc3/gcc/ggc-page.c
  
  Index: ggc-page.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/ggc-page.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ggc-page.c        2002/08/14 21:39:40     1.30
  +++ ggc-page.c        2002/08/17 06:29:05     1.31
  @@ -657,7 +657,7 @@
       }
   #ifdef USING_MMAP
     /* APPLE LOCAL begin PFE */
  -  else if (pfe_operation != PFE_DUMP && pfe_operation != PFE_LOAD)
  +  else if (!(PFE_DUMPING || PFE_LOADING))
     {
       if (entry_size == G.pagesize)
         /* APPLE LOCAL end PFE */
  @@ -780,7 +780,7 @@
   
   #ifdef USING_MALLOC_PAGE_GROUPS
     /* APPLE LOCAL begin PFE */
  -  if (!PFE_USING_MMAP || pfe_operation == PFE_DUMP || pfe_operation == PFE_LOAD)
  +  if (!PFE_USING_MMAP || PFE_DUMPING || PFE_LOADING)
       {
         /* APPLE LOCAL end PFE */
     entry->group = group;
  @@ -820,7 +820,7 @@
   
   #ifdef USING_MALLOC_PAGE_GROUPS
     /* APPLE LOCAL PFE */
  -  if (!PFE_USING_MMAP || pfe_operation == PFE_DUMP || pfe_operation == PFE_LOAD)
  +  if (!PFE_USING_MMAP || PFE_DUMPING || PFE_LOADING)
     clear_page_group_in_use (entry->group, entry->page);
   #endif
   
  @@ -835,7 +835,7 @@
   {
   #ifdef USING_MMAP
     /* APPLE LOCAL begin PFE */
  -  if (pfe_operation != PFE_DUMP && pfe_operation != PFE_LOAD)
  +  if (!(PFE_DUMPING || PFE_LOADING))
     {
     /* APPLE LOCAL end PFE */
     page_entry *p, *next;
  @@ -1134,15 +1134,13 @@
     G.lg_pagesize = exact_log2 (G.pagesize);
   
   #ifdef HAVE_MMAP_DEV_ZERO
  -  /* APPLE LOCAL begin PFE */
  -  if (pfe_operation != PFE_DUMP && pfe_operation != PFE_LOAD)
  -    {
  -  /* APPLE LOCAL end PFE */
  +  /* APPLE LOCAL PFE */
  +  if (!(PFE_DUMPING || PFE_LOADING)) {
     G.dev_zero_fd = open ("/dev/zero", O_RDONLY);
     if (G.dev_zero_fd == -1)
       abort ();
     /* APPLE LOCAL PFE */
  -    }
  +  }
   #endif
   
   #if 0
  @@ -1159,10 +1157,10 @@
        believe, is an unaligned page allocation, which would cause us to
        hork badly if we tried to use it.  */
     /* APPLE LOCAL begin PFE */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       pfe_compiler_state_ptr->ggc_globals = PFE_MALLOC (sizeof (G),
                                                      PFE_ALLOC_GGC_GLOBALS);
  -  else if (pfe_operation != PFE_LOAD)
  +  else if (!PFE_LOADING)
       /* APPLE LOCAL end PFE */
     {
       char *p = alloc_anon (NULL, G.pagesize);
  @@ -1510,7 +1508,7 @@
        collection.  */
   #ifndef GGC_ALWAYS_COLLECT
   #ifdef DISABLE_PFE_GC
  -  if (pfe_operation == PFE_LOAD || pfe_operation == PFE_DUMP)
  +  if (PFE_LOADING || PFE_DUMPING)
       return;
   #endif
     if (G.allocated < GGC_MIN_EXPAND_FOR_GC * G.allocated_last_gc)
  @@ -1637,14 +1635,14 @@
     return;
   #endif
       
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       memcpy (pG, &G, sizeof (G));
     
     for (i = 0; i < NUM_ORDERS; ++i)
       {
         freeze_thaw_page_entry (pfe_freeze_thaw_ptr ((void *)&pG->pages[i]));
         /* I assume the page_tails[i]'s are just pointers to pages[i]'s.  */
  -      if  (pG->page_tails[i])
  +      if (pG->page_tails[i])
           PFE_FREEZE_THAW_PTR (&pG->page_tails[i]);
       }
     
  @@ -1662,7 +1660,7 @@
       
     pG->debug_file = NULL;
       
  -  if (PFE_THAWING)
  +  if (PFE_LOADING)
       memcpy (&G, pG, sizeof (G));
   }
   
  @@ -1679,8 +1677,8 @@
   #ifdef USING_MALLOC_PAGE_GROUPS
         if (p->group)
           {
  -       if ((PFE_FREEZING && PFE_IS_FROZEN (p->group))
  -            || (PFE_THAWING && !PFE_IS_FROZEN (p->group)))
  +       if ((PFE_DUMPING && PFE_IS_FROZEN (p->group))
  +            || (PFE_LOADING && !PFE_IS_FROZEN (p->group)))
            return;
          freeze_thaw_page_group (&p->group);
        }
  
  
  
  1.11      +1 -1      gcc3/gcc/stringpool.c
  
  Index: stringpool.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/stringpool.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- stringpool.c      2002/08/03 05:28:15     1.10
  +++ stringpool.c      2002/08/17 06:29:05     1.11
  @@ -62,7 +62,7 @@
     /* Create identifier hashtable only if we are not doing PFE_LOAD.
        If we are doing PFE_LOAD then it is already loaded from the
        precompiled header.  */
  -  if (pfe_operation != PFE_LOAD)
  +  if (!PFE_LOADING)
       /* APPLE LOCAL end PFE */
     ident_hash = ht_create (14);
     ident_hash->alloc_node = alloc_node;
  
  
  
  1.147     +19 -19    gcc3/gcc/toplev.c
  
  Index: toplev.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/toplev.c,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- toplev.c  2002/08/16 17:06:55     1.146
  +++ toplev.c  2002/08/17 06:29:05     1.147
  @@ -1874,7 +1874,7 @@
       }
   
     /* APPLE LOCAL PFE */
  -  pfe_close_pfe_file (pfe_operation == PFE_DUMP);
  +  pfe_close_pfe_file (PFE_DUMPING);
   
     exit (FATAL_EXIT_CODE);
   }
  @@ -2300,9 +2300,10 @@
     init_final (main_input_filename);
     init_branch_prob (dump_base_name);
   
  -  /* APPLE LOCAL PFE */
  -  if (pfe_operation != PFE_LOAD)
  +  /* APPLE LOCAL begin PFE */
  +  if (!PFE_LOADING)
       pfe_predefined_global_names = getdecls ();
  +  /* APPLE LOCAL end PFE */
   
     timevar_push (TV_PARSE);
   
  @@ -2397,8 +2398,8 @@
        string is patterned after the ones produced by native SVR4 compilers.  */
   #ifdef IDENT_ASM_OP
     /* APPLE LOCAL begin PFE */
  -  /* Suppress al asm output when doing a PFE dump.  ilr */
  -  if (pfe_operation != PFE_DUMP)
  +  /* Suppress all asm output when doing a PFE dump.  ilr */
  +  if (!PFE_DUMPING)
       /* APPLE LOCAL end PFE */
     if (!flag_no_ident)
       fprintf (asm_out_file, "%s\"GCC: (GNU) %s\"\n",
  @@ -4924,7 +4925,7 @@
   {
     /* APPLE LOCAL begin PFE */
     /* A PFE dump implies that no .o should be created.  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         asm_out_file = stdout;
         return;
  @@ -5093,18 +5094,18 @@
           {
          if (strncmp (argv[i], "-fload=", 7) == 0)
            {
  -           if (pfe_operation == PFE_LOAD)
  +           if (PFE_LOADING)
                error ("Only one -fload allowed");
  -           else if (pfe_operation == PFE_DUMP)
  +           else if (PFE_DUMPING)
                error ("Cannot specify both -fload and -fdump - which is it?");
              else
                pfe_open_pfe_file (&argv[i][7], arch, 0);
            }
          else if (strncmp (argv[i], "-fdump=", 7) == 0)
            {
  -           if (pfe_operation == PFE_DUMP)
  +           if (PFE_DUMPING)
                error ("Only one -fdump allowed");
  -           else if (pfe_operation == PFE_LOAD)
  +           else if (PFE_LOADING)
                error ("Cannot specify both -fdump and -fload - which is it?");
              else
                pfe_open_pfe_file (&argv[i][7], arch, 1);
  @@ -5156,7 +5157,7 @@
   
     /* APPLE LOCAL begin PFE dpatel */
     /* Turn on macro validation during pfe load */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       pfe_macro_validation = flag_pfe_validate;
     /* APPLE LOCAL end PFE dpatel */
   
  @@ -5175,12 +5176,12 @@
         pfe_term (); /* turns off either PFE_DUMP or PFE_LOAD mode */
         pfe_init (PFE_NOP);
       }
  -  else if (pfe_operation == PFE_DUMP)
  +  else if (PFE_DUMPING)
       {
         pfe_compiler_state_ptr->progname = 
           (const char *)PFE_SAVESTRING ((char *)progname);
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         if (!quiet_flag)
           time_report = 1;
  @@ -5394,7 +5395,7 @@
          already validated the load file with the exception of the
          language.  That needs to be delayed until now when we know it
          and it's in the reader.  */
  -    if (pfe_operation == PFE_LOAD)
  +    if (PFE_LOADING)
         pfe_check_compiler ();
       return rslt;
     }
  @@ -5723,7 +5724,7 @@
     /* Make sure we don't close stdout (which asm_out_file is mapped to
        during a dump) so that we can write PFE diagnostics out if 
        needed.  */
  -  if (pfe_operation != PFE_DUMP)
  +  if (!PFE_DUMPING)
       /* APPLE LOCAL end PFE ff */
     if (asm_out_file)
       {
  @@ -5787,8 +5788,7 @@
     /* APPLE LOCAL begin PFE */
     /* We init and start the timer before loading the pfe file when
        loading.  */
  -  if (pfe_operation != PFE_LOAD)
  -  {
  +  if (!PFE_LOADING) {
       /* APPLE LOCAL end PFE */
     init_timevar ();
     timevar_start (TV_TOTAL);
  @@ -5815,7 +5815,7 @@
        when we gracefully terminate the pfe memory usage and close
        the pfe file.  Note that if there were errors during the
        compilation for a dump file we will delete that dump file.*/
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         if (errorcount == 0)
           pfe_dump_compiler_state (pfe_file);
  @@ -5824,7 +5824,7 @@
         pfe_term ();
         pfe_close_pfe_file (errorcount != 0);
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         pfe_term ();
         pfe_close_pfe_file (0);
  
  
  
  1.76      +5 -5      gcc3/gcc/varasm.c
  
  Index: varasm.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/varasm.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- varasm.c  2002/08/16 17:06:55     1.75
  +++ varasm.c  2002/08/17 06:29:05     1.76
  @@ -100,7 +100,7 @@
      asm output is to be generated.  Rather than adding explicit
      code to all places in here that check flag_syntax_only we
      redefine flag_syntax_only to also test for PFE_DUMP.  */ 
  -#define flag_syntax_only (flag_syntax_only || pfe_operation == PFE_DUMP)
  +#define flag_syntax_only (flag_syntax_only || PFE_DUMPING)
   /* APPLE LOCAL end PFE */
   
   #ifndef TRAMPOLINE_ALIGNMENT
  @@ -1809,8 +1809,8 @@
       abort ();
   
     /* APPLE LOCAL begin PFE */
  -  /* A PFE dump implies that no .o should is created.  */
  -  if (pfe_operation == PFE_DUMP)
  +  /* A PFE dump implies that no .o should be created.  */
  +  if (PFE_DUMPING)
       return;
     /* APPLE LOCAL end PFE */
   
  @@ -5557,13 +5557,13 @@
        requires that the pool->constant rtx not be in a frozen state.  */
     while (pool)
       {
  -      if (PFE_FREEZING)
  +      if (PFE_DUMPING)
           {
          freeze_thaw_constant_descriptor_rtx (&pool->desc, pool->constant);
          pfe_freeze_ptr (&pool->next_sym);
          PFE_FREEZE_THAW_RTX (pool->constant);
        }
  -      else /* thawing */
  +      else /* loading */
           {
          PFE_FREEZE_THAW_RTX (pool->constant);
          pfe_thaw_ptr (&pool->next_sym);
  
  
  
  1.15      +2 -2      gcc3/gcc/varray.c
  
  Index: varray.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/varray.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- varray.c  2002/08/07 03:13:12     1.14
  +++ varray.c  2002/08/17 06:29:06     1.15
  @@ -191,12 +191,12 @@
   pfe_freeze_thaw_varray_tree (vpp)
        varray_type *vpp;
   {
  -  varray_type va = (varray_type)PFE_FREEZE_THAW_PTR (vpp);
  +  varray_type va = (varray_type) PFE_FREEZE_THAW_PTR (vpp);
     size_t i, nelts;
     
     if (va)
       {
  -      if (PFE_FREEZING)
  +      if (PFE_DUMPING)
           {
          if (!USE_PFE_MEMORY (va->name))
            internal_error ("Virtual array %s was assumed to be in pfe memory and 
isn't",
  
  
  
  1.76      +1 -1      gcc3/gcc/config/darwin.c
  
  Index: darwin.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/config/darwin.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- darwin.c  2002/08/14 21:48:26     1.75
  +++ darwin.c  2002/08/17 06:29:09     1.76
  @@ -1663,7 +1663,7 @@
   
     /* The following must be be consistent when loading a pfe file and
        thus only saved when dumping the file.  */
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         hdr->flag_pic = flag_pic;
         hdr->dynamic_no_pic = MACHO_DYNAMIC_NO_PIC_P ();
  
  
  
  1.176     +2 -2      gcc3/gcc/config/darwin.h
  
  Index: darwin.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/config/darwin.h,v
  retrieving revision 1.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- darwin.h  2002/08/14 05:33:18     1.175
  +++ darwin.h  2002/08/17 06:29:09     1.176
  @@ -380,10 +380,10 @@
   #undef       ASM_FILE_START
   #define ASM_FILE_START(FILE)
   
  -/* APPLE LOCAL PFE */
   #undef       ASM_FILE_END
   #define ASM_FILE_END(FILE)                                           \
  -  if (pfe_operation != PFE_DUMP)                                     \
  +  /* APPLE LOCAL PFE */  \
  +  if (!PFE_DUMPING)                                                  \
       do {                                                             \
         machopic_finish (asm_out_file);                                \
         if (strcmp (lang_hooks.name, "GNU C++") == 0)                  \
  
  
  
  1.33      +2 -3      gcc3/gcc/cp/class.c
  
  Index: class.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/class.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- class.c   2002/08/16 17:06:58     1.32
  +++ class.c   2002/08/17 06:29:10     1.33
  @@ -5679,8 +5679,7 @@
     VARRAY_TREE_INIT (local_classes, 8, PFE_VARRAY "local_classes");
   
     /* APPLE LOCAL PFE */
  -  if (pfe_operation != PFE_LOAD)
  -    {
  +  if (!PFE_LOADING) {
   
     access_default_node = build_int_2 (0, 0);
     access_public_node = build_int_2 (ak_public, 0);
  @@ -5691,7 +5690,7 @@
     access_protected_virtual_node = build_int_2 (4 | ak_protected, 0);
     access_private_virtual_node = build_int_2 (4 | ak_private, 0);
     /* APPLE LOCAL PFE */
  -    }
  +  }
   
     ridpointers[(int) RID_PUBLIC] = access_public_node;
     ridpointers[(int) RID_PRIVATE] = access_private_node;
  
  
  
  1.110     +29 -27    gcc3/gcc/cp/decl.c
  
  Index: decl.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/decl.c,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- decl.c    2002/08/16 17:06:59     1.109
  +++ decl.c    2002/08/17 06:29:10     1.110
  @@ -6545,7 +6545,7 @@
   
     /* Create all the identifiers we need.  */
     /* APPLE LOCAL PFE */
  -  if (pfe_operation != PFE_LOAD)
  +  if (!PFE_LOADING)
     initialize_predefined_identifiers ();
   
     /* Fill in back-end hooks.  */
  @@ -6553,7 +6553,7 @@
   
     
     /* APPLE LOCAL begin PFE */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
         current_lang_name = lang_name_cplusplus;
         current_namespace = global_namespace;
  @@ -6586,7 +6586,7 @@
       }
   
   #if 1 /* APPLE MERGE check the need for all this carefully */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
         /* In C++, we never create builtin functions whose name does not
         begin with `__'.  Users should be using headers to get prototypes
  @@ -6601,7 +6601,7 @@
         current_binding_level = global_binding_level;
       }
   #endif
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
         /* Process the global declarations received directly from the
         precompiled header.  The aim to remove TREE_ASM_WRITTEN
  @@ -6748,7 +6748,7 @@
     current_lang_name = lang_name_cplusplus;
   
     /* APPLE LOCAL PFE */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
   #if 0 /* APPLE MERGE need this? */      
         lang_attribute_table = cp_attribute_table;
  @@ -6794,7 +6794,8 @@
   
     if (flag_exceptions)
       {
  -      if (pfe_operation == PFE_LOAD)
  +      /* APPLE LOCAL PFE */
  +      if (PFE_LOADING)
        pfe_init_exception_processing ();
         else
        init_exception_processing ();
  @@ -15275,7 +15276,8 @@
   /* APPLE LOCAL begin PFE */
   /* Freeze/thaw struct binding_level.  */
   void
  -pfe_freeze_thaw_cp_binding_level (pp)
  +pfe_freeze_thaw_cp_binding_level (hdr, pp)
  +     struct pfe_lang_compiler_state *hdr;
        struct cp_binding_level **pp;
   {
     struct cp_binding_level *p;
  @@ -15284,20 +15286,20 @@
        to freeze/thaw the global_binding_level and move it to or from the pfe
        header.  */
        
  -  if (pp == NULL) {
  -#if 0 /* APPLE MERGE this is now lang-specific */
  -    if (PFE_FREEZING)
  -      {
  -        pfe_compiler_state_ptr->global_binding_level = global_binding_level;
  -     p = PFE_FREEZE_THAW_PTR (&pfe_compiler_state_ptr->global_binding_level);
  -      }
  -    else
  -      {
  -     p = PFE_FREEZE_THAW_PTR (&pfe_compiler_state_ptr->global_binding_level);
  -        global_binding_level = pfe_compiler_state_ptr->global_binding_level;
  +  if (pp == NULL)
  +    {
  +      if (PFE_DUMPING)
  +     {
  +       hdr->global_binding_level = global_binding_level;
  +       p = PFE_FREEZE_THAW_PTR (&hdr->global_binding_level);
  +     }
  +      else
  +     {
  +       p = PFE_FREEZE_THAW_PTR (&hdr->global_binding_level);
  +       global_binding_level = hdr->global_binding_level;
         }
  -#endif
  -  } else
  +    }
  +  else
       p = PFE_FREEZE_THAW_PTR (pp);
       
     while (p)
  @@ -15322,16 +15324,16 @@
   pfe_freeze_thaw_named_label_use_list (pp)
        struct named_label_use_list **pp;
   {
  -  struct named_label_use_list *p = (struct named_label_use_list 
*)PFE_FREEZE_THAW_PTR (pp);
  +  struct named_label_use_list *p = (struct named_label_use_list *) 
PFE_FREEZE_THAW_PTR (pp);
     
     while (p)
       {
  -      pfe_freeze_thaw_cp_binding_level (&p->binding_level);
  +      pfe_freeze_thaw_cp_binding_level (NULL, &p->binding_level);
         PFE_FREEZE_THAW_WALK (p->names_in_scope);              /* NEEDED? */
         PFE_FREEZE_THAW_WALK (p->label_decl);          /* NEEDED? */
         pfe_freeze_thaw_ptr_fp (&p->filename_o_goto);
         
  -      p = (struct named_label_use_list *)PFE_FREEZE_THAW_PTR (&p->next);
  +      p = (struct named_label_use_list *) PFE_FREEZE_THAW_PTR (&p->next);
       }
   }
   
  @@ -15340,17 +15342,17 @@
   pfe_freeze_thaw_named_label_list (pp)
        struct named_label_list **pp;
   {
  -  struct named_label_list *p = (struct named_label_list *)PFE_FREEZE_THAW_PTR (pp);
  +  struct named_label_list *p = (struct named_label_list *) PFE_FREEZE_THAW_PTR (pp);
     
     while (p)
       {
  -      pfe_freeze_thaw_cp_binding_level (&p->binding_level);
  +      pfe_freeze_thaw_cp_binding_level (NULL, &p->binding_level);
         PFE_FREEZE_THAW_WALK (p->names_in_scope);              /* NEEDED? */
         PFE_FREEZE_THAW_WALK (p->old_value);           /* NEEDED? */
         PFE_FREEZE_THAW_WALK (p->label_decl);          /* NEEDED? */
         PFE_FREEZE_THAW_WALK (p->bad_decls);           /* NEEDED? */
         
  -      p = (struct named_label_list *)PFE_FREEZE_THAW_PTR (&p->next);
  +      p = (struct named_label_list *) PFE_FREEZE_THAW_PTR (&p->next);
       }
   }
   
  @@ -15359,7 +15361,7 @@
   pfe_freeze_thaw_decl_globals (hdr)
        struct pfe_lang_compiler_state *hdr;
   {
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         hdr->global_type_node = global_type_node;
         PFE_FREEZE_THAW_WALK (hdr->global_type_node);
  
  
  
  1.86      +1 -1      gcc3/gcc/cp/decl2.c
  
  Index: decl2.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/decl2.c,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- decl2.c   2002/08/16 17:07:00     1.85
  +++ decl2.c   2002/08/17 06:29:11     1.86
  @@ -3214,7 +3214,7 @@
   
     /* APPLE LOCAL PFE */
     /* Finish processing file only during a load.  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       return;
   
     /* Otherwise, GDB can get confused, because in only knows
  
  
  
  1.40      +2 -3      gcc3/gcc/cp/semantics.c
  
  Index: semantics.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/cp/semantics.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- semantics.c       2002/08/16 17:07:00     1.39
  +++ semantics.c       2002/08/17 06:29:12     1.40
  @@ -2697,9 +2697,8 @@
             which does most of the wiping out of the function body info.
             So until the time comes to adddress these issues, all but static
             inlines cause an error when trying to compile into a dump file.  */
  -  if (pfe_operation == PFE_DUMP)
  -    if (TREE_PUBLIC (fn) || !DECL_INLINE (fn))
  -      error ("only inline functions are allowed in the dump file");
  +  if (PFE_DUMPING && (TREE_PUBLIC (fn) || !DECL_INLINE (fn)))
  +    error ("only inline functions are allowed in the dump file");
     /* APPLE LOCAL end PFE */
   
     /* Initialize the per-function data.  */
  
  
  
  1.106     +2 -2      gcc3/gcc/objc/objc-act.c
  
  Index: objc-act.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/objc/objc-act.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- objc-act.c        2002/08/14 21:39:42     1.105
  +++ objc-act.c        2002/08/17 06:29:14     1.106
  @@ -577,7 +577,7 @@
   
     /* APPLE LOCAL begin PFE */
     /* Skip during the dump, we'll finish the job during load.  */
  -  if (pfe_operation != PFE_DUMP)
  +  if (!PFE_DUMPING)
     /* APPLE LOCAL end PFE */
     /* Finalize Objective-C runtime data.  No need to generate tables
        and code if only checking syntax.  */
  @@ -8767,7 +8767,7 @@
   
     errbuf = (char *) xmalloc (BUFSIZE);
     /* APPLE LOCAL PFE */
  -  if (pfe_operation != PFE_LOAD)
  +  if (!PFE_LOADING)
     hash_init ();
     synth_module_prologue ();
     /* APPLE LOCAL indexing dpatel */
  
  
  
  1.13      +1 -1      gcc3/gcc/objcp/objcp-decl.c
  
  Index: objcp-decl.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/objcp/objcp-decl.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- objcp-decl.c      2002/08/08 03:20:06     1.12
  +++ objcp-decl.c      2002/08/17 06:29:14     1.13
  @@ -275,7 +275,7 @@
     /* APPLE LOCAL PFE */
     tree decl = NULL;
     /* If already loaded from the precompiled header, then use it.  */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
          decl = lookup_name_current_level ( get_identifier (name));
          if (decl)
  
  
  
  1.8       +3 -3      gcc3/gcc/pfe/c-freeze-thaw.c
  
  Index: c-freeze-thaw.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/c-freeze-thaw.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- c-freeze-thaw.c   2002/08/16 17:07:03     1.7
  +++ c-freeze-thaw.c   2002/08/17 06:29:15     1.8
  @@ -37,15 +37,15 @@
   c_pfe_lang_init (lang)
        int lang;
   {
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       pfe_set_lang ((enum pfe_lang) lang == PFE_LANG_UNKNOWN ?
                  PFE_LANG_C : lang);
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       pfe_check_lang ((enum pfe_lang) lang == PFE_LANG_UNKNOWN ?
                    PFE_LANG_C : lang);
   
     /* Initialize the language specific compiler state */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       pfe_compiler_state_ptr->lang_specific = (struct pfe_lang_compiler_state *)
         pfe_calloc (1, sizeof (struct pfe_lang_compiler_state));
   }
  
  
  
  1.13      +16 -16    gcc3/gcc/pfe/cp-freeze-thaw.c
  
  Index: cp-freeze-thaw.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/cp-freeze-thaw.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- cp-freeze-thaw.c  2002/08/16 17:07:03     1.12
  +++ cp-freeze-thaw.c  2002/08/17 06:29:15     1.13
  @@ -40,17 +40,17 @@
   cxx_pfe_lang_init (lang)
        int lang;
   {
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       pfe_set_lang ((enum pfe_lang) lang == PFE_LANG_UNKNOWN ?
                  PFE_LANG_CXX : lang);
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       pfe_check_lang ((enum pfe_lang) lang == PFE_LANG_UNKNOWN ?
                    PFE_LANG_CXX : lang);
     
  -  /* Initialize the language specific compiler state */
  -  if (pfe_operation == PFE_DUMP)
  -    pfe_compiler_state_ptr->lang_specific  = (struct pfe_lang_compiler_state *)
  -      pfe_calloc (1, sizeof (struct pfe_lang_compiler_state));
  +  /* Initialize the language specific compiler state.  */
  +  if (PFE_DUMPING)
  +    pfe_compiler_state_ptr->lang_specific =
  +      (struct pfe_lang_compiler_state *) pfe_calloc (1, sizeof (struct 
pfe_lang_compiler_state));
   }
   
   /* Freeze/thaw language specific compiler state.  */
  @@ -119,7 +119,7 @@
     PFE_HDR_TO_GLOBAL_IF_THAWING (scope_chain);
     
     /* cp/decl.c */
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       hdr->pfe_anon_cnt = pfe_get_anon_cnt ();
     else
       pfe_set_anon_cnt (hdr->pfe_anon_cnt);
  @@ -146,9 +146,9 @@
   /* Check language-specific compiler options.  */
   void 
   cxx_pfe_check_settings (lang_specific)
  -    struct pfe_lang_compiler_state *lang_specific;
  +     struct pfe_lang_compiler_state *lang_specific;
   {
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       if (lang_specific->flag_apple_kext != flag_apple_kext)
         fatal_error ("Inconsistent setting of -fapple-kext on pre-compiled header 
dump and load.");
   }
  @@ -175,7 +175,7 @@
       {
         case NAMESPACE_DECL:
           if (ld) 
  -       pfe_freeze_thaw_cp_binding_level (&NAMESPACE_LEVEL (node));
  +       pfe_freeze_thaw_cp_binding_level (NULL, &NAMESPACE_LEVEL (node));
                PFE_FREEZE_THAW_WALK (DECL_NAMESPACE_USING (node));
                PFE_FREEZE_THAW_WALK (DECL_NAMESPACE_USERS (node));
                return 1;
  @@ -292,7 +292,7 @@
            PFE_FREEZE_THAW_WALK (TEMPLATE_TYPE_PARM_INDEX (node));
            PFE_FREEZE_THAW_WALK (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (node));
            PFE_FREEZE_THAW_WALK (TYPE_NAME (node));
  -         if (PFE_FREEZING)
  +         if (PFE_DUMPING)
           {
            if (!PFE_IS_FROZEN (TYPE_TEMPLATE_INFO(node)))
               {
  @@ -364,7 +364,7 @@
          
          case CPLUS_BINDING:
            if (BINDING_HAS_LEVEL_P (node))
  -           pfe_freeze_thaw_cp_binding_level (&(((struct 
tree_binding*)node)->scope.level));
  +           pfe_freeze_thaw_cp_binding_level (NULL, &(((struct 
tree_binding*)node)->scope.level));
            else
              PFE_FREEZE_THAW_WALK (BINDING_SCOPE (node));              /* NEEDED? */
            PFE_FREEZE_THAW_WALK (BINDING_VALUE (node));                /* NEEDED? */
  @@ -416,7 +416,7 @@
     
     pfe_freeze_thaw_named_label_use_list (&p->x_named_label_uses);
     pfe_freeze_thaw_named_label_list (&p->x_named_labels);
  -  pfe_freeze_thaw_cp_binding_level (&p->bindings);
  +  pfe_freeze_thaw_cp_binding_level (NULL, &p->bindings);
     pfe_freeze_thaw_varray_tree (&p->x_local_names);
   
     pfe_freeze_thaw_ptr_fp (&p->cannot_inline);
  @@ -439,7 +439,7 @@
     PFE_FREEZE_THAW_WALK (p->class_type);
     PFE_FREEZE_THAW_WALK (p->access_specifier);
     PFE_FREEZE_THAW_WALK (p->function_decl);
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       while (VARRAY_ACTIVE_SIZE (p->lang_base) > 0)
         pop_lang_context ();
     pfe_freeze_thaw_varray_tree (&p->lang_base);
  @@ -450,8 +450,8 @@
     PFE_FREEZE_THAW_WALK (p->x_saved_tree);
     PFE_FREEZE_THAW_WALK (p->lookups);
     /* struct stmt_tree_s x_stmt_tree; Needed ??? */
  -  pfe_freeze_thaw_cp_binding_level (&p->class_bindings);
  -  pfe_freeze_thaw_cp_binding_level (&p->bindings);
  +  pfe_freeze_thaw_cp_binding_level (NULL, &p->class_bindings);
  +  pfe_freeze_thaw_cp_binding_level (NULL, &p->bindings);
   
     pfe_freeze_thaw_saved_scope (&p->prev);
   }
  
  
  
  1.7       +2 -1      gcc3/gcc/pfe/cp-freeze-thaw.h
  
  Index: cp-freeze-thaw.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/cp-freeze-thaw.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- cp-freeze-thaw.h  2002/08/16 17:07:04     1.6
  +++ cp-freeze-thaw.h  2002/08/17 06:29:15     1.7
  @@ -86,7 +86,8 @@
   extern void pfe_freeze_thaw_decl_globals PARAMS ((struct pfe_lang_compiler_state 
*));
   extern int pfe_get_anon_cnt           PARAMS ((void));
   extern void pfe_set_anon_cnt                  PARAMS ((int));
  -extern void pfe_freeze_thaw_cp_binding_level PARAMS ((struct cp_binding_level **));
  +extern void pfe_freeze_thaw_cp_binding_level PARAMS ((struct 
pfe_lang_compiler_state *,
  +                                                   struct cp_binding_level **));
   extern void pfe_freeze_thaw_named_label_use_list PARAMS ((struct 
named_label_use_list **));
   extern void pfe_freeze_thaw_named_label_list     PARAMS ((struct named_label_list 
**));
   
  
  
  
  1.16      +25 -25    gcc3/gcc/pfe/freeze-thaw.c
  
  Index: freeze-thaw.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/freeze-thaw.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- freeze-thaw.c     2002/08/16 17:07:04     1.15
  +++ freeze-thaw.c     2002/08/17 06:29:15     1.16
  @@ -1,6 +1,6 @@
   /* APPLE LOCAL file PFE */
   /* Freeze/thaw common language trees and other data.
  -   Copyright (C) 2001  Free Software Foundation, Inc.
  +   Copyright (C) 2001, 2002  Free Software Foundation, Inc.
      Contributed by Ira L. Ruben ([EMAIL PROTECTED])
   
   This file is part of GNU CC.
  @@ -144,7 +144,7 @@
     /* pfe_freeze_ptrs and pfe_thaw_ptrs are static inside pfe.c.  But we can
        temporarily make them non-static and use this code to make sure that
        freeze/thaw operations are totally symmetric in the freeze/thaw counts.  */
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
          extern int pfe_freeze_ptrs;
          fprintf (stderr, "(%d)", pfe_freeze_ptrs);
  @@ -199,17 +199,17 @@
      it will be loaded with the 1's we set when we froze it).
      
      The following macro encodes this test in terms of the pfe_operation.
  -   For freezing !PFE_FREEZING is always 0.  So if the visited flag is
  +   For freezing !PFE_DUMPING is always 0.  So if the visited flag is
      still 0 we haven't visited the node and the equality is true.
      Thus negation means we HAVE visitied the node.
      
  -   Conversly, for thawing, !PFE_FREEZING is always 1.  A node which
  +   Conversly, for thawing, !PFE_DUMPING is always 1.  A node which
      hasn't been visited will still be 1 (since this is what was
      written when we froze them).  So if the visited flag is still 1
      we haven't visited the node and the equality is true.  Thus
      again negation means we HAVE visitied the node.  */
       
  -#define NODE_VISITED(node) !(TREE_LANG_FLAG_7 (node) == !PFE_FREEZING)
  +#define NODE_VISITED(node) !(TREE_LANG_FLAG_7 (node) == !PFE_DUMPING)
   
   typedef tree pfe_tree_stack_entry;
   static pfe_tree_stack_entry *pfe_tree_stack = NULL;
  @@ -242,7 +242,7 @@
        freeze the pointer.  If we are thawing, there is nothing to do 
        if the pointer is already thawed; otherwise, we thaw the 
        pointer.  */
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         node = *nodep;
         if (!node || PFE_IS_FROZEN (node))
  @@ -290,7 +290,7 @@
     
     /* Mark this node as "visited" so we don't try to stack it
        again.  */
  -  TREE_LANG_FLAG_7 (node) = PFE_FREEZING;
  +  TREE_LANG_FLAG_7 (node) = PFE_DUMPING;
   }
   
   /* Process all of the tree nodes that have been pushed onto the
  @@ -299,7 +299,7 @@
      tree nodes will add new nodes to the stack if nodes that have
      not been frozen/thawed are encountered.  */
   void
  -pfe_freeze_thaw_tree_walk (void)
  +pfe_freeze_thaw_tree_walk ()
   {
     tree node;
   
  @@ -324,7 +324,7 @@
         example, the lang specific c++ code for type decls needs
         TREE_TYPE.  */
       
  -      if (PFE_THAWING)
  +      if (PFE_LOADING)
        freeze_thaw_tree_common (node);
         
         switch (TREE_CODE_CLASS (TREE_CODE (node)))
  @@ -373,7 +373,7 @@
            example, the lang specific c++ code for type decls needs
            TREE_TYPE.  */
         
  -      if (PFE_FREEZING)
  +      if (PFE_DUMPING)
                freeze_thaw_tree_common (node);
       }
       
  @@ -404,22 +404,22 @@
        it will be loaded with the 1's we set when we froze it).
        
        The following macro encodes this test in terms of the pfe_operation.
  -     For freezing !PFE_FREEZING is always 0.  So if the visited flag is
  +     For freezing !PFE_DUMPING is always 0.  So if the visited flag is
        still 0 we haven't visited the node and the equality is true.
        Thus negation means we HAVE visitied the node.
        
  -     Conversly, for thawing, !PFE_FREEZING is always 1.  A node which
  +     Conversly, for thawing, !PFE_DUMPING is always 1.  A node which
        hasn't been visited will still be 1 (since this is what was
        written when we froze them).  So if the visited flag is still 1
        we haven't visited the node and the equality is true.  Thus
        again negation means we HAVE visitied the node.  */
         
  -  #define NODE_VISITED(node) !(TREE_LANG_FLAG_7 (node) == !PFE_FREEZING)
  +  #define NODE_VISITED(node) !(TREE_LANG_FLAG_7 (node) == !PFE_DUMPING)
       
     if (!nodep)
       return;
     
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         node = *nodep;
         if (!node || PFE_IS_FROZEN (node))
  @@ -464,7 +464,7 @@
       freeze_thaw_trace_tree (node, NULL);
     
     do {
  -    TREE_LANG_FLAG_7 (node) = PFE_FREEZING;
  +    TREE_LANG_FLAG_7 (node) = PFE_DUMPING;
   
       /* For thawing, we need to thaw the common tree portion first
          because there may be need to use the TREE_TYPE in places like
  @@ -472,7 +472,7 @@
          example, the lang specific c++ code for type decls needs
          TREE_TYPE.  */
       
  -    if (PFE_THAWING)
  +    if (PFE_LOADING)
         freeze_thaw_tree_common (node);
       
       switch (TREE_CODE_CLASS (TREE_CODE (node)))
  @@ -522,7 +522,7 @@
          example, the lang specific c++ code for type decls needs
          TREE_TYPE.  */
       
  -    if (PFE_FREEZING)
  +    if (PFE_DUMPING)
         freeze_thaw_tree_common (node);
       
       if (follow_chain)
  @@ -577,7 +577,7 @@
        until that portion is done.  Similarly we need to thaw them
        before we use them.  */
        
  -  if (PFE_THAWING)
  +  if (PFE_LOADING)
       {
         pfe_thaw_ptr (&DECL_LANG_SPECIFIC (node)); /* do this first */
         PFE_FREEZE_THAW_WALK (DECL_CONTEXT (node));
  @@ -619,7 +619,7 @@
        }
       }
       
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         PFE_FREEZE_THAW_WALK (DECL_CONTEXT (node));
         pfe_freeze_ptr (&DECL_LANG_SPECIFIC (node)); /* do this last */
  @@ -653,7 +653,7 @@
        so this is a rare instance we have to call pfe_freeze_thaw_tree_walk()
        explicitly.  */
     
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         tree *nodep = &TYPE_MAIN_VARIANT (node);
         while (*nodep && !PFE_IS_FROZEN (*nodep))
  @@ -721,7 +721,7 @@
     freeze_thaw_type_variant (node);
     PFE_FREEZE_THAW_WALK (TYPE_CONTEXT (node));                /* NEEDED? */
     
  -  if (PFE_THAWING)
  +  if (PFE_LOADING)
       pfe_thaw_ptr (&TYPE_LANG_SPECIFIC (node));
       
     if (!(*lang_hooks.pfe_freeze_thaw_type) (node))
  @@ -753,7 +753,7 @@
        }
       }
       
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       pfe_freeze_ptr (&TYPE_LANG_SPECIFIC (node));
   }
   
  @@ -881,7 +881,7 @@
     /* pfe_freeze_ptrs and pfe_thaw_ptrs are static inside pfe.c.  But we can
        temporarily make them non-static and use this code to make sure that
        freeze/thaw operations are totally symmetric in the freeze/thaw counts.  */
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
          extern int pfe_freeze_ptrs;
          fprintf (stderr, "(%d)", pfe_freeze_ptrs);
  @@ -913,7 +913,7 @@
     int  i;
     char *format_ptr;
   
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       {
         x = *xp;
         if (!x || PFE_IS_FROZEN (x))
  @@ -1214,7 +1214,7 @@
            name = (char *)tree_code_name[(int) TREE_CODE (type)];
        }
         
  -      if (PFE_FREEZING)
  +      if (PFE_DUMPING)
           {
             if (!PFE_IS_FROZEN (node1))
               {
  
  
  
  1.8       +3 -3      gcc3/gcc/pfe/objc-freeze-thaw.c
  
  Index: objc-freeze-thaw.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/objc-freeze-thaw.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- objc-freeze-thaw.c        2002/08/07 03:13:32     1.7
  +++ objc-freeze-thaw.c        2002/08/17 06:29:15     1.8
  @@ -1,6 +1,6 @@
   /* APPLE LOCAL file PFE */
   /* Walk ObjC/ObjC++-specific structs to freeze or thaw them.
  -   Copyright (C) 2001  Free Software Foundation, Inc.
  +   Copyright (C) 2001, 2002  Free Software Foundation, Inc.
      Contributed by Ziemowit Laski ([EMAIL PROTECTED])
   
   This file is part of GNU CC.
  @@ -59,7 +59,7 @@
   
     /* Initialize the language specific compiler state, and prepend it to the
        base language state.  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
     {
       struct pfe_base_lang_compiler_state *base_lang 
         = (struct pfe_base_lang_compiler_state 
*)pfe_compiler_state_ptr->lang_specific;
  @@ -79,7 +79,7 @@
       }  
     SET_MAX_DMP_TREE_CODE (LAST_OBJC_TREE_CODE);
   #endif
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       { 
         add_c_tree_codes ();  
         add_objc_tree_codes ();
  
  
  
  1.27      +24 -37    gcc3/gcc/pfe/pfe-header.c
  
  Index: pfe-header.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/pfe-header.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- pfe-header.c      2002/08/16 17:07:04     1.26
  +++ pfe-header.c      2002/08/17 06:29:15     1.27
  @@ -98,7 +98,7 @@
   pfe_freeze_thaw_include_header (pp)
        struct ht_identifier **pp;
   {
  -  struct pfe_include_header *p = (struct pfe_include_header *)PFE_FREEZE_THAW_PTR 
(pp);
  +  struct pfe_include_header *p = (struct pfe_include_header *) PFE_FREEZE_THAW_PTR 
(pp);
     
     if (!p)
       return;
  @@ -177,7 +177,7 @@
   
     full_name = pfe_absolute_path_name (fname);
     /* Include header list is updated only during PFE_DUMP.  */
  -  if (pfe_operation != PFE_DUMP)
  +  if (!PFE_DUMPING)
       fatal_error ("pfe_add_header_name can be used only with PFE_DUMP\n");
   
     header = (pfe_include_header *) ht_lookup (pfe_compiler_state_ptr->include_hash, 
  @@ -229,7 +229,7 @@
       fatal_error ("Incompatible format version pre-compiled header: \"%s\".", 
pfe_name);
   }
   
  -/* Check compiler version */
  +/* Check compiler version.  */
   static void
   pfe_check_compiler_version ()
   {
  @@ -286,10 +286,6 @@
        compiler.  */
     pfe_check_compiler_version ();
   
  -  /* Check that the pre-compiled header was built using the same 
  -     language dialect as the compiler being run.  */
  -  //pfe_check_lang ();  now done by <lang>_pfe_lang_init
  -
     /* Make sure that appropriate compiler settings are consistent.  */
     pfe_check_compiler_settings ();
   
  @@ -368,7 +364,6 @@
     pfe_freeze_thaw_ptr_fp (&hdr->pfe_predefined_global_names);
     PFE_HDR_TO_GLOBAL_IF_THAWING (pfe_predefined_global_names);
   
  -  //pfe_freeze_thaw_tree_walk (&hdr->global_namespace);
     pfe_freeze_thaw_hashtable (&hdr->include_hash, pfe_freeze_thaw_include_header);
     
     /* Identifier hash table.  Note that the elements of this table are
  @@ -379,18 +374,9 @@
                             pfe_freeze_thaw_cpp_hashnode);
     PFE_HDR_TO_GLOBAL_IF_THAWING (ident_hash);
     
  -  /* Root for all the declarations.  Note that global_binding_level
  -     is static so that pfe_freeze_thaw_binding_level() handles the
  -     moving of global_binding_level to and from the pfe header.  */
  -  //pfe_freeze_thaw_binding_level (NULL);
  - 
  -  /* Restore global trees */
  -  /* Save global trees (tree.c) */
  +  /* Global trees from tree.c.  */
     PFE_FREEZE_THAW_GLOBAL_TREE_ARRAY (global_trees, TI_MAX);
  - 
  -  /* Save global tree nodes used to represent various integer types. (tree.c) */
     PFE_FREEZE_THAW_GLOBAL_TREE_ARRAY (integer_types, itk_none);
  -
     PFE_FREEZE_THAW_GLOBAL_TREE_ARRAY (sizetype_tab, TYPE_KIND_LAST);
   
     /* Global trees from c-common.c.  */
  @@ -398,12 +384,12 @@
     
     /* __builtin_xxxx's from builtins.def  */
   #if 0 /* built_in_names needed because it appears to be constant */
  -  if (PFE_FREEZING)
  +  if (PFE_DUMPING)
       memcpy (hdr->built_in_names, built_in_names,
            (int)(END_BUILTINS) * sizeof (char *));
     for (i = 0; i < (int)(END_BUILTINS); ++i)
       PFE_FREEZE_THAW_PTR (&hdr->built_in_names[i]);
  -  if (PFE_THAWING)
  +  if (PFE_LOADING)
       memcpy (built_in_names, hdr->built_in_names,
            (int)(END_BUILTINS) * sizeof (char *));
   #endif
  @@ -464,7 +450,7 @@
      cpplib.h).  */
   void 
   pfe_freeze_thaw_cpp_hashnode (hnp)
  -  struct cpp_hashnode **hnp;
  +     struct cpp_hashnode **hnp;
   {
     /* We save a copy of original cpp_hashnode pointer, which, on the
        load side of things will be frozen (at least the first time we
  @@ -483,7 +469,7 @@
     
   #if 0
     /* ??? FF_diagnostic  */
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         printf ("pfe_freeze_thaw_cpp_hashnode: 0x%x\n", (unsigned int)hn);
         if (hn->ident.str != NULL)
  @@ -509,7 +495,7 @@
     if (PFE_IS_FROZEN (hn->ident.str))
       return;
   #endif
  -  if (pfe_operation == PFE_DUMP && hn->type == NT_MACRO)
  +  if (PFE_DUMPING && hn->type == NT_MACRO)
       {
         if (! ustrncmp (pfe_real_ptr (hn->ident.str), DSC ("__STDC_")))
           {
  @@ -543,7 +529,7 @@
     
   #if 0
     /* ??? FF_diagnostic  */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       {
         printf ("pfe_freeze_thaw_cpp_hashnode: 0x%x\n", (unsigned)hn);
         if (hn->ident.str != NULL)
  @@ -572,7 +558,7 @@
   pfe_freeze_thaw_obstack_chunk (pp)
        struct _obstack_chunk **pp;
   {
  -  struct _obstack_chunk *p = (struct _obstack_chunk *)PFE_FREEZE_THAW_PTR (pp);
  +  struct _obstack_chunk *p = (struct _obstack_chunk *) PFE_FREEZE_THAW_PTR (pp);
   
     /* Freeze/thaw this chunk and any chunks it might point to 
        (avoiding unneeded recursion).  */
  @@ -597,10 +583,10 @@
     
     /* When loading, restore the function pointers used to allocate
        and free obstack memory.  */
  -  if (PFE_THAWING)
  +  if (PFE_LOADING)
       {
         p->chunkfun = (struct _obstack_chunk *(*)(void *, long)) pfe_malloc;
  -      p->freefun  = (void (*) (void *, struct _obstack_chunk *))pfe_free;
  +      p->freefun  = (void (*) (void *, struct _obstack_chunk *)) pfe_free;
       }
   }
   
  @@ -609,14 +595,14 @@
   pfe_freeze_thaw_ht_identifier (pp)
        struct ht_identifier **pp;
   {
  -  struct ht_identifier *p = (struct ht_identifier *)PFE_FREEZE_THAW_PTR (pp);
  +  struct ht_identifier *p = (struct ht_identifier *) PFE_FREEZE_THAW_PTR (pp);
     
     if (!p)
       return;
       
   #if 0
     /* ??? FF_diagnostic  */
  -  if (pfe_operation == PFE_DUMP && !PFE_IS_FROZEN(p->str))
  +  if (PFE_DUMPING && !PFE_IS_FROZEN(p->str))
       printf ("pfe_freeze_thaw_ht_identifier: 0x%x '%s'\n", 
            (unsigned)p, pfe_real_ptr(p->str));
   #endif
  @@ -625,7 +611,7 @@
   
   #if 0
     /* ??? FF_diagnostic  */
  -  if (pfe_operation == PFE_LOAD)
  +  if (PFE_LOADING)
       printf ("pfe_freeze_thaw_ht_identifier: 0x%x '%s'\n", 
            (unsigned)p, pfe_real_ptr(p->str));
   #endif
  @@ -653,12 +639,12 @@
        We need to execute at least the code that reestablishes our
        function pointers in the struct ht and also the obstack.  */
        
  -  p = (struct ht *)pfe_freeze_thaw_ptr_fp (pp);
  +  p = (struct ht *) pfe_freeze_thaw_ptr_fp (pp);
     assert (p);
   
     /* When loading, restore the pointer to the function for
        allocating hash table nodes.  */
  -  if (PFE_THAWING)
  +  if (PFE_LOADING)
       p->alloc_node = pfe_get_cpphash_alloc_node ();
     
     /* Freeze/thaw the obstack embedded in the hash table.  */
  @@ -681,7 +667,7 @@
      cpplib.h).  */
   void 
   pfe_freeze_thaw_cpp_token (tp)
  -  struct cpp_token **tp;
  +     struct cpp_token **tp;
   {
     struct cpp_token *t = PFE_FREEZE_THAW_PTR (tp);
     
  @@ -693,7 +679,8 @@
     printf ("pfe_freeze_thaw_cpp_token: 0x%x\n", (unsigned) t);
   #endif
   
  -  switch (t->type) {
  +  switch (t->type)
  +    {
       case CPP_NAME:
         pfe_freeze_thaw_cpp_hashnode (&t->val.node);
         break;
  @@ -706,7 +693,7 @@
       case CPP_COMMENT:
   #if 0
         /* ??? FF_diagnostic  */
  -      if (pfe_operation == PFE_DUMP && !pfe_is_pfe_mem(t->val.str.text))
  +      if (PFE_DUMPING && !pfe_is_pfe_mem(t->val.str.text))
           {
             printf ("pfe_freeze_thaw_cpp_token: token->val.str.text not in PFE 
memory: 0x%x\n", 
                  (unsigned) t->val.str.text);
  @@ -731,7 +718,7 @@
         pfe_freeze_thaw_ptr_fp (&t->val.str.text);
   #if 0
         /* ??? FF_diagnostic  */
  -      if (pfe_operation == PFE_LOAD && !pfe_is_pfe_mem(t->val.str.text))
  +      if (PFE_LOADING && !pfe_is_pfe_mem(t->val.str.text))
           {
             printf ("pfe_freeze_thaw_cpp_token: token->val.str.text not in PFE 
memory: 0x%x\n", 
                  (unsigned) t->val.str.text);
  @@ -756,7 +743,7 @@
         break;
       default:
         break;
  -  }
  +    }
   }
   
   /*-------------------------------------------------------------------*/
  
  
  
  1.9       +1 -0      gcc3/gcc/pfe/pfe-header.h
  
  Index: pfe-header.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/pfe-header.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- pfe-header.h      2002/08/16 17:07:04     1.8
  +++ pfe-header.h      2002/08/17 06:29:15     1.9
  @@ -162,6 +162,7 @@
   
     /* Globals from emit-rtl.c.  */
     int label_num;
  +  rtx static_regno_reg_rtx[FIRST_PSEUDO_REGISTER];
     
     /* Garbage collector globals in ggc-page.c.  */
     /* Use anonomous pointer here.               */
  
  
  
  1.11      +5 -5      gcc3/gcc/pfe/pfe-mem.c
  
  Index: pfe-mem.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/pfe-mem.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- pfe-mem.c 2002/08/16 17:07:04     1.10
  +++ pfe-mem.c 2002/08/17 06:29:16     1.11
  @@ -165,7 +165,7 @@
   struct pfem_range {
     unsigned long start_addr;
     unsigned long end_addr;    /* Actually points to byte past the end.  */
  -  // ??? Keep track of anything else?
  +  /* ??? Keep track of anything else? */
   };
   typedef struct pfem_range pfem_range;
   
  @@ -241,12 +241,12 @@
   /* Size that a fragment is allowed to vary from the original allocation
      size request to be allocated without splitting the fragment into
      two.  */
  -// ??? Need to think further about what this should be.
  +/* FIXME Need to think further about what this should be.  */
   #define MAX_FRAGMENT_SIZE_VARIANCE_BEFORE_SPLIT 12
   
   /* Definitions for the original size of the range table and the
      increment by which to grow it (as needed).  */
  -// ??? Adjust these values to something reasonable.
  +/* FIXME Adjust these values to something reasonable.  */
   
   #define PFEM_INITIAL_RANGE_TABLE_SIZE 64
   #define PFEM_RANGE_TABLE_INCR 64
  @@ -869,7 +869,7 @@
     printf ("  pfem_alloc_fragment: bytes_needed (with overhead) = %d\n", 
          bytes_needed);
   #endif
  -  // ??? Take minimum alignment into account.  Compute this more elegantly.
  +  /* FIXME Take minimum alignment into account.  Compute this more elegantly.  */
     bytes_needed = (bytes_needed + 3) & 0xFFFFFFFC;
     
   #if PFEM_DEBUG
  @@ -948,7 +948,7 @@
        }
   #endif
   #if 0
  -      // FIXME: keep largest_free_fragment_size up-to-date
  +      /* FIXME: keep largest_free_fragment_size up-to-date */
         if (bytes_needed <= block_info->largest_free_fragment_size)
           {
          /* This block has a fragment that is big enough.  Walk the
  
  
  
  1.24      +23 -25    gcc3/gcc/pfe/pfe.c
  
  Index: pfe.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/pfe.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- pfe.c     2002/08/16 17:07:04     1.23
  +++ pfe.c     2002/08/17 06:29:16     1.24
  @@ -318,7 +318,7 @@
       pfe_internal_error ("pfe_init called again before termination");
     
     pfe_operation = action;
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         enum pfe_action saved_pfe_operation;
         
  @@ -377,7 +377,7 @@
         
         pfe_freeze_thaw_ptr_fp = pfe_freeze_ptr;
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         /* Nothing special required for loading at this time.  */
         pfe_freeze_thaw_ptr_fp = pfe_thaw_ptr;
  @@ -399,20 +399,18 @@
   pfe_term ()
   {
   #if PFE_MEMORY_STATS
  -  if (pfe_display_memory_stats  
  -      && ((pfe_operation == PFE_LOAD)
  -          || (pfe_operation == PFE_DUMP)))
  +  if (pfe_display_memory_stats && (PFE_LOADING || PFE_DUMPING))
       {
         printf ("\nPFE memory utilization summary:\n");
         printf ("pfe_operation               = %s\n", 
  -              (pfe_operation == PFE_LOAD) ? "PFE_LOAD" : "PFE_DUMP");
  +              (PFE_LOADING) ? "PFE_LOAD" : "PFE_DUMP");
         printf ("pfe_malloc_total_size       = %d\n", pfe_malloc_total_size);
         printf ("pfe_load_buffer_size        = %d\n", pfe_load_buffer_size);
         printf ("pfe_mallocs                 = %d\n", pfe_mallocs);
         printf ("pfe_callocs                 = %d\n", pfe_callocs);
         printf ("pfe_reallocs                = %d\n", pfe_reallocs);
         printf ("pfe_frees                   = %d\n", pfe_frees);
  -      if (pfe_operation == PFE_DUMP)
  +      if (PFE_DUMPING)
           {
          printf ("pfe_savestrings             = %d\n", 
                  pfe_savestrings);
  @@ -445,7 +443,7 @@
   
     if (pfe_operation == PFE_NOT_INITIALIZED)
       pfe_internal_error ("pfe_term called before pfe_init");
  -  else if (pfe_operation == PFE_DUMP)
  +  else if (PFE_DUMPING)
       {
   #if PFE_DEBUG_MEMMGR_RANGES
         int range_idx;
  @@ -462,7 +460,7 @@
         pfem_term ();
         free (pfe_compiler_state_ptr);
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         if (pfe_load_buffer_was_malloced)
           free (pfe_load_buffer_ptr);
  @@ -682,7 +680,7 @@
   
     timevar_push (TV_PFE_WRITE);
       
  -  if (pfe_operation != PFE_DUMP)
  +  if (!PFE_DUMPING)
       pfe_internal_error ("pfe_dump called when not initialized for dumping");
       
   #if 0
  @@ -795,7 +793,7 @@
   {
     struct stat file_info;
     
  -  if (pfe_operation != PFE_LOAD)
  +  if (!PFE_LOADING)
       pfe_internal_error ("pfe_load called when not initialized for loading");
       
     if (fstat (fileno (the_file), &file_info) != 0)
  @@ -949,11 +947,11 @@
   pfe_is_pfe_mem (ptr)
        void *ptr;
   {
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         return pfem_is_pfe_mem (ptr);
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         if (((unsigned)ptr >= (unsigned)pfe_load_buffer_ptr) 
          && ((unsigned)ptr < (unsigned)(pfe_load_buffer_ptr 
  @@ -1134,7 +1132,7 @@
   {
     void *p;
     
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         p = *pp;
         if (p == NULL || PFE_IS_FROZEN (p))
  @@ -1178,7 +1176,7 @@
     
     pfe_allowed_ptr_variance = n;
     
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         p = *pp;
         if (p == NULL || PFE_IS_FROZEN (p))
  @@ -1207,7 +1205,7 @@
   {
     unsigned long offset;
     
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         if (PFE_IS_FROZEN (p))
        {
  @@ -1239,7 +1237,7 @@
          pfe_internal_error ("pfe_real_ptr could not thaw frozen ptr");
        }
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         if (PFE_IS_FROZEN (p))
        {
  @@ -1281,7 +1279,7 @@
     pfe_mallocs++;
   #endif
   
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
   #if PFE_DEBUG_EXTRA_CHECKING
         if (pfe_memory_locked_for_dump)
  @@ -1314,7 +1312,7 @@
     pfe_callocs++;
   #endif
   
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
   #if PFE_DEBUG_EXTRA_CHECKING
         if (pfe_memory_locked_for_dump)
  @@ -1344,7 +1342,7 @@
     pfe_reallocs++;
   #endif
   
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
   #if PFE_DEBUG_EXTRA_CHECKING
         if (pfe_memory_locked_for_dump)
  @@ -1355,7 +1353,7 @@
         if (!p)
        fatal_error ("PFE: memory exhausted");
       }
  -  else if (pfe_operation == PFE_LOAD && pfe_is_pfe_mem (p))
  +  else if (PFE_LOADING && pfe_is_pfe_mem (p))
       {
         /* We can't do a xrealloc if the memory being realloc'ed is in
            PFE load memory because the pointer will not correspond to
  @@ -1400,11 +1398,11 @@
     pfe_frees++;
   #endif
   
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         pfem_free (ptr);
       }
  -  else if (pfe_operation == PFE_LOAD)
  +  else if (PFE_LOADING)
       {
         /* Don't do frees out of PFE load memory because it was all 
            allocated with a single malloc call.  */
  @@ -1465,7 +1463,7 @@
            }
          else
            {
  -           // The kinds are the same, now sort on the size.
  +           /* The kinds are the same, now sort on the size.  */
              if (size < pfe_s_malloc_table[middle_idx].size)
                upper_idx = middle_idx - 1;
              else if (size > pfe_s_malloc_table[middle_idx].size)
  @@ -1585,7 +1583,7 @@
     if (!s)
       return NULL;
   
  -  if (pfe_operation == PFE_DUMP)
  +  if (PFE_DUMPING)
       {
         hashnode ht_node;
   
  
  
  
  1.12      +9 -9      gcc3/gcc/pfe/pfe.h
  
  Index: pfe.h
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/pfe/pfe.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- pfe.h     2002/08/16 17:07:04     1.11
  +++ pfe.h     2002/08/17 06:29:16     1.12
  @@ -72,8 +72,8 @@
      things a little easier to read when we cannot do an operation
      that can be handled by a function handling both freezing and
      thawing.  */
  -#define PFE_FREEZING (pfe_operation == PFE_DUMP)
  -#define PFE_THAWING  (pfe_operation == PFE_LOAD)
  +#define PFE_DUMPING (pfe_operation == PFE_DUMP)
  +#define PFE_LOADING (pfe_operation == PFE_LOAD)
   
   /* Pointer to the PFE header with the global compiler state to be
      saved when dumping and restored when loading.  It contains the
  @@ -396,8 +396,8 @@
   /* Macros to make it a  little "easier" (?) to move globals between the pfe
      headedr and compiler globals.  */
      
  -#define PFE_GLOBAL_TO_HDR_IF_FREEZING(g) if (PFE_FREEZING) hdr->g = g
  -#define PFE_HDR_TO_GLOBAL_IF_THAWING(g)  if (PFE_THAWING)  g = hdr->g
  +#define PFE_GLOBAL_TO_HDR_IF_FREEZING(g) if (PFE_DUMPING) hdr->g = g
  +#define PFE_HDR_TO_GLOBAL_IF_THAWING(g)  if (PFE_LOADING)  g = hdr->g
   
   #define PFE_FREEZE_THAW_GLOBAL_TREE(g) \
     do { \
  @@ -407,9 +407,9 @@
     } while (0)
   
   #define PFE_GLOBAL_TREE_ARRAY_TO_HDR(g, n) \
  -  if (PFE_FREEZING) memcpy (hdr->g, g, (int)(n) * sizeof (tree))
  +  if (PFE_DUMPING) memcpy (hdr->g, g, (int)(n) * sizeof (tree))
   #define PFE_HDR_TO_GLOBAL_TREE_ARRAY(g, n) \
  -  if (PFE_THAWING) memcpy (g, hdr->g, (int)(n) * sizeof (tree))
  +  if (PFE_LOADING) memcpy (g, hdr->g, (int)(n) * sizeof (tree))
     
   #define PFE_FREEZE_THAW_GLOBAL_TREE_ARRAY(g, n) \
     do { \
  @@ -426,12 +426,12 @@
     } while (0)
   
   #define PFE_GLOBAL_RTX_ARRAY_TO_HDR(g, n) \
  -  if (PFE_FREEZING) memcpy (hdr->g, g, (int)(n) * sizeof (struct rtx_def *))
  +  if (PFE_DUMPING) memcpy (hdr->g, g, (int)(n) * sizeof (struct rtx_def *))
   #define PFE_HDR_TO_GLOBAL_RTX_ARRAY(g, n) \
  -  if (PFE_THAWING) memcpy (g, hdr->g, (int)(n) * sizeof (struct rtx_def *))
  +  if (PFE_LOADING) memcpy (g, hdr->g, (int)(n) * sizeof (struct rtx_def *))
     
   #define PFE_FREEZE_THAW_GLOBAL_RTX_ARRAY(g, n) \
  -  do { \
  +  do { int i;\
       PFE_GLOBAL_TREE_ARRAY_TO_HDR(g, n); \
       for (i = 0; i < (int)(n); ++i) PFE_FREEZE_THAW_RTX (hdr->g[i]); \
       PFE_HDR_TO_GLOBAL_TREE_ARRAY(g, n); \
  
  
  


Reply via email to