home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / cc-61.0.1 / cc / function.h < prev    next >
C/C++ Source or Header  |  1991-06-03  |  4KB  |  171 lines

  1. /* Structure for saving state for a nested function.
  2.    Copyright (C) 1989 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20.  
  21. #ifndef NULL_TREE
  22. #define tree int *
  23. #endif
  24. #ifndef GET_CODE
  25. #define rtx int *
  26. #endif
  27.  
  28. struct var_refs_queue
  29.   {
  30.     rtx modified;
  31.     rtx original;
  32.     struct var_refs_queue *next;
  33.   };
  34.  
  35. /* Stack of pending (incomplete) sequences saved by `start_sequence'.
  36.    Each element describes one pending sequence.
  37.    The main insn-chain is saved in the last element of the chain,
  38.    unless the chain is empty.  */
  39.  
  40. struct sequence_stack
  41. {
  42.   /* First and last insns in the chain of the saved sequence.  */
  43.   rtx first, last;
  44.   struct sequence_stack *next;
  45. };
  46.  
  47. extern struct sequence_stack *sequence_stack;
  48.  
  49. /* This structure can save all the important global and static variables
  50.    describing the status of the current function.  */
  51.  
  52. struct function
  53. {
  54.   struct function *next;
  55.  
  56.   /* For function.c.  */
  57.   char *name;
  58.   tree decl;
  59.   int pops_args;
  60.   int returns_struct;
  61.   int returns_pcc_struct;
  62.   int needs_context;
  63.   int calls_setjmp;
  64.   int calls_alloca;
  65.   int has_nonlocal_label;
  66.   rtx nonlocal_goto_handler_slot;
  67.   rtx nonlocal_goto_stack_level;
  68.   tree nonlocal_labels;
  69.   int args_size;
  70.   int pretend_args_size;
  71.   rtx arg_offset_rtx;
  72.   int max_parm_reg;
  73.   rtx *parm_reg_stack_loc;
  74.   int outgoing_args_size;
  75.   rtx return_rtx;
  76.   rtx cleanup_label;
  77.   rtx return_label;
  78.   rtx save_expr_regs;
  79.   rtx stack_slot_list;
  80.   rtx parm_birth_insn;
  81.   int frame_offset;
  82.   rtx tail_recursion_label;
  83.   rtx tail_recursion_reentry;
  84.   rtx arg_pointer_save_area;
  85.   tree rtl_expr_chain;
  86.   rtx last_parm_insn;
  87.   tree context_display;
  88.   tree trampoline_list;
  89.   int function_call_count;
  90.   struct temp_slot *temp_slots;
  91.   int temp_slot_level;
  92.   /* This slot is initialized as 0 and is added to
  93.      during the nested function.  */
  94.   struct var_refs_queue *fixup_var_refs_queue;
  95.  
  96.   /* For stmt.c  */
  97.   struct nesting *block_stack;
  98.   struct nesting *stack_block_stack;
  99.   struct nesting *cond_stack;
  100.   struct nesting *loop_stack;
  101.   struct nesting *case_stack;
  102.   struct nesting *nesting_stack;
  103.   int nesting_depth;
  104.   int block_start_count;
  105.   tree last_expr_type;
  106.   rtx last_expr_value;
  107.   int expr_stmts_for_value;
  108.   char *emit_filename;
  109.   int emit_lineno;
  110.   struct goto_fixup *goto_fixup_chain;
  111.  
  112.   /* For expr.c.  */
  113.   int pending_stack_adjust;
  114.   int inhibit_defer_pop;
  115.   tree cleanups_this_call;
  116.   rtx saveregs_value;
  117.  
  118.   /* For emit-rtl.c.  */
  119.   int reg_rtx_no;
  120.   int first_label_num;
  121.   rtx first_insn;
  122.   rtx last_insn;
  123.   struct sequence_stack *sequence_stack;
  124.   int cur_insn_uid;
  125.   int last_linenum;
  126.   char *last_filename;
  127.   char *regno_pointer_flag;
  128.   int regno_pointer_flag_length;
  129.   rtx *regno_reg_rtx;
  130.  
  131.   /* For stor-layout.c.  */
  132.   tree permanent_type_chain;
  133.   tree temporary_type_chain;
  134.   tree permanent_type_end;
  135.   tree temporary_type_end;
  136.   tree pending_sizes;
  137.   int immediate_size_expand;
  138.  
  139.   /* For tree.c.  */
  140.   int all_types_permanent;
  141.   struct momentary_level *momentary_stack;
  142.   char *maybepermanent_firstobj;
  143.   char *temporary_firstobj;
  144.   char *momentary_firstobj;
  145.   struct obstack *current_obstack;
  146.   struct obstack *function_obstack;
  147.   struct obstack *function_maybepermanent_obstack;
  148.   struct obstack *expression_obstack;
  149.   struct obstack *saveable_obstack;
  150.   struct obstack *rtl_obstack;
  151.  
  152.   /* For integrate.c.  */
  153.   int uses_const_pool;
  154. };
  155.  
  156. #ifdef rtx
  157. #undef rtx
  158. #endif
  159.  
  160. #ifdef tree
  161. #undef tree
  162. #endif
  163.  
  164.  
  165. /* Given a function decl for a containing function,
  166.    return the `struct function' for it.  */
  167. struct function *find_function_data ();
  168.  
  169. /* Pointer to chain of `struct function' for containing functions.  */
  170. struct function *outer_function_chain;
  171.