OSDN Git Service

* tree.def (SET_TYPE): Remove.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Dec 2004 10:54:50 +0000 (10:54 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Dec 2004 10:54:50 +0000 (10:54 +0000)
(CONSTRUCTOR): Update description.
* builtins.c (type_to_class) Remove SET_TYPE case.
* dbxout.c (dbxout_type): Likewise.
* dwarf2out.c (is_base_type): Likewise.
(gen_set_type_die): Remove.
(gen_type_die): Remove SET_TYPE case.
* expr.c (count_type_elements): Likewise.
(mostly_zeroes_p): Likewise.
(store_constructor): Likewise.
* print_tree.c (print_node): Likewise.
* stor-layout.c (layout_type): Likewise.
* tree-browser.c (browse_tree): Likewise.
* tree-inline.c (remap_type): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree.c (type_contains_plaeholder_1, type_hash_eq,
variably_modified_type_p, initializer_zerop): Likewise.
* tree.h (SET_OR_ARRAY_CHECK): Remove.
(AGGREGATE_TYPE_P): Remove SET_TYPE check.
(TYPE_DOMAIN): Use ARRAY_TYPE_CHECK.
* typeclass.h (enum type_class): Remove set_type_class.
* varasm.c (const_hash_1): Remove SET_TYPE case.
(compare_constant, copy_constant, output_constant): Likewise.
* config/i386/i386.c (classify_argument): Likewise.
* config/ia64/ia64.c (hfa_element_mode): Likewise.
* config/sparc/sparc.c (sparc_type_code): Likewise.

* ada/decl.c (gnat_substitute_in_type): Remove SET_TYPE case.

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

20 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/decl.c
gcc/builtins.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/config/sparc/sparc.c
gcc/dbxout.c
gcc/dwarf2out.c
gcc/expr.c
gcc/print-tree.c
gcc/stor-layout.c
gcc/tree-browser.c
gcc/tree-inline.c
gcc/tree-pretty-print.c
gcc/tree.c
gcc/tree.def
gcc/tree.h
gcc/typeclass.h
gcc/varasm.c

index 7bfcabe..e234897 100644 (file)
@@ -1,5 +1,32 @@
 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
 
+       * tree.def (SET_TYPE): Remove.
+       (CONSTRUCTOR): Update description.
+       * builtins.c (type_to_class) Remove SET_TYPE case.
+       * dbxout.c (dbxout_type): Likewise.
+       * dwarf2out.c (is_base_type): Likewise.
+       (gen_set_type_die): Remove.
+       (gen_type_die): Remove SET_TYPE case.
+       * expr.c (count_type_elements): Likewise.
+       (mostly_zeroes_p): Likewise.
+       (store_constructor): Likewise.
+       * print_tree.c (print_node): Likewise.
+       * stor-layout.c (layout_type): Likewise.
+       * tree-browser.c (browse_tree): Likewise.
+       * tree-inline.c (remap_type): Likewise.
+       * tree-pretty-print.c (dump_generic_node): Likewise.
+       * tree.c (type_contains_plaeholder_1, type_hash_eq,
+       variably_modified_type_p, initializer_zerop): Likewise.
+       * tree.h (SET_OR_ARRAY_CHECK): Remove.
+       (AGGREGATE_TYPE_P): Remove SET_TYPE check.
+       (TYPE_DOMAIN): Use ARRAY_TYPE_CHECK.
+       * typeclass.h (enum type_class): Remove set_type_class.
+       * varasm.c (const_hash_1): Remove SET_TYPE case.
+       (compare_constant, copy_constant, output_constant): Likewise.
+       * config/i386/i386.c (classify_argument): Likewise.
+       * config/ia64/ia64.c (hfa_element_mode): Likewise.
+       * config/sparc/sparc.c (sparc_type_code): Likewise.
+
        PR c++/16681
        * tree-inline.c (estimate_num_insns_1): Add RANGE_EXPR case.
 
index 80718be..44e0cb7 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * decl.c (gnat_substitute_in_type): Remove SET_TYPE case.
+
 2004-12-07  Ed Falis  <falis@adacore.com>
 
        * s-intman-vxworks.adb (Notify_Exception): removed useless check for
index eebb7cb..d11b11a 100644 (file)
@@ -6276,7 +6276,6 @@ gnat_substitute_in_type (tree t, tree f, tree r)
     case OFFSET_TYPE:
     case METHOD_TYPE:
     case FILE_TYPE:
-    case SET_TYPE:
     case FUNCTION_TYPE:
     case LANG_TYPE:
       /* Don't know how to do these yet.  */
index 7b4ef52..dfad35c 100644 (file)
@@ -1475,7 +1475,6 @@ type_to_class (tree type)
     case QUAL_UNION_TYPE:  return union_type_class;
     case ARRAY_TYPE:      return (TYPE_STRING_FLAG (type)
                                   ? string_type_class : array_type_class);
-    case SET_TYPE:        return set_type_class;
     case FILE_TYPE:       return file_type_class;
     case LANG_TYPE:       return lang_type_class;
     default:              return no_type_class;
index e56fc77..31be4d1 100644 (file)
@@ -2255,31 +2255,6 @@ classify_argument (enum machine_mode mode, tree type,
                }
            }
        }
