home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Source / GNU / cc / cc / function.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-03  |  4.8 KB  |  189 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_longjmp;
  65.   int calls_alloca;
  66.   int has_nonlocal_label;
  67.   rtx nonlocal_goto_handler_slot;
  68.   rtx nonlocal_goto_stack_level;
  69.   tree nonlocal_labels;
  70.   int args_size;
  71.   int pretend_args_size;
  72.   rtx arg_offset_rtx;
  73.   int max_parm_reg;
  74.   rtx *parm_reg_stack_loc;
  75.   int outgoing_args_size;
  76.   rtx return_rtx;
  77.   rtx cleanup_label;
  78.   rtx return_label;
  79.   rtx save_expr_regs;
  80.   rtx stack_slot_list;
  81.   rtx parm_birth_insn;
  82.   int frame_offset;
  83.   rtx tail_recursion_label;
  84.   rtx tail_recursion_reentry;
  85.   rtx internal_arg_pointer;
  86.   rtx arg_pointer_save_area;
  87.   tree rtl_expr_chain;
  88.   rtx last_parm_insn;
  89.   tree context_display;
  90.   tree trampoline_list;
  91.   int function_call_count;
  92.   struct temp_slot *temp_slots;
  93.   int temp_slot_level;
  94.   /* This slot is initialized as 0 and is added to
  95.      during the nested function.  */
  96.   struct var_refs_queue *fixup_var_refs_queue;
  97.  
  98.   /* For stmt.c  */
  99.   struct nesting *block_stack;
  100.   struct nesting *stack_block_stack;
  101.   struct nesting *cond_stack;
  102.   struct nesting *loop_stack;
  103.   struct nesting *case_stack;
  104.   struct nesting *nesting_stack;
  105.   int nesting_depth;
  106.   int block_start_count;
  107.   tree last_expr_type;
  108.   rtx last_expr_value;
  109.   int expr_stmts_for_value;
  110.   char *emit_filename;
  111.   int emit_lineno;
  112.   struct goto_fixup *goto_fixup_chain;
  113.  
  114.   /* For expr.c.  */
  115.   int pending_stack_adjust;
  116.   int inhibit_defer_pop;
  117.   tree cleanups_this_call;
  118.   rtx saveregs_value;
  119.   rtx forced_labels;
  120.  
  121.   /* For emit-rtl.c.  */
  122.   int reg_rtx_no;
  123.   int first_label_num;
  124.   rtx first_insn;
  125.   rtx last_insn;
  126.   struct sequence_stack *sequence_stack;
  127.   int cur_insn_uid;
  128.   int last_linenum;
  129.   char *last_filename;
  130.   char *regno_pointer_flag;
  131.   int regno_pointer_flag_length;
  132.   rtx *regno_reg_rtx;
  133.  
  134.   /* For stor-layout.c.  */
  135.   tree permanent_type_chain;
  136.   tree temporary_type_chain;
  137.   tree permanent_type_end;
  138.   tree temporary_type_end;
  139.   tree pending_sizes;
  140.   int immediate_size_expand;
  141.  
  142.   /* For tree.c.  */
  143.   int all_types_permanent;
  144.   struct momentary_level *momentary_stack;
  145.   char *maybepermanent_firstobj;
  146.   char *temporary_firstobj;
  147.   char *momentary_firstobj;
  148.   struct obstack *current_obstack;
  149.   struct obstack *function_obstack;
  150.   struct obstack *function_maybepermanent_obstack;
  151.   struct obstack *expression_obstack;
  152.   struct obstack *saveable_obstack;
  153.   struct obstack *rtl_obstack;
  154.  
  155.   /* For integrate.c.  */
  156.   int uses_const_pool;
  157.  
  158.   /* For md files.  */
  159.   int uses_pic_offset_table;
  160. };
  161.  
  162. /* The FUNCTION_DECL for an inline function currently being expanded.  */
  163. extern tree inline_function_decl;
  164.  
  165. /* Label that will go on function epilogue.
  166.    Jumping to this label serves as a "return" instruction
  167.    on machines which require execution of the epilogue on all returns.  */
  168. extern rtx return_label;
  169.  
  170. /* List (chain of EXPR_LISTs) of all stack slots in this function.
  171.    Made for the sake of unshare_all_rtl.  */
  172. extern rtx stack_slot_list;
  173.  
  174. #ifdef rtx
  175. #undef rtx
  176. #endif
  177.  
  178. #ifdef tree
  179. #undef tree
  180. #endif
  181.  
  182.  
  183. /* Given a function decl for a containing function,
  184.    return the `struct function' for it.  */
  185. struct function *find_function_data ();
  186.  
  187. /* Pointer to chain of `struct function' for containing functions.  */
  188. extern struct function *outer_function_chain;
  189.