]> gcc.gnu.org Git - gcc.git/commitdiff
function.h (struct function): Add new element LANGUAGE.
authorBernd Schmidt <crux@pool.informatik.rwth-aachen.de>
Sat, 4 Sep 1999 02:16:58 +0000 (02:16 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sat, 4 Sep 1999 02:16:58 +0000 (02:16 +0000)
  * function.h (struct function): Add new element LANGUAGE.
  (save_lang_status): Declare new variable.
(restore_lang_status): Likewise.
* function.c (save_lang_status): Define.
(restore_lang_status): Likewise.
(push_function_context_to): Call language-specific save function.
(pop_function_context_from): Call language-specific restore function.

From-SVN: r29095

gcc/ChangeLog
gcc/function.c
gcc/function.h

index d0e19edf1d8b7845897efa4d80a61d3cfd4bf0fa..4e7eb169c5bbd25ce227fd4f5084a7fa67fa9f0d 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep  3 19:02:38 1999  Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
+
+       * function.h (struct function): Add new element LANGUAGE.
+       (save_lang_status): Declare new variable.
+       (restore_lang_status): Likewise.
+       * function.c (save_lang_status): Define.
+       (restore_lang_status): Likewise.
+       (push_function_context_to): Call language-specific save function.
+       (pop_function_context_from): Call language-specific restore function.
+       
 Fri Sep  3 01:16:18 1999  Alasdair Baird  <alasdair@wildcat.demon.co.uk>
 
        * i386.md (movsf_1): Check REG_P before use of REGNO.
index 6fb5368a3a3cd086e097342a40943742d1708696..c86792164eba5919718a47f7efe9e07083ef6277 100644 (file)
@@ -120,6 +120,10 @@ static int virtuals_instantiated;
 void (*save_machine_status) PROTO((struct function *));
 void (*restore_machine_status) PROTO((struct function *));
 
+/* Likewise, but for language-specific data.  */
+void (*save_lang_status) PROTO((struct function *));
+void (*restore_lang_status) PROTO((struct function *));
+
 /* The FUNCTION_DECL for an inline function currently being expanded.  */
 tree inline_function_decl;
 
@@ -287,9 +291,10 @@ find_function_data (decl)
 }
 
 /* Save the current context for compilation of a nested function.
-   This is called from language-specific code.
-   The caller is responsible for saving any language-specific status,
-   since this function knows only about language-independent variables.  */
+   This is called from language-specific code.  The caller should use
+   the save_lang_status callback to save any language-specific state,
+   since this function knows only about language-independent
+   variables.  */
 
 void
 push_function_context_to (context)
@@ -308,6 +313,8 @@ push_function_context_to (context)
 
   save_tree_status (p, context);
   save_varasm_status (p, context);
+  if (save_lang_status)
+    (*save_lang_status) (p);
   if (save_machine_status)
     (*save_machine_status) (p);
 
@@ -344,6 +351,8 @@ pop_function_context_from (context)
 
   if (restore_machine_status)
     (*restore_machine_status) (p);
+  if (restore_lang_status)
+    (*restore_lang_status) (p);
 
   /* Finish doing put_var_into_stack for any of our variables
      which became addressable during the nested function.  */
index 86d2c3cf9f0669c72251f38a3952381b5c3e9131..9a9156ae2a86a0551fa1339cfc77e79ff335bbcf 100644 (file)
@@ -440,6 +440,9 @@ struct function
   /* tm.h can use this to store whatever it likes.  */
   struct machine_function *machine;
 
+  /* Language-specific code can use this to store whatever it likes.  */
+  struct language_function *language;
+
   /* For reorg.  */
 
   /* If some insns can be deferred to the delay slots of the epilogue, the
@@ -541,6 +544,10 @@ extern HOST_WIDE_INT get_func_frame_size PROTO((struct function *));
 extern void (*save_machine_status) PROTO((struct function *));
 extern void (*restore_machine_status) PROTO((struct function *));
 
+/* Likewise, but for language-specific data.  */
+extern void (*save_lang_status)                PROTO((struct function *));
+extern void (*restore_lang_status)     PROTO((struct function *));
+
 /* Save and restore status information for a nested function.  */
 extern void save_tree_status           PROTO((struct function *, tree));
 extern void restore_tree_status                PROTO((struct function *, tree));
This page took 0.083249 seconds and 5 git commands to generate.