-      else if (TREE_CODE (type) == SET_TYPE)
-       {
-         if (bytes <= 4)
-           {
-             classes[0] = X86_64_INTEGERSI_CLASS;
-             return 1;
-           }
-         else if (bytes <= 8)
-           {
-             classes[0] = X86_64_INTEGER_CLASS;
-             return 1;
-           }
-         else if (bytes <= 12)
-           {
-             classes[0] = X86_64_INTEGER_CLASS;
-             classes[1] = X86_64_INTEGERSI_CLASS;
-             return 2;
-           }
-         else
-           {
-             classes[0] = X86_64_INTEGER_CLASS;
-             classes[1] = X86_64_INTEGER_CLASS;
-             return 2;
-           }
-       }
       else
        abort ();
 
index 1c80ed1..64a4e54 100644 (file)
@@ -2975,8 +2975,7 @@ hfa_element_mode (tree type, int nested)
     case VOID_TYPE:    case INTEGER_TYPE:      case ENUMERAL_TYPE:
     case BOOLEAN_TYPE: case CHAR_TYPE:         case POINTER_TYPE:
     case OFFSET_TYPE:  case REFERENCE_TYPE:    case METHOD_TYPE:
-    case FILE_TYPE:    case SET_TYPE:          case LANG_TYPE:
-    case FUNCTION_TYPE:
+    case FILE_TYPE:    case LANG_TYPE:         case FUNCTION_TYPE:
       return VOIDmode;
 
       /* Fortran complex types are supposed to be HFAs, so we need to handle
index b13f820..0eff775 100644 (file)
@@ -7709,7 +7709,6 @@ sparc_type_code (register tree type)
        case CHAR_TYPE:         /* GNU Pascal CHAR type.  Not used in C.  */
        case BOOLEAN_TYPE:      /* GNU Fortran BOOLEAN type.  */
        case FILE_TYPE:         /* GNU Pascal FILE type.  */
-       case SET_TYPE:          /* GNU Pascal SET type.  */
        case LANG_TYPE:         /* ? */
          return qualifiers;
   
index e9ad8d3..8c2d6ea 100644 (file)
@@ -1967,23 +1967,6 @@ dbxout_type (tree type, int full)
        }
       break;
 
-    case SET_TYPE:
-      if (use_gnu_debug_info_extensions)
-       {
-         have_used_extensions = 1;
-         stabstr_S ("@s");
-         stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
-         stabstr_C (';');
-
-         /* Check if a bitstring type, which in Chill is
-            different from a [power]set.  */
-         if (TYPE_STRING_FLAG (type))
-           stabstr_S ("@S;");
-       }
-      stabstr_C ('S');
-      dbxout_type (TYPE_DOMAIN (type), 0);
-      break;
-
     case ARRAY_TYPE:
       /* Make arrays of packed bits look like bitstrings for chill.  */
       if (TYPE_PACKED (type) && use_gnu_debug_info_extensions)
index 96351c4..74303c2 100644 (file)
@@ -3963,7 +3963,6 @@ static tree member_declared_type (tree);
 static const char *decl_start_label (tree);
 #endif
 static void gen_array_type_die (tree, dw_die_ref);
-static void gen_set_type_die (tree, dw_die_ref);
 #if 0
 static void gen_entry_point_die (tree, dw_die_ref);
 #endif
