diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-11-01 20:06:36 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-11-01 20:06:36 +0000 |
commit | 8f07a2aa357fd67ca7ef1e640424bc605c6cec31 (patch) | |
tree | 53252370c4f738209d137b61fe83ed7b6b403a21 /gcc/objc/objc-act.h | |
parent | 1fccc6c3464c8862297bdf74d7bf22ac245e4639 (diff) | |
download | gcc-8f07a2aa357fd67ca7ef1e640424bc605c6cec31.zip gcc-8f07a2aa357fd67ca7ef1e640424bc605c6cec31.tar.gz gcc-8f07a2aa357fd67ca7ef1e640424bc605c6cec31.tar.bz2 |
In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 property accessors.
* objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
(objc_getProperty_decl): New.
(objc_setProperty_decl): New.
(objc_copyStruct_decl): New.
(objc_getPropertyStruct_decl): New.
(objc_setPropertyStruct_decl): New.
* objc-act.c (build_objc_property_accessor_helpers): New.
(synth_module_prologue): Call
build_objc_property_accessor_helpers.
(lookup_ivar): New.
(objc_synthesize_getter): Implemented synthesizing getters that
work with properties that are not nonatomic, assign properties.
(objc_synthesize_setter): Implemented synthesizing setters that
work with properties that are not nonatomic, assign properties.
In gcc/testsuite/:
2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 property accessors.
* objc.dg/property/at-property-6.m: Use nonatomic properties to
avoid testing more complex accessors in this testcase which is not
about them.
* objc.dg/property/at-property-7.m: Same change.
* objc.dg/property/at-property-8.m: Same change.
* objc.dg/property/at-property-9.m: Same change.
* objc.dg/property/at-property-10.m: Same change.
* objc.dg/property/at-property-11.m: Same change.
* obj-c++.dg/property/at-property-6.mm: Same change.
* obj-c++.dg/property/at-property-7.mm: Same change.
* obj-c++.dg/property/at-property-8.mm: Same change.
* obj-c++.dg/property/at-property-9.mm: Same change.
* obj-c++.dg/property/at-property-10.mm: Same change.
* obj-c++.dg/property/at-property-11.mm: Same change.
* objc.dg/property/at-property-12.m: New.
* objc.dg/property/at-property-13.m: New.
* obj-c++.dg/property/at-property-12.mm: New.
* obj-c++.dg/property/at-property-13.mm: New.
From-SVN: r166143
Diffstat (limited to 'gcc/objc/objc-act.h')
-rw-r--r-- | gcc/objc/objc-act.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 95e9070..4c10c01 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -339,6 +339,12 @@ enum objc_tree_index OCTI_FAST_ENUM_STATE_TEMP, OCTI_ENUM_MUTATION_DECL, + OCTI_GET_PROPERTY_DECL, + OCTI_SET_PROPERTY_DECL, + OCTI_COPY_STRUCT_DECL, + OCTI_GET_PROPERTY_STRUCT_DECL, + OCTI_SET_PROPERTY_STRUCT_DECL, + OCTI_MAX }; @@ -506,4 +512,13 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX]; #define objc_enumeration_mutation_decl \ objc_global_trees[OCTI_ENUM_MUTATION_DECL] +/* Declarations of functions used when synthesizing property + accessors. */ +#define objc_getProperty_decl objc_global_trees[OCTI_GET_PROPERTY_DECL] +#define objc_setProperty_decl objc_global_trees[OCTI_SET_PROPERTY_DECL] +#define objc_copyStruct_decl objc_global_trees[OCTI_COPY_STRUCT_DECL] +#define objc_getPropertyStruct_decl objc_global_trees[OCTI_GET_PROPERTY_STRUCT_DECL] +#define objc_setPropertyStruct_decl objc_global_trees[OCTI_SET_PROPERTY_STRUCT_DECL] + + #endif /* GCC_OBJC_ACT_H */ |