OSDN Git Service

(typedef tree_node_kind): Added new kind, i.e. `b_kind'.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 1992 04:17:58 +0000 (04:17 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 1992 04:17:58 +0000 (04:17 +0000)
(tree_node_kind_names):  Added name for `b_kind'.
(make_node, copy_node, stabilize_reference_1):
Handle case 'b' (for BLOCK nodes).
(make_node):  Don't try to deal with BLOCKs when doing a type 'e' node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1603 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/tree.c

index e389770..270705a 100644 (file)
@@ -195,16 +195,45 @@ char **tree_code_name;
 /* Statistics-gathering stuff.  */
 typedef enum
 {
-  d_kind, t_kind, s_kind, r_kind, e_kind, c_kind,
-  id_kind, op_id_kind, perm_list_kind, temp_list_kind,
-  vec_kind, x_kind, lang_decl, lang_type, all_kinds
+  d_kind,
+  t_kind,
+  b_kind,
+  s_kind,
+  r_kind,
+  e_kind,
+  c_kind,
+  id_kind,
+  op_id_kind,
+  perm_list_kind,
+  temp_list_kind,
+  vec_kind,
+  x_kind,
+  lang_decl,
+  lang_type,
+  all_kinds
 } tree_node_kind;
+
 int tree_node_counts[(int)all_kinds];
 int tree_node_sizes[(int)all_kinds];
 int id_string_size = 0;
-char *tree_node_kind_names[] = { "decls", "types", "stmts", "refs", "exprs", "constants",
-                                "identifiers", "op_identifiers", "perm_tree_lists", "temp_tree_lists",
-                                "vecs", "random kinds", "lang_decl kinds", "lang_type kinds" };
+
+char *tree_node_kind_names[] = {
+  "decls",
+  "types",
+  "blocks",
+  "stmts",
+  "refs",
+  "exprs",
+  "constants",
+  "identifiers",
+  "op_identifiers",
+  "perm_tree_lists",
+  "temp_tree_lists",
+  "vecs",
+  "random kinds",
+  "lang_decl kinds",
+  "lang_type kinds"
+};
 
 /* Hash table for uniquizing IDENTIFIER_NODEs by name.  */
 
@@ -774,6 +803,16 @@ make_node (code)
        obstack = all_types_permanent ? &permanent_obstack : saveable_obstack;
       break;
 
+    case 'b':  /* a lexical block */
+#ifdef GATHER_STATISTICS
+      kind = b_kind;
+#endif
+      length = sizeof (struct tree_block);
+      /* All BLOCK nodes are put where we can preserve them if nec.  */
+      if (obstack != &permanent_obstack)
+       obstack = saveable_obstack;
+      break;
+
     case 's':  /* an expression with side effects */
 #ifdef GATHER_STATISTICS
       kind = s_kind;
@@ -793,10 +832,8 @@ make_node (code)
     usual_kind:
 #endif
       obstack = expression_obstack;
-      /* All BLOCK nodes are put where we can preserve them if nec.
-        Also their potential controllers.  */
-      if ((code == BLOCK || code == BIND_EXPR)
-         && obstack != &permanent_obstack)
+      /* All BIND_EXPR nodes are put where we can preserve them if nec.  */
+      if (code == BIND_EXPR && obstack != &permanent_obstack)
        obstack = saveable_obstack;
       length = sizeof (struct tree_exp)
        + (tree_code_length[(int) code] - 1) * sizeof (char *);
@@ -907,6 +944,10 @@ copy_node (node)
       length = sizeof (struct tree_type);
       break;
 
+    case 'b':  /* a lexical block node */
+      length = sizeof (struct tree_block);
+      break;
+
     case 'r':  /* a reference */
     case 'e':  /* a expression */
     case 's':  /* an expression with side effects */
@@ -1861,6 +1902,7 @@ stabilize_reference_1 (e)
     case 'x':
     case 't':
     case 'd':
+    case 'b':
     case '<':
     case 's':
     case 'e':