@@ -8031,7 +8030,6 @@ is_base_type (tree type)
     case CHAR_TYPE:
       return 1;
 
-    case SET_TYPE:
     case ARRAY_TYPE:
     case RECORD_TYPE:
     case UNION_TYPE:
@@ -10813,16 +10811,6 @@ gen_array_type_die (tree type, dw_die_ref context_die)
   add_type_attribute (array_die, element_type, 0, 0, context_die);
 }
 
-static void
-gen_set_type_die (tree type, dw_die_ref context_die)
-{
-  dw_die_ref type_die
-    = new_die (DW_TAG_set_type, scope_die_for (type, context_die), type);
-
-  equate_type_number_to_die (type, type_die);
-  add_type_attribute (type_die, TREE_TYPE (type), 0, 0, context_die);
-}
-
 #if 0
 static void
 gen_entry_point_die (tree decl, dw_die_ref context_die)
@@ -12091,11 +12079,6 @@ gen_type_die (tree type, dw_die_ref context_die)
       gen_ptr_to_mbr_type_die (type, context_die);
       break;
 
-    case SET_TYPE:
-      gen_type_die (TYPE_DOMAIN (type), context_die);
-      gen_set_type_die (type, context_die);
-      break;
-
     case FILE_TYPE:
       gen_type_die (TREE_TYPE (type), context_die);
       /* No way to represent these in Dwarf yet!  */
index d594671..1f4d140 100644 (file)
@@ -4371,7 +4371,6 @@ count_type_elements (tree type)
     case VOID_TYPE:
     case METHOD_TYPE:
     case FILE_TYPE:
-    case SET_TYPE:
     case FUNCTION_TYPE:
     case LANG_TYPE:
     default:
@@ -4389,10 +4388,6 @@ mostly_zeros_p (tree exp)
     {
       HOST_WIDE_INT nz_elts, nc_elts, elts;
 
-      /* If there are no ranges of true bits, it is all zero.  */
-      if (TREE_TYPE (exp) && TREE_CODE (TREE_TYPE (exp)) == SET_TYPE)
-       return CONSTRUCTOR_ELTS (exp) == NULL_TREE;
-
       categorize_ctor_elements (exp, &nz_elts, &nc_elts);
       elts = count_type_elements (TREE_TYPE (exp));
 
@@ -5011,184 +5006,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
                                        gen_rtvec_v (n_elts, vector))));
        break;
       }
