void
cp_common_init_ts (void)
{
- MARK_TS_DECL_NON_COMMON (USING_DECL);
- MARK_TS_DECL_COMMON (TEMPLATE_DECL);
- MARK_TS_DECL_COMMON (WILDCARD_DECL);
+ /* With type. */
+ MARK_TS_TYPED (PTRMEM_CST);
+ MARK_TS_TYPED (LAMBDA_EXPR);
+ MARK_TS_TYPED (TYPE_ARGUMENT_PACK);
- MARK_TS_COMMON (TEMPLATE_TEMPLATE_PARM);
- MARK_TS_COMMON (TEMPLATE_TYPE_PARM);
- MARK_TS_COMMON (TEMPLATE_PARM_INDEX);
+ /* Random new trees. */
+ MARK_TS_COMMON (BASELINK);
+ MARK_TS_COMMON (DECLTYPE_TYPE);
MARK_TS_COMMON (OVERLOAD);
+ MARK_TS_COMMON (TEMPLATE_PARM_INDEX);
MARK_TS_COMMON (TYPENAME_TYPE);
MARK_TS_COMMON (TYPEOF_TYPE);
- MARK_TS_COMMON (UNDERLYING_TYPE);
- MARK_TS_COMMON (BASELINK);
- MARK_TS_COMMON (TYPE_PACK_EXPANSION);
- MARK_TS_COMMON (TYPE_ARGUMENT_PACK);
- MARK_TS_COMMON (DECLTYPE_TYPE);
- MARK_TS_COMMON (BOUND_TEMPLATE_TEMPLATE_PARM);
MARK_TS_COMMON (UNBOUND_CLASS_TEMPLATE);
+ MARK_TS_COMMON (UNDERLYING_TYPE);
- MARK_TS_TYPED (SWITCH_STMT);
- MARK_TS_TYPED (IF_STMT);
- MARK_TS_TYPED (FOR_STMT);
- MARK_TS_TYPED (RANGE_FOR_STMT);
- MARK_TS_TYPED (EH_SPEC_BLOCK);
- MARK_TS_TYPED (CLEANUP_STMT);
- MARK_TS_TYPED (SCOPE_REF);
- MARK_TS_TYPED (TRY_BLOCK);
- MARK_TS_TYPED (HANDLER);
- MARK_TS_TYPED (TYPE_ARGUMENT_PACK);
- MARK_TS_TYPED (NOEXCEPT_EXPR);
- MARK_TS_TYPED (WHILE_STMT);
- MARK_TS_TYPED (BREAK_STMT);
- MARK_TS_TYPED (DO_STMT);
- MARK_TS_TYPED (CONTINUE_STMT);
- MARK_TS_TYPED (PTRMEM_CST);
- MARK_TS_TYPED (USING_STMT);
- MARK_TS_TYPED (OMP_DEPOBJ);
+ /* New decls. */
+ MARK_TS_DECL_COMMON (TEMPLATE_DECL);
+ MARK_TS_DECL_COMMON (WILDCARD_DECL);
+
+ MARK_TS_DECL_NON_COMMON (USING_DECL);
+ /* New Types. */
+ MARK_TS_TYPE_NON_COMMON (BOUND_TEMPLATE_TEMPLATE_PARM);
+ MARK_TS_TYPE_NON_COMMON (TEMPLATE_TEMPLATE_PARM);
+ MARK_TS_TYPE_NON_COMMON (TEMPLATE_TYPE_PARM);
+ MARK_TS_TYPE_NON_COMMON (TYPE_ARGUMENT_PACK);
+ MARK_TS_TYPE_NON_COMMON (TYPE_PACK_EXPANSION);
+
+ /* Statements. */
+ MARK_TS_EXP (BREAK_STMT);
+ MARK_TS_EXP (CLEANUP_STMT);
+ MARK_TS_EXP (CONTINUE_STMT);
+ MARK_TS_EXP (DO_STMT);
+ MARK_TS_EXP (EH_SPEC_BLOCK);
+ MARK_TS_EXP (FOR_STMT);
+ MARK_TS_EXP (HANDLER);
+ MARK_TS_EXP (IF_STMT);
+ MARK_TS_EXP (OMP_DEPOBJ);
+ MARK_TS_EXP (RANGE_FOR_STMT);
+ MARK_TS_EXP (SWITCH_STMT);
+ MARK_TS_EXP (TRY_BLOCK);
+ MARK_TS_EXP (USING_STMT);
+ MARK_TS_EXP (WHILE_STMT);
+
+ /* Random expressions. */
+ MARK_TS_EXP (ADDRESSOF_EXPR);
MARK_TS_EXP (AGGR_INIT_EXPR);
+ MARK_TS_EXP (ALIGNOF_EXPR);
+ MARK_TS_EXP (ARROW_EXPR);
+ MARK_TS_EXP (AT_ENCODE_EXPR);
+ MARK_TS_EXP (CAST_EXPR);
+ MARK_TS_EXP (CONST_CAST_EXPR);
MARK_TS_EXP (CTOR_INITIALIZER);
- MARK_TS_EXP (EXPR_STMT);
- MARK_TS_EXP (TAG_DEFN);
+ MARK_TS_EXP (DELETE_EXPR);
+ MARK_TS_EXP (DOTSTAR_EXPR);
+ MARK_TS_EXP (DYNAMIC_CAST_EXPR);
MARK_TS_EXP (EMPTY_CLASS_EXPR);
+ MARK_TS_EXP (EXPR_STMT);
+ MARK_TS_EXP (IMPLICIT_CONV_EXPR);
+ MARK_TS_EXP (MEMBER_REF);
MARK_TS_EXP (MODOP_EXPR);
- MARK_TS_EXP (THROW_EXPR);
- MARK_TS_EXP (CAST_EXPR);
- MARK_TS_EXP (TYPE_EXPR);
+ MARK_TS_EXP (MUST_NOT_THROW_EXPR);
+ MARK_TS_EXP (NEW_EXPR);
+ MARK_TS_EXP (NOEXCEPT_EXPR);
+ MARK_TS_EXP (NON_DEPENDENT_EXPR);
+ MARK_TS_EXP (OFFSETOF_EXPR);
+ MARK_TS_EXP (OFFSET_REF);
+ MARK_TS_EXP (PSEUDO_DTOR_EXPR);
MARK_TS_EXP (REINTERPRET_CAST_EXPR);
- MARK_TS_EXP (CONST_CAST_EXPR);
+ MARK_TS_EXP (SCOPE_REF);
MARK_TS_EXP (STATIC_CAST_EXPR);
- MARK_TS_EXP (DYNAMIC_CAST_EXPR);
- MARK_TS_EXP (IMPLICIT_CONV_EXPR);
+ MARK_TS_EXP (STMT_EXPR);
+ MARK_TS_EXP (TAG_DEFN);
MARK_TS_EXP (TEMPLATE_ID_EXPR);
- MARK_TS_EXP (ARROW_EXPR);
- MARK_TS_EXP (UNARY_PLUS_EXPR);
+ MARK_TS_EXP (THROW_EXPR);
MARK_TS_EXP (TRAIT_EXPR);
-
- MARK_TS_EXP (NON_DEPENDENT_EXPR);
- MARK_TS_EXP (NEW_EXPR);
- MARK_TS_EXP (VEC_NEW_EXPR);
- MARK_TS_EXP (MEMBER_REF);
- MARK_TS_EXP (DOTSTAR_EXPR);
- MARK_TS_EXP (DELETE_EXPR);
- MARK_TS_EXP (VEC_DELETE_EXPR);
- MARK_TS_EXP (PSEUDO_DTOR_EXPR);
MARK_TS_EXP (TYPEID_EXPR);
- MARK_TS_EXP (MUST_NOT_THROW_EXPR);
- MARK_TS_EXP (STMT_EXPR);
- MARK_TS_EXP (OFFSET_REF);
- MARK_TS_EXP (OFFSETOF_EXPR);
- MARK_TS_EXP (ADDRESSOF_EXPR);
+ MARK_TS_EXP (TYPE_EXPR);
+ MARK_TS_EXP (UNARY_PLUS_EXPR);
+ MARK_TS_EXP (VEC_DELETE_EXPR);
MARK_TS_EXP (VEC_INIT_EXPR);
- MARK_TS_EXP (LAMBDA_EXPR);
-
- MARK_TS_EXP (ALIGNOF_EXPR);
- MARK_TS_EXP (AT_ENCODE_EXPR);
+ MARK_TS_EXP (VEC_NEW_EXPR);
- MARK_TS_EXP (NONTYPE_ARGUMENT_PACK);
+ /* Fold expressions. */
+ MARK_TS_EXP (BINARY_LEFT_FOLD_EXPR);
+ MARK_TS_EXP (BINARY_RIGHT_FOLD_EXPR);
MARK_TS_EXP (EXPR_PACK_EXPANSION);
+ MARK_TS_EXP (NONTYPE_ARGUMENT_PACK);
MARK_TS_EXP (UNARY_LEFT_FOLD_EXPR);
MARK_TS_EXP (UNARY_RIGHT_FOLD_EXPR);
- MARK_TS_EXP (BINARY_LEFT_FOLD_EXPR);
- MARK_TS_EXP (BINARY_RIGHT_FOLD_EXPR);
- MARK_TS_EXP (REQUIRES_EXPR);
- MARK_TS_EXP (SIMPLE_REQ);
- MARK_TS_EXP (TYPE_REQ);
- MARK_TS_EXP (COMPOUND_REQ);
- MARK_TS_EXP (NESTED_REQ);
- MARK_TS_EXP (PRED_CONSTR);
+ /* Constraints. */
MARK_TS_EXP (CHECK_CONSTR);
- MARK_TS_EXP (EXPR_CONSTR);
- MARK_TS_EXP (TYPE_CONSTR);
- MARK_TS_EXP (ICONV_CONSTR);
+ MARK_TS_EXP (COMPOUND_REQ);
+ MARK_TS_EXP (CONJ_CONSTR);
MARK_TS_EXP (DEDUCT_CONSTR);
+ MARK_TS_EXP (DISJ_CONSTR);
MARK_TS_EXP (EXCEPT_CONSTR);
+ MARK_TS_EXP (EXPR_CONSTR);
+ MARK_TS_EXP (ICONV_CONSTR);
+ MARK_TS_EXP (NESTED_REQ);
MARK_TS_EXP (PARM_CONSTR);
- MARK_TS_EXP (CONJ_CONSTR);
- MARK_TS_EXP (DISJ_CONSTR);
+ MARK_TS_EXP (PRED_CONSTR);
+ MARK_TS_EXP (REQUIRES_EXPR);
+ MARK_TS_EXP (SIMPLE_REQ);
+ MARK_TS_EXP (TYPE_CONSTR);
+ MARK_TS_EXP (TYPE_REQ);
c_common_init_ts ();
}
switch (TREE_CODE_CLASS (code))
{
case tcc_declaration:
- {
- switch (code)
- {
- case FIELD_DECL:
- return TS_FIELD_DECL;
- case PARM_DECL:
- return TS_PARM_DECL;
- case VAR_DECL:
- return TS_VAR_DECL;
- case LABEL_DECL:
- return TS_LABEL_DECL;
- case RESULT_DECL:
- return TS_RESULT_DECL;
- case DEBUG_EXPR_DECL:
- return TS_DECL_WRTL;
- case CONST_DECL:
- return TS_CONST_DECL;
- case TYPE_DECL:
- return TS_TYPE_DECL;
- case FUNCTION_DECL:
- return TS_FUNCTION_DECL;
- case TRANSLATION_UNIT_DECL:
- return TS_TRANSLATION_UNIT_DECL;
- default:
- return TS_DECL_NON_COMMON;
- }
- }
- case tcc_type:
- return TS_TYPE_NON_COMMON;
- case tcc_reference:
- case tcc_comparison:
- case tcc_unary:
+ switch (code)
+ {
+ case CONST_DECL: return TS_CONST_DECL;
+ case DEBUG_EXPR_DECL: return TS_DECL_WRTL;
+ case FIELD_DECL: return TS_FIELD_DECL;
+ case FUNCTION_DECL: return TS_FUNCTION_DECL;
+ case LABEL_DECL: return TS_LABEL_DECL;
+ case PARM_DECL: return TS_PARM_DECL;
+ case RESULT_DECL: return TS_RESULT_DECL;
+ case TRANSLATION_UNIT_DECL: return TS_TRANSLATION_UNIT_DECL;
+ case TYPE_DECL: return TS_TYPE_DECL;
+ case VAR_DECL: return TS_VAR_DECL;
+ default: return TS_DECL_NON_COMMON;
+ }
+
+ case tcc_type: return TS_TYPE_NON_COMMON;
+
case tcc_binary:
+ case tcc_comparison:
case tcc_expression:
+ case tcc_reference:
case tcc_statement:
- case tcc_vl_exp:
- return TS_EXP;
+ case tcc_unary:
+ case tcc_vl_exp: return TS_EXP;
+
default: /* tcc_constant and tcc_exceptional */
break;
}
+
switch (code)
{
/* tcc_constant cases. */
- case VOID_CST: return TS_TYPED;
+ case COMPLEX_CST: return TS_COMPLEX;
+ case FIXED_CST: return TS_FIXED_CST;
case INTEGER_CST: return TS_INT_CST;
case POLY_INT_CST: return TS_POLY_INT_CST;
case REAL_CST: return TS_REAL_CST;
- case FIXED_CST: return TS_FIXED_CST;
- case COMPLEX_CST: return TS_COMPLEX;
- case VECTOR_CST: return TS_VECTOR;
case STRING_CST: return TS_STRING;
+ case VECTOR_CST: return TS_VECTOR;
+ case VOID_CST: return TS_TYPED;
+
/* tcc_exceptional cases. */
- case ERROR_MARK: return TS_COMMON;
- case IDENTIFIER_NODE: return TS_IDENTIFIER;
- case TREE_LIST: return TS_LIST;
- case TREE_VEC: return TS_VEC;
- case SSA_NAME: return TS_SSA_NAME;
- case PLACEHOLDER_EXPR: return TS_COMMON;
- case STATEMENT_LIST: return TS_STATEMENT_LIST;
case BLOCK: return TS_BLOCK;
case CONSTRUCTOR: return TS_CONSTRUCTOR;
- case TREE_BINFO: return TS_BINFO;
+ case ERROR_MARK: return TS_COMMON;
+ case IDENTIFIER_NODE: return TS_IDENTIFIER;
case OMP_CLAUSE: return TS_OMP_CLAUSE;
case OPTIMIZATION_NODE: return TS_OPTIMIZATION;
+ case PLACEHOLDER_EXPR: return TS_COMMON;
+ case SSA_NAME: return TS_SSA_NAME;
+ case STATEMENT_LIST: return TS_STATEMENT_LIST;
case TARGET_OPTION_NODE: return TS_TARGET_OPTION;
+ case TREE_BINFO: return TS_BINFO;
+ case TREE_LIST: return TS_LIST;
+ case TREE_VEC: return TS_VEC;
default:
gcc_unreachable ();