You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "errors.h"
#include "tree.h"
#include "tree-inline.h"
#include "diagnostic.h"
};
#define DEFTBCODE(code, str, help) { help, str, sizeof(str) - 1, code },
-#ifdef HOST_EBCDIC
-static struct tb_command tb_commands[] =
-#else
static const struct tb_command tb_commands[] =
-#endif
{
#include "tree-browser.def"
};
};
#define DEFTREECODE(SYM, STRING, TYPE, NARGS) { SYM, STRING, sizeof (STRING) - 1 },
-#ifdef HOST_EBCDIC
-static struct tb_tree_code tb_tree_codes[] =
-#else
static const struct tb_tree_code tb_tree_codes[] =
-#endif
{
#include "tree.def"
};
TB_WF;
break;
- case TB_ARG_TYPE_AS_WRITTEN:
- if (head && TREE_CODE (head) == PARM_DECL)
- TB_SET_HEAD (DECL_ARG_TYPE_AS_WRITTEN (head));
- else
- TB_WF;
- break;
-
case TB_ARG_TYPE:
if (head && TREE_CODE (head) == PARM_DECL)
TB_SET_HEAD (DECL_ARG_TYPE (head));
node = *tp;
/* 'node' is the parent of 'TREE_OPERAND (node, *)'. */
- if (EXPRESSION_CLASS_P (node))
+ if (EXPR_P (node))
{
-
-#define STORE_CHILD(N) do { \
- tree op = TREE_OPERAND (node, N); \
- slot = htab_find_slot (TB_up_ht, op, INSERT); \
- *slot = (void *) node; \
-} while (0)
-
- switch (TREE_CODE_LENGTH (TREE_CODE (node)))
+ int n = TREE_OPERAND_LENGTH (node);
+ int i;
+ for (i = 0; i < n; i++)
{
- case 4:
- STORE_CHILD (0);
- STORE_CHILD (1);
- STORE_CHILD (2);
- STORE_CHILD (3);
- break;
-
- case 3:
- STORE_CHILD (0);
- STORE_CHILD (1);
- STORE_CHILD (2);
- break;
-
- case 2:
- STORE_CHILD (0);
- STORE_CHILD (1);
- break;
-
- case 1:
- STORE_CHILD (0);
- break;
-
- case 0:
- default:
- /* No children: nothing to do. */
- break;
+ tree op = TREE_OPERAND (node, i);
+ slot = htab_find_slot (TB_up_ht, op, INSERT);
+ *slot = (void *) node;
}
-#undef STORE_CHILD
}
/* Never stop walk_tree. */
if (p1 == NULL || p2 == NULL)
return 0;
- if (EXPRESSION_CLASS_P (parent))
+ if (EXPR_P (parent))
{
-
-#define TEST_CHILD(N) do { \
- if (node == TREE_OPERAND (parent, N)) \
- return 1; \
-} while (0)
-
- switch (TREE_CODE_LENGTH (TREE_CODE (parent)))
- {
- case 4:
- TEST_CHILD (0);
- TEST_CHILD (1);
- TEST_CHILD (2);
- TEST_CHILD (3);
- break;
-
- case 3:
- TEST_CHILD (0);
- TEST_CHILD (1);
- TEST_CHILD (2);
- break;
-
- case 2:
- TEST_CHILD (0);
- TEST_CHILD (1);
- break;
-
- case 1:
- TEST_CHILD (0);
- break;
-
- case 0:
- default:
- /* No children: nothing to do. */
- break;
- }
-#undef TEST_CHILD
+ int n = TREE_OPERAND_LENGTH (parent);
+ int i;
+ for (i = 0; i < n; i++)
+ if (node == TREE_OPERAND (parent, i))
+ return 1;
}
-
return 0;
}