-
-      /* Set constructor assignments.  */
-    case SET_TYPE:
-      {
-       tree elt = CONSTRUCTOR_ELTS (exp);
-       unsigned HOST_WIDE_INT nbytes = int_size_in_bytes (type), nbits;
-       tree domain = TYPE_DOMAIN (type);
-       tree domain_min, domain_max, bitlength;
-       
-       /* The default implementation strategy is to extract the
-          constant parts of the constructor, use that to initialize
-          the target, and then "or" in whatever non-constant ranges
-          we need in addition.
-
-          If a large set is all zero or all ones, it is probably
-          better to set it using memset.  Also, if a large set has
-          just a single range, it may also be better to first clear
-          all the first clear the set (using memset), and set the
-          bits we want.  */
-
-       /* Check for all zeros.  */
-       if (elt == NULL_TREE && size > 0)
-         {
-           if (!cleared)
-             clear_storage (target, GEN_INT (size));
-           return;
-         }
-       
-       domain_min = convert (sizetype, TYPE_MIN_VALUE (domain));
-       domain_max = convert (sizetype, TYPE_MAX_VALUE (domain));
-       bitlength = size_binop (PLUS_EXPR,
-                               size_diffop (domain_max, domain_min),
-                               ssize_int (1));
-       
-       nbits = tree_low_cst (bitlength, 1);
-
-        /* For "small" sets, or "medium-sized" (up to 32 bytes) sets
-          that are "complicated" (more than one range), initialize
-          (the constant parts) by copying from a constant.  */
-       if (GET_MODE (target) != BLKmode || nbits <= 2 * BITS_PER_WORD
-           || (nbytes <= 32 && TREE_CHAIN (elt) != NULL_TREE))
-         {
-           unsigned int set_word_size = TYPE_ALIGN (TREE_TYPE (exp));
-           enum machine_mode mode = mode_for_size (set_word_size, MODE_INT, 1);
-           char *bit_buffer = alloca (nbits);
-           HOST_WIDE_INT word = 0;
-           unsigned int bit_pos = 0;
-           unsigned int ibit = 0;
-           unsigned int offset = 0;  /* In bytes from beginning of set.  */
-           
-           elt = get_set_constructor_bits (exp, bit_buffer, nbits);
-           for (;;)
-             {
-               if (bit_buffer[ibit])
-                 {
-                   if (BYTES_BIG_ENDIAN)
-                     word |= (1 << (set_word_size - 1 - bit_pos));
-                   else
-                     word |= 1 << bit_pos;
-                 }
-               
-               bit_pos++;  ibit++;
-               if (bit_pos >= set_word_size || ibit == nbits)
-                 {
-                   if (word != 0 || ! cleared)
-                     {
-                       rtx datum = gen_int_mode (word, mode);
-                       rtx to_rtx;
-                       
-                       /* The assumption here is that it is safe to
-                          use XEXP if the set is multi-word, but not
-                          if it's single-word.  */
-                       if (MEM_P (target))
-                         to_rtx = adjust_address (target, mode, offset);
-                       else
-                         {
-                           gcc_assert (!offset);
-                           to_rtx = target;
-                         }
-                       emit_move_insn (to_rtx, datum);
-                     }
-                   
-                   if (ibit == nbits)
-                     break;
-                   word = 0;
-                   bit_pos = 0;
-                   offset += set_word_size / BITS_PER_UNIT;
-                 }
-             }
-         }
-       else if (!cleared)
-         /* Don't bother clearing storage if the set is all ones.  */
-         if (TREE_CHAIN (elt) != NULL_TREE
-             || (TREE_PURPOSE (elt) == NULL_TREE
-                 ? nbits != 1
-                 : ( ! host_integerp (TREE_VALUE (elt), 0)
-                     || ! host_integerp (TREE_PURPOSE (elt), 0)
-                     || (tree_low_cst (TREE_VALUE (elt), 0)
-                         - tree_low_cst (TREE_PURPOSE (elt), 0) + 1
-                         != (HOST_WIDE_INT) nbits))))
-           clear_storage (target, expr_size (exp));
-       
-       for (; elt != NULL_TREE; elt = TREE_CHAIN (elt))
-         {
-           /* Start of range of element or NULL.  */
-           tree startbit = TREE_PURPOSE (elt);
-           /* End of range of element, or element value.  */
-           tree endbit   = TREE_VALUE (elt);
-           HOST_WIDE_INT startb, endb;
-           rtx bitlength_rtx, startbit_rtx, endbit_rtx, targetx;
-           
-           bitlength_rtx = expand_expr (bitlength,
-                                        NULL_RTX, MEM, EXPAND_CONST_ADDRESS);
-           
-           /* Handle non-range tuple element like [ expr ].  */
-           if (startbit == NULL_TREE)
-             {
-               startbit = save_expr (endbit);
-               endbit = startbit;
-             }
-           
-           startbit = convert (sizetype, startbit);
-           endbit = convert (sizetype, endbit);
-           if (! integer_zerop (domain_min))
-             {
-               startbit = size_binop (MINUS_EXPR, startbit, domain_min);
-               endbit = size_binop (MINUS_EXPR, endbit, domain_min);
-             }
-           startbit_rtx = expand_expr (startbit, NULL_RTX, MEM,
-                                       EXPAND_CONST_ADDRESS);
-           endbit_rtx = expand_expr (endbit, NULL_RTX, MEM,
-                                     EXPAND_CONST_ADDRESS);
-           
-           if (REG_P (target))
-             {
-               targetx
-                 = assign_temp
-                 ((build_qualified_type (lang_hooks.types.type_for_mode
-                                         (GET_MODE (target), 0),
-                                         TYPE_QUAL_CONST)),
-                  0, 1, 1);
-               emit_move_insn (targetx, target);
-             }
-           
-           else
-             {
-               gcc_assert (MEM_P (target));
-               targetx = target;
-             }
-
-           /* Optimization:  If startbit and endbit are constants divisible
-              by BITS_PER_UNIT, call memset instead.  */
-           if (TREE_CODE (startbit) == INTEGER_CST
-               && TREE_CODE (endbit) == INTEGER_CST
-               && (startb = TREE_INT_CST_LOW (startbit)) % BITS_PER_UNIT == 0
-               && (endb = TREE_INT_CST_LOW (endbit) + 1) % BITS_PER_UNIT == 0)
-             {
-               emit_library_call (memset_libfunc, LCT_NORMAL,
-                                  VOIDmode, 3,
-                                  plus_constant (XEXP (targetx, 0),
-                                                 startb / BITS_PER_UNIT),
-                                  Pmode,
-                                  constm1_rtx, TYPE_MODE (integer_type_node),
-                                  GEN_INT ((endb - startb) / BITS_PER_UNIT),
-                                  TYPE_MODE (sizetype));
-             }
-           else
-             emit_library_call (setbits_libfunc, LCT_NORMAL,
-                                VOIDmode, 4, XEXP (targetx, 0),
-                                Pmode, bitlength_rtx, TYPE_MODE (sizetype),
-                                startbit_rtx, TYPE_MODE (sizetype),
-                                endbit_rtx, TYPE_MODE (sizetype));
-           
-           if (REG_P (target))
-             emit_move_insn (target, targetx);
-         }
-       break;
-      }
+      
     default:
       gcc_unreachable ();
     }
