]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree.c (expr_tree_cons, build_expr_list, expralloc): New fns.
authorJason Merrill <jason@yorick.cygnus.com>
Tue, 14 Oct 1997 18:43:16 +0000 (18:43 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 14 Oct 1997 18:43:16 +0000 (14:43 -0400)
From-SVN: r15898

gcc/ChangeLog
gcc/tree.c

index d4c5d7da837410e9d7f5507d4c56ed1539021a75..5b9bdbb414bb49f1d1ba8c393827405a6218a87c 100644 (file)
@@ -1,3 +1,7 @@
+Tue Oct 14 11:30:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * tree.c (expr_tree_cons, build_expr_list, expralloc): New fns.
+
 Fri Oct 10 13:46:56 1997  Doug Evans  <dje@canuck.cygnus.com>
 
        * configure.in: Handle --with-newlib.
index 9d6850f726c47796d076b23d423cabd9694b5961..6812aa4aade4d9a7d248c8aacdb43b4e2c01f678 100644 (file)
@@ -704,6 +704,16 @@ savealloc (size)
 {
   return (char *) obstack_alloc (saveable_obstack, size);
 }
+
+/* Allocate SIZE bytes in the expression obstack
+   and return a pointer to them.  */
+
+char *
+expralloc (size)
+     int size;
+{
+  return (char *) obstack_alloc (expression_obstack, size);
+}
 \f
 /* Print out which obstack an object is in.  */
 
@@ -2002,6 +2012,20 @@ build_decl_list (parm, value)
   return node;
 }
 
+/* Similar, but build on the expression_obstack.  */
+
+tree
+build_expr_list (parm, value)
+     tree parm, value;
+{
+  register tree node;
+  register struct obstack *ambient_obstack = current_obstack;
+  current_obstack = expression_obstack;
+  node = build_tree_list (parm, value);
+  current_obstack = ambient_obstack;
+  return node;
+}
+
 /* Return a newly created TREE_LIST node whose
    purpose and value fields are PARM and VALUE
    and whose TREE_CHAIN is CHAIN.  */
@@ -2048,6 +2072,20 @@ decl_tree_cons (purpose, value, chain)
   return node;
 }
 
+/* Similar, but build on the expression_obstack.  */
+
+tree
+expr_tree_cons (purpose, value, chain)
+     tree purpose, value, chain;
+{
+  register tree node;
+  register struct obstack *ambient_obstack = current_obstack;
+  current_obstack = expression_obstack;
+  node = tree_cons (purpose, value, chain);
+  current_obstack = ambient_obstack;
+  return node;
+}
+
 /* Same as `tree_cons' but make a permanent object.  */
 
 tree