comparison gcc/tree.c @ 1:caeb520cebed

patch for CbC
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 17:43:54 +0900
parents a06113de4d67
children 9de9dad105d4
comparison
equal deleted inserted replaced
0:a06113de4d67 1:caeb520cebed
87 #include "all-tree.def" 87 #include "all-tree.def"
88 }; 88 };
89 89
90 #undef DEFTREECODE 90 #undef DEFTREECODE
91 #undef END_OF_BASE_TREE_CODES 91 #undef END_OF_BASE_TREE_CODES
92
93 #ifndef noCbC
94 #include "cbc-tree.h"
95 #endif
92 96
93 /* Each tree code class has an associated string representation. 97 /* Each tree code class has an associated string representation.
94 These must correspond to the tree_code_class entries. */ 98 These must correspond to the tree_code_class entries. */
95 99
96 const char *const tree_code_class_strings[] = 100 const char *const tree_code_class_strings[] =
5806 type = TREE_TYPE (type); 5810 type = TREE_TYPE (type);
5807 5811
5808 return type; 5812 return type;
5809 } 5813 }
5810 5814
5815 #ifndef noCbC
5816 tree
5817 build_code_segment_type (tree value_type, tree arg_types)
5818 {
5819 tree t;
5820 hashval_t hashcode = 0;
5821
5822 gcc_assert (TREE_CODE (value_type) == VOID_TYPE);
5823
5824 /* Make a node of the sort we want. */
5825 t = make_node (FUNCTION_TYPE);
5826 TREE_TYPE (t) = value_type;
5827 TYPE_ARG_TYPES (t) = arg_types;
5828
5829 CbC_IS_CODE_SEGMENT (t) = 1;
5830
5831 if (!COMPLETE_TYPE_P (t))
5832 layout_type (t);
5833 return t;
5834 }
5835 #endif
5836
5811 /* Computes the canonical argument types from the argument type list 5837 /* Computes the canonical argument types from the argument type list
5812 ARGTYPES. 5838 ARGTYPES.
5813 5839
5814 Upon return, *ANY_STRUCTURAL_P will be true iff either it was true 5840 Upon return, *ANY_STRUCTURAL_P will be true iff either it was true
5815 on entry to this function, or if any of the ARGTYPES are 5841 on entry to this function, or if any of the ARGTYPES are