index caba377..8d8cbff 100644 (file)
@@ -537,7 +537,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
       if (TREE_CODE (node) == ENUMERAL_TYPE)
        print_node (file, "values", TYPE_VALUES (node), indent + 4);
-      else if (TREE_CODE (node) == ARRAY_TYPE || TREE_CODE (node) == SET_TYPE)
+      else if (TREE_CODE (node) == ARRAY_TYPE)
        print_node (file, "domain", TYPE_DOMAIN (node), indent + 4);
       else if (TREE_CODE (node) == VECTOR_TYPE)
        fprintf (file, " nunits %d", (int) TYPE_VECTOR_SUBPARTS (node));
index 6826678..ac7fb74 100644 (file)
@@ -1763,40 +1763,6 @@ layout_type (tree type)
       }
       break;
 
-    case SET_TYPE:  /* Used by Chill and Pascal.  */
-      {
-       unsigned int alignment;
-       HOST_WIDE_INT size_in_bits;
-       HOST_WIDE_INT rounded_size;
-
-       gcc_assert (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
-                   == INTEGER_CST);
-       gcc_assert (TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type)))
-                   == INTEGER_CST);
-
-#ifndef SET_WORD_SIZE
-#define SET_WORD_SIZE BITS_PER_WORD
-#endif
-       alignment = set_alignment ? set_alignment : SET_WORD_SIZE;
-       size_in_bits
-         = (tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0)
-            - tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0) + 1);
-       rounded_size
-         = ((size_in_bits + alignment - 1) / alignment) * alignment;
-
-       if (rounded_size > (int) alignment)
-         TYPE_MODE (type) = BLKmode;
-       else
-         TYPE_MODE (type) = mode_for_size (alignment, MODE_INT, 1);
-
-       TYPE_SIZE (type) = bitsize_int (rounded_size);
-       TYPE_SIZE_UNIT (type) = size_int (rounded_size / BITS_PER_UNIT);
-       TYPE_ALIGN (type) = alignment;
-       TYPE_USER_ALIGN (type) = 0;
-       TYPE_PRECISION (type) = size_in_bits;
-      }
-      break;
-
     case FILE_TYPE:
       /* The size may vary in different languages, so the language front end
         should fill in the size.  */
index 1ac5dda..ccbccde 100644 (file)
@@ -309,8 +309,7 @@ browse_tree (tree begin)
          break;
 
        case TB_DOMAIN:
-         if (head && (TREE_CODE (head) == ARRAY_TYPE
-                      || TREE_CODE (head) == SET_TYPE))
+         if (head && TREE_CODE (head) == ARRAY_TYPE)
            TB_SET_HEAD (TYPE_DOMAIN (head));
          else
            TB_WF;
index 12cfe1e..29740df 100644 (file)
@@ -323,7 +323,6 @@ remap_type (tree type, inline_data *id)
       break;
 
     case FILE_TYPE:
-    case SET_TYPE:
     case OFFSET_TYPE:
     default:
       /* Shouldn't have been thought variable sized.  */
index 8f36235..6c1eed8 100644 (file)
@@ -461,10 +461,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
        break;
       }
 
-    case SET_TYPE:
-      NIY;
-      break;
-
     case RECORD_TYPE:
     case UNION_TYPE:
     case QUAL_UNION_TYPE:
