summaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.h
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-21 22:01:24 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-21 22:01:24 +0000
commitffde65b31066f17eef243be882bb89a6e19370aa (patch)
treeea876d041c0a63eefccdac5416a8678e75da4cfc /gcc/objc/objc-act.h
parenta8c7acc4db08ce7c8ac3ddcb943f9219e2893792 (diff)
downloadgcc-ffde65b31066f17eef243be882bb89a6e19370aa.tar.gz
[.]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net> {{merged with trunk -i.e. GCC5.0 in stage4- using svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk but should probably have used svn merge -r209216:219879 ^/trunk we don't use svnmerge.py anymore since our svn is version 1.8.10 }} VERY UNSTABLE 2015-01-20 Basile Starynkevitch <basile@starynkevitch.net> Move previous topdir ChangeLog.MELT to ChangeLog.MELT.2008-2014 [contrib/] 2015-01-21 Basile Starynkevitch <basile@starynkevitch.net> * MELT-Plugin-Makefile: Able to make upgrade-melt as a plugin. Works for GCC 5.0. Remove GCC 4.7 old stuff. Move previous contrib/ChangeLog.MELT to ChangeLog.MELT.2008-2014 [gcc/] 2015-01-21 Basile Starynkevitch <basile@starynkevitch.net> {{merged with trunk -i.e. GCC5.0 in stage4- using svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk but should probably have used svn merge -r209216:219879 ^/trunk **@@@ UNSTABLE since libmelt-ana-gimple.melt not compiling, but translator painfully bootstrapping!!@@@@ }} * toplev.c: Merged manually by keeping MELT extra stuff. * toplev.h: Likewise. * gengtype.c: Add "melt-runtime.h" in list, but merged with trunk. * melt-runtime.h (MELT_VERSION_STRING): Bump to "1.2-pre-merged". (meltgc_walk_gimple_seq): Remove. (gt_ggc_mx_gimple_statement_d): Same for GCC 4.9 & 5.0 * melt-runtime.cc: Update copyright year. (ggc_alloc_cleared_melt_valuevector_st, melt_resize_scangcvect): Call ggc_internal_cleared_alloc. (melt_val2passflag): Skip TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_verify_rtl_sharing for GCC 5.0. (meltgc_walkstmt_cb, meltgc_walktree_cb) (melt_tree_walk_frame_size, meltgc_walk_gimple_seq): Remove. (melt_gt_ggc_mx_gimple_seq_d): Call gt_ggc_mx_gimple_statement_base. * melt-build-script.tpl: Update copyright year. Don't symlink meltrunsup.h anymore. * melt-build-script.sh: Regenerate. * melt/warmelt-base.melt: Update copyright year. (valdesc_object, valdesc_mapobjects, valdesc_mapstrings) (valdesc_multiple, valdesc_closure, valdesc_routine, valdesc_hook) (valdesc_bucketlongs, valdesc_jsonobject, valdesc_string) (valdesc_strbuf, valdesc_pair, valdesc_list, valdesc_int) (valdesc_double, valdesc_mixint, valdesc_mixloc) (valdesc_mixbigint, valdesc_real, valdesc_special_data): Use ggc_internal_alloc & ggc_internal_cleared_alloc for GCC 5.0. (json_canonical_name): Use ISUPPER, ISALPHA, TOUPPER instead of their standard <ctype.h> lowercase macros. * melt/warmelt-modes.melt: Update copyright year. (generate_runtypesupport_forwcopy_fun): Emit both GCC 4.9 & 5.0 compatible code. * melt/libmelt-ana-base.melt: Update copyright year. * melt/libmelt-ana-gimple.melt: TO BE IMPROVED * melt/generated/*: Painfully regenerated several times thru GCC 4.9 MELT plugin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@219975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc/objc-act.h')
-rw-r--r--gcc/objc/objc-act.h72
1 files changed, 48 insertions, 24 deletions
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index 0c7fa0456d3..337f2510448 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -1,5 +1,5 @@
/* Declarations for objc-act.c.
- Copyright (C) 1990-2014 Free Software Foundation, Inc.
+ Copyright (C) 1990-2015 Free Software Foundation, Inc.
This file is part of GCC.
@@ -38,18 +38,29 @@ void objc_common_init_ts (void);
#define OBJC_INFO_SLOT_ELTS 2
/* KEYWORD_DECL */
-#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl_minimal.name)
-#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl_non_common.arguments)
+#define KEYWORD_KEY_NAME(DECL) (KEYWORD_DECL_CHECK (DECL)->decl_minimal.name)
+#define KEYWORD_ARG_NAME(DECL) (KEYWORD_DECL_CHECK (DECL)->decl_common.size)
+
+#define INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK(NODE) \
+ TREE_CHECK2(NODE,INSTANCE_METHOD_DECL,CLASS_METHOD_DECL)
/* INSTANCE_METHOD_DECL, CLASS_METHOD_DECL */
-#define METHOD_SEL_NAME(DECL) ((DECL)->decl_minimal.name)
-#define METHOD_SEL_ARGS(DECL) ((DECL)->decl_non_common.arguments)
-#define METHOD_ADD_ARGS(DECL) ((DECL)->decl_non_common.result)
-#define METHOD_ADD_ARGS_ELLIPSIS_P(DECL) ((DECL)->decl_common.lang_flag_0)
-#define METHOD_DEFINITION(DECL) ((DECL)->decl_common.initial)
-#define METHOD_ENCODING(DECL) ((DECL)->decl_minimal.context)
-#define METHOD_TYPE_ATTRIBUTES(DECL) ((DECL)->decl_common.abstract_origin)
-#define METHOD_PROPERTY_CONTEXT(DECL) ((DECL)->decl_common.size_unit)
+#define METHOD_SEL_NAME(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_minimal.name)
+#define METHOD_SEL_ARGS(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_common.size)
+#define METHOD_ADD_ARGS(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_non_common.result)
+#define METHOD_ADD_ARGS_ELLIPSIS_P(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_common.lang_flag_0)
+#define METHOD_DEFINITION(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_common.initial)
+#define METHOD_ENCODING(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_minimal.context)
+#define METHOD_TYPE_ATTRIBUTES(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_common.abstract_origin)
+#define METHOD_PROPERTY_CONTEXT(DECL) \
+ (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK (DECL)->decl_common.size_unit)
/* PROPERTY_DECL. A PROPERTY_DECL repesents a @property declaration
@@ -65,19 +76,24 @@ void objc_common_init_ts (void);
valid getter/setter. */
/* PROPERTY_NAME is the name of the property. */
-#define PROPERTY_NAME(DECL) DECL_NAME(DECL)
+#define PROPERTY_NAME(DECL) \
+ DECL_NAME(PROPERTY_DECL_CHECK (DECL))
/* PROPERTY_GETTER_NAME is the identifier of the getter method. */
-#define PROPERTY_GETTER_NAME(DECL) ((DECL)->decl_non_common.arguments)
+#define PROPERTY_GETTER_NAME(DECL)\
+ (PROPERTY_DECL_CHECK (DECL)->decl_common.size)
/* PROPERTY_SETTER_NAME is the identifier of the setter method. */
-#define PROPERTY_SETTER_NAME(DECL) ((DECL)->decl_non_common.result)
+#define PROPERTY_SETTER_NAME(DECL) \
+ (PROPERTY_DECL_CHECK (DECL)->decl_non_common.result)
/* PROPERTY_READONLY can be 0 or 1. */
-#define PROPERTY_READONLY(DECL) DECL_LANG_FLAG_0 (DECL)
+#define PROPERTY_READONLY(DECL) \
+ DECL_LANG_FLAG_0 (PROPERTY_DECL_CHECK (DECL))
/* PROPERTY_NONATOMIC can be 0 or 1. */
-#define PROPERTY_NONATOMIC(DECL) DECL_LANG_FLAG_1 (DECL)
+#define PROPERTY_NONATOMIC(DECL) \
+ DECL_LANG_FLAG_1 (PROPERTY_DECL_CHECK (DECL))
typedef enum objc_property_assign_semantics {
OBJC_PROPERTY_ASSIGN = 1,
@@ -89,31 +105,37 @@ typedef enum objc_property_assign_semantics {
OBJC_PROPERTY_RETAIN or OBJC_PROPERTY_COPY. We need an integer to
store it, so we hijack the alignment, that properties don't
have. */
-#define PROPERTY_ASSIGN_SEMANTICS(DECL) ((DECL)->decl_common.align)
+#define PROPERTY_ASSIGN_SEMANTICS(DECL) \
+ (PROPERTY_DECL_CHECK (DECL)->decl_common.align)
/* PROPERTY_IVAR_NAME is the identifier of the instance variable.
This is set only if the PROPERTY_DECL represents a @synthesize;
otherwise, it is set to TREE_NULL. */
-#define PROPERTY_IVAR_NAME(DECL) ((DECL)->decl_common.initial)
+#define PROPERTY_IVAR_NAME(DECL) \
+ (PROPERTY_DECL_CHECK (DECL)->decl_common.initial)
/* PROPERTY_DYNAMIC can be 0 or 1. This is 1 if the PROPERTY_DECL
represents a @dynamic; otherwise, it is set to 0. */
-#define PROPERTY_DYNAMIC(DECL) DECL_LANG_FLAG_2 (DECL)
+#define PROPERTY_DYNAMIC(DECL) \
+ DECL_LANG_FLAG_2 (PROPERTY_DECL_CHECK (DECL))
/* PROPERTY_HAS_NO_GETTER can be 0 or 1. Normally it is 0, but if
this is an artificial PROPERTY_DECL that we generate even without a
getter, it is set to 1. */
-#define PROPERTY_HAS_NO_GETTER(DECL) DECL_LANG_FLAG_3 (DECL)
+#define PROPERTY_HAS_NO_GETTER(DECL) \
+ DECL_LANG_FLAG_3 (PROPERTY_DECL_CHECK (DECL))
/* PROPERTY_HAS_NO_SETTER can be 0 or 1. Normally it is 0, but if
this is an artificial PROPERTY_DECL that we generate even without a
setter, it is set to 1. */
-#define PROPERTY_HAS_NO_SETTER(DECL) DECL_LANG_FLAG_4 (DECL)
+#define PROPERTY_HAS_NO_SETTER(DECL) \
+ DECL_LANG_FLAG_4 (PROPERTY_DECL_CHECK (DECL))
/* PROPERTY_OPTIONAL can be 0 or 1. Normally it is 0, but if this is
a property declared as @optional in a @protocol, then it is set to
1. */
-#define PROPERTY_OPTIONAL(DECL) DECL_LANG_FLAG_5 (DECL)
+#define PROPERTY_OPTIONAL(DECL) \
+ DECL_LANG_FLAG_5 (PROPERTY_DECL_CHECK (DECL))
/* PROPERTY_REF. A PROPERTY_REF represents an 'object.property'
expression. It is normally used for property access, but when
@@ -192,8 +214,7 @@ typedef enum objc_property_assign_semantics {
#define SIZEOF_OBJC_TYPE_LANG_SPECIFIC sizeof (struct lang_type)
#define ALLOC_OBJC_TYPE_LANG_SPECIFIC(NODE) \
do { \
- TYPE_LANG_SPECIFIC (NODE) \
- = ggc_alloc_cleared_lang_type (sizeof (struct lang_type)); \
+ TYPE_LANG_SPECIFIC (NODE) = ggc_cleared_alloc<struct lang_type> (); \
} while (0)
#define TYPE_HAS_OBJC_INFO(TYPE) \
@@ -694,6 +715,9 @@ struct objc_try_context
extern tree objc_create_temporary_var (tree, const char *);
+size_t objc_common_tree_size (enum tree_code code);
+
+
#define objc_is_object_id(TYPE) (OBJC_TYPE_NAME (TYPE) == objc_object_id)
#define objc_is_class_id(TYPE) (OBJC_TYPE_NAME (TYPE) == objc_class_id)