aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2011-02-19 01:42:17 +0000
committerNicola Pero <nicola@gcc.gnu.org>2011-02-19 01:42:17 +0000
commitd4c433f96c2a31f5bd15dc710f8ce3ff14e54699 (patch)
tree0ccc89fe6cccce803a9f9432fd4c34fe2d7852d2 /gcc/objc/objc-act.c
parentf6c51fa7a10e886688c49e3bae655ac20914d1bf (diff)
downloadgcc-d4c433f96c2a31f5bd15dc710f8ce3ff14e54699.zip
gcc-d4c433f96c2a31f5bd15dc710f8ce3ff14e54699.tar.gz
gcc-d4c433f96c2a31f5bd15dc710f8ce3ff14e54699.tar.bz2
Updated comments - no change in code
From-SVN: r170298
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r--gcc/objc/objc-act.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index d73f2c0..0e32c23 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -6553,6 +6553,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
{
tree name = TREE_PURPOSE (attribute);
+ /* TODO: Document what the objc_exception attribute is/does. */
/* We handle the 'deprecated' and (undocumented) 'objc_exception'
attributes. */
if (is_attribute_p ("deprecated", name))
@@ -7505,10 +7506,6 @@ objc_gen_property_data (tree klass, tree class_methods)
/* @dynamic property - nothing to check or synthesize. */
if (PROPERTY_DYNAMIC (x))
continue;
- /* Add any property that is declared in the interface, but undeclared in the
- implementation to thie implementation. These are the 'dynamic' properties.
-
- objc_v2_merge_dynamic_property ();*/
/* @synthesize property - need to synthesize the accessors. */
if (PROPERTY_IVAR_NAME (x))
@@ -7771,7 +7768,6 @@ objc_declare_protocols (tree names, tree attributes)
add_protocol (protocol);
PROTOCOL_DEFINED (protocol) = 0;
PROTOCOL_FORWARD_DECL (protocol) = NULL_TREE;
-/* PROTOCOL_V2_FORWARD_DECL (protocol) = NULL_TREE;*/
if (attributes)
{
@@ -7824,7 +7820,6 @@ start_protocol (enum tree_code code, tree name, tree list, tree attributes)
add_protocol (protocol);
PROTOCOL_DEFINED (protocol) = 1;
PROTOCOL_FORWARD_DECL (protocol) = NULL_TREE;
-/* PROTOCOL_V2_FORWARD_DECL (protocol) = NULL_TREE;*/
check_protocol_recursively (protocol, list);
}
@@ -8466,10 +8461,11 @@ void
objc_clear_super_receiver (void)
{
if (objc_method_context
- && UOBJC_SUPER_scope == objc_get_current_scope ()) {
- UOBJC_SUPER_decl = 0;
- UOBJC_SUPER_scope = 0;
- }
+ && UOBJC_SUPER_scope == objc_get_current_scope ())
+ {
+ UOBJC_SUPER_decl = 0;
+ UOBJC_SUPER_scope = 0;
+ }
}
void
@@ -10357,26 +10353,32 @@ encode_field_decl (tree field_decl, int curtype, int format)
encode_type (TREE_TYPE (field_decl), curtype, format);
}
-/* This routine encodes the attribute of the input PROPERTY according to following
- formula:
-
-Property attributes are stored as a comma-delimited C string. The simple attributes
-readonly and copies are encoded as single characters. The parametrized attributes,
-getter=name, setter=name, and ivar=name, are encoded as single characters, followed
-by an identifier. Property types are also encoded as a parametrized attribute. The
-characters used to encode these attributes are defined by the following enumeration:
-
-enum PropertyAttributes {
- kPropertyReadOnly = 'r', // property is read-only.
- kPropertyCopies = 'c', // property is a copy of the value last assigned
- kPropertyGetter = 'g', // followed by getter selector name
- kPropertySetter = 's', // followed by setter selector name
- kPropertyInstanceVariable = 'i' // followed by instance variable name
- kPropertyType = 't' // followed by old-style type encoding.
-};
-
-*/
+/* This routine encodes the attribute of the input PROPERTY according
+ to following formula:
+
+ Property attributes are stored as a comma-delimited C string.
+ Simple attributes such as readonly are encoded as single
+ character. The parametrized attributes, getter=name and
+ setter=name, are encoded as a single character followed by an
+ identifier. Property types are also encoded as a parametrized
+ attribute. The characters used to encode these attributes are
+ defined by the following enumeration:
+
+ enum PropertyAttributes {
+ kPropertyReadOnly = 'R',
+ kPropertyBycopy = 'C',
+ kPropertyByref = '&',
+ kPropertyDynamic = 'D',
+ kPropertyGetter = 'G',
+ kPropertySetter = 'S',
+ kPropertyInstanceVariable = 'V',
+ kPropertyType = 't',
+ kPropertyWeak = 'W',
+ kPropertyStrong = 'S',
+ kPropertyNonAtomic = 'N'
+ };
+ FIXME: Update the implementation to match. */
tree
objc_v2_encode_prop_attr (tree property)
{