index 0b41c71..c2fb1b4 100644 (file)
@@ -1888,7 +1888,6 @@ type_contains_placeholder_1 (tree type)
              || CONTAINS_PLACEHOLDER_P (TYPE_MAX_VALUE (type)));
 
     case ARRAY_TYPE:
-    case SET_TYPE:
     case VECTOR_TYPE:
       /* We're already checked the component type (TREE_TYPE), so just check
         the index type.  */
@@ -3475,7 +3474,6 @@ type_hash_eq (const void *va, const void *vb)
                                          TYPE_ARG_TYPES (b->type)))));
 
     case ARRAY_TYPE:
-    case SET_TYPE:
       return TYPE_DOMAIN (a->type) == TYPE_DOMAIN (b->type);
 
     case RECORD_TYPE:
@@ -4984,7 +4982,6 @@ variably_modified_type_p (tree type, tree fn)
     case POINTER_TYPE:
     case REFERENCE_TYPE:
     case ARRAY_TYPE:
-    case SET_TYPE:
     case VECTOR_TYPE:
       if (variably_modified_type_p (TREE_TYPE (type), fn))
        return true;
@@ -5871,10 +5868,6 @@ initializer_zerop (tree init)
       if (elt == NULL_TREE)
        return true;
 
-      /* A set is empty only if it has no elements.  */
-      if (TREE_CODE (TREE_TYPE (init)) == SET_TYPE)
-       return false;
-
       for (; elt ; elt = TREE_CHAIN (elt))
        if (! initializer_zerop (TREE_VALUE (elt)))
          return false;
index bf38d24..b09f066 100644 (file)
@@ -200,12 +200,6 @@ DEFTREECODE (FILE_TYPE, "file_type", tcc_type, 0)
 /* Array types in C or Pascal */
 DEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
 
-/* Types of sets for Pascal.  Special fields are the same as
-   in an array type.  The target type is always a boolean type.
-   Used for both bitstrings and powersets in Chill;
-   TYPE_STRING_FLAG indicates a bitstring.  */
-DEFTREECODE (SET_TYPE, "set_type", tcc_type, 0)
-
 /* Struct in C, or record in Pascal.  */
 /* Special fields:
    TYPE_FIELDS  chain of FIELD_DECLs for the fields of the struct,
@@ -409,7 +403,6 @@ DEFTREECODE (FILTER_EXPR, "filter_expr", tcc_expression, 0)
 
 /* Constructor: return an aggregate value made from specified components.
    In C, this is used only for structure and array initializers.
-   Also used for SET_TYPE in Chill (and potentially Pascal).
    The operand is a list of component values made out of a chain of
    TREE_LIST nodes.
 
@@ -421,12 +414,7 @@ DEFTREECODE (FILTER_EXPR, "filter_expr", tcc_expression, 0)
    value in a SAVE_EXPR if you want to evaluate side effects only once.)
 
    For RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE:
-   The TREE_PURPOSE of each node is a FIELD_DECL.
-
-   For SET_TYPE:
-   The TREE_VALUE specifies a value (index) in the set that is true.
-   If TREE_PURPOSE is non-NULL, it specifies the lower limit of a
-   range of true values.  Elements not listed are false (not in the set).  */
+   The TREE_PURPOSE of each node is a FIELD_DECL.  */
 DEFTREECODE (CONSTRUCTOR, "constructor", tcc_expression, 1)
 
 /* The expression types are mostly straightforward, with the fourth argument
index 7f42aa5..457d72c 100644 (file)
@@ -648,9 +648,6 @@ extern void tree_operand_check_failed (int, enum tree_code,
 #define FUNC_OR_METHOD_CHECK(T)        TREE_CHECK2 (T, FUNCTION_TYPE, METHOD_TYPE)
 #define PTR_OR_REF_CHECK(T)    TREE_CHECK2 (T, POINTER_TYPE, REFERENCE_TYPE)
 
-#define SET_OR_ARRAY_CHECK(T) \
-  TREE_CHECK2 (T, ARRAY_TYPE, SET_TYPE)
-
 #define RECORD_OR_UNION_CHECK(T)       \
   TREE_CHECK3 (T, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE)
 #define NOT_RECORD_OR_UNION_CHECK(T) \
@@ -773,8 +770,7 @@ extern void tree_operand_check_failed (int, enum tree_code,
 
 #define AGGREGATE_TYPE_P(TYPE) \
   (TREE_CODE (TYPE) == ARRAY_TYPE || TREE_CODE (TYPE) == RECORD_TYPE \
-   || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE \
-   || TREE_CODE (TYPE) == SET_TYPE)
+   || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE)
 
 /* Nonzero if TYPE represents a pointer or reference type.
    (It should be renamed to INDIRECT_TYPE_P.)  */
@@ -1476,7 +1472,7 @@ struct tree_block GTY(())
 #define TYPE_SIZE_UNIT(NODE) (TYPE_CHECK (NODE)->type.size_unit)
 #define TYPE_MODE(NODE) (TYPE_CHECK (NODE)->type.mode)
 #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type.values)
-#define TYPE_DOMAIN(NODE) (SET_OR_ARRAY_CHECK (NODE)->type.values)
+#define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->type.values)
 #define TYPE_FIELDS(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.values)
 #define TYPE_CACHED_VALUES(NODE) (TYPE_CHECK(NODE)->type.values)
 #define TYPE_ORIG_SIZE_TYPE(NODE)                      \
index 067a135..5f36214 100644 (file)
@@ -39,7 +39,7 @@ enum type_class
   real_type_class, complex_type_class,
   function_type_class, method_type_class,
   record_type_class, union_type_class,
-  array_type_class, string_type_class, set_type_class, file_type_class,
+  array_type_class, string_type_class, file_type_class,
   lang_type_class
 };
 
index f80ce93..078959f 100644 (file)
@@ -2287,28 +2287,17 @@ const_hash_1 (const tree exp)
              + const_hash_1 (TREE_IMAGPART (exp)));
 
     case CONSTRUCTOR:
-      if (TREE_CODE (TREE_TYPE (exp)) == SET_TYPE)
-       {
-         char *tmp;
-
-         len = int_size_in_bytes (TREE_TYPE (exp));
-         tmp = alloca (len);
-         get_set_constructor_bytes (exp, (unsigned char *) tmp, len);
-         p = tmp;
-         break;
-       }
-      else
-       {
-         tree link;
-
-         hi = 5 + int_size_in_bytes (TREE_TYPE (exp));
-
-         for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link))
-           if (TREE_VALUE (link))
-             hi = hi * 603 + const_hash_1 (TREE_VALUE (link));
-
-         return hi;
-       }
+      {
+       tree link;
+       
+       hi = 5 + int_size_in_bytes (TREE_TYPE (exp));
+       
+       for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link))
+         if (TREE_VALUE (link))
+           hi = hi * 603 + const_hash_1 (TREE_VALUE (link));
+       
+       return hi;
+      }
 
     case ADDR_EXPR:
     case FDESC_EXPR:
@@ -2407,72 +2396,53 @@ compare_constant (const tree t1, const tree t2)
              && compare_constant (TREE_IMAGPART (t1), TREE_IMAGPART (t2)));
 
     case CONSTRUCTOR:
-      typecode = TREE_CODE (TREE_TYPE (t1));
-      if (typecode != TREE_CODE (TREE_TYPE (t2)))
-       return 0;
-
-      if (typecode == SET_TYPE)
-       {
-         int len = int_size_in_bytes (TREE_TYPE (t2));
-         unsigned char *tmp1, *tmp2;
-
-         if (int_size_in_bytes (TREE_TYPE (t1)) != len)
-           return 0;
-
-         tmp1 = alloca (len);
-         tmp2 = alloca (len);
-
-         if (get_set_constructor_bytes (t1, tmp1, len) != NULL_TREE)
-           return 0;
-         if (get_set_constructor_bytes (t2, tmp2, len) != NULL_TREE)
-           return 0;
-
-         return memcmp (tmp1, tmp2, len) == 0;
-       }
-      else
-       {
-         tree l1, l2;
-
-         if (typecode == ARRAY_TYPE)
-           {
-             HOST_WIDE_INT size_1 = int_size_in_bytes (TREE_TYPE (t1));
-             /* For arrays, check that the sizes all match.  */
-             if (TYPE_MODE (TREE_TYPE (t1)) != TYPE_MODE (TREE_TYPE (t2))
-                 || size_1 == -1
-                 || size_1 != int_size_in_bytes (TREE_TYPE (t2)))
-               return 0;
-           }
-         else
-           {
-             /* For record and union constructors, require exact type
-                 equality.  */
-             if (TREE_TYPE (t1) != TREE_TYPE (t2))
-               return 0;
-           }
+      {
+       tree l1, l2;
+       
+       typecode = TREE_CODE (TREE_TYPE (t1));
+       if (typecode != TREE_CODE (TREE_TYPE (t2)))
+         return 0;
 
-         for (l1 = CONSTRUCTOR_ELTS (t1), l2 = CONSTRUCTOR_ELTS (t2);
-              l1 && l2;
-              l1 = TREE_CHAIN (l1), l2 = TREE_CHAIN (l2))
-           {
-             /* Check that each value is the same...  */
-             if (! compare_constant (TREE_VALUE (l1), TREE_VALUE (l2)))
-               return 0;
-             /* ... and that they apply to the same fields!  */
-             if (typecode == ARRAY_TYPE)
-               {
-                 if (! compare_constant (TREE_PURPOSE (l1),
-                                         TREE_PURPOSE (l2)))
-                   return 0;
-               }
-             else
-               {
-                 if (TREE_PURPOSE (l1) != TREE_PURPOSE (l2))
-                   return 0;
-               }
-           }
+       if (typecode == ARRAY_TYPE)
+         {
+           HOST_WIDE_INT size_1 = int_size_in_bytes (TREE_TYPE (t1));
+           /* For arrays, check that the sizes all match.  */
+           if (TYPE_MODE (TREE_TYPE (t1)) != TYPE_MODE (TREE_TYPE (t2))
+               || size_1 == -1
+               || size_1 != int_size_in_bytes (TREE_TYPE (t2)))
+             return 0;
+         }
+       else
+         {
+           /* For record and union constructors, require exact type
+               equality.  */
+           if (TREE_TYPE (t1) != TREE_TYPE (t2))
+             return 0;
+         }
 
-         return l1 == NULL_TREE && l2 == NULL_TREE;
-       }
+       for (l1 = CONSTRUCTOR_ELTS (t1), l2 = CONSTRUCTOR_ELTS (t2);
+            l1 && l2;
+            l1 = TREE_CHAIN (l1), l2 = TREE_CHAIN (l2))
+         {
+           /* Check that each value is the same...  */
+           if (! compare_constant (TREE_VALUE (l1), TREE_VALUE (l2)))
+             return 0;
+           /* ... and that they apply to the same fields!  */
+           if (typecode == ARRAY_TYPE)
+             {
+               if (! compare_constant (TREE_PURPOSE (l1),
+                                       TREE_PURPOSE (l2)))
+                 return 0;
+             }
+           else
+             {
+               if (TREE_PURPOSE (l1) != TREE_PURPOSE (l2))
+                 return 0;
+             }
+         }
+       
+       return l1 == NULL_TREE && l2 == NULL_TREE;
+      }
 
     case ADDR_EXPR:
     case FDESC_EXPR:
@@ -2562,9 +2532,6 @@ copy_constant (tree exp)
        CONSTRUCTOR_ELTS (copy) = list;
        for (tail = list; tail; tail = TREE_CHAIN (tail))
          TREE_VALUE (tail) = copy_constant (TREE_VALUE (tail));
-       if (TREE_CODE (TREE_TYPE (exp)) == SET_TYPE)
-         for (tail = list; tail; tail = TREE_CHAIN (tail))
-           TREE_PURPOSE (tail) = copy_constant (TREE_PURPOSE (tail));
 
        return copy;
       }
@@ -3827,22 +3794,6 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
        abort ();
       return;
 
-    case SET_TYPE:
-      if (TREE_CODE (exp) == INTEGER_CST)
-       assemble_integer (expand_expr (exp, NULL_RTX,
-                                      VOIDmode, EXPAND_INITIALIZER),
-                         thissize, align, 1);
-      else if (TREE_CODE (exp) == CONSTRUCTOR)
-       {
-         unsigned char *buffer = alloca (thissize);
-         if (get_set_constructor_bytes (exp, buffer, thissize))
-           abort ();
-         assemble_string ((char *) buffer, thissize);
-       }
-      else
-       error ("unknown set constructor type");
-      return;
-
     case ERROR_MARK:
       return;