Commit Graph

17 Commits

Author SHA1 Message Date
Nicola Pero 5ec582f938 In gcc/testsuite/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/gnu-api-2-resolve-method.m: Include objc/message.h.
	* obj-c++.dg/gnu-api-2-resolve-method.m: Include objc/message.h.

In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* Makefile.in (OBJC_DEPRECATED_H): Added objc_msg_sendv.h.
	* objc/deprecated/objc_msg_sendv.h: New.
	* objc/message.h: Do not define retval_t, apply_t, arglist,
	arglist_t, objc_msg_sendv, now in
	objc/deprecated/objc_msg_sendv.h.
	* objc/objc.h: Do not include message.h; include
	objc/deprecated/objc_msg_sendv.h instead.  Tidied up comments.
	* sendmsg.c: Include objc/message.h.
	* thr.c: Include objc/message.h.

From-SVN: r168042
2010-12-19 01:29:09 +00:00
Nicola Pero c06a866409 In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* Protocol.m: Moved all methods, with the exception of -isEqual:,
	into the 'Deprecated' category.
	* objc/Protocol.h: Removed all methods, moved to
	objc/deprecated/Protocol.h.  Include objc/deprecated/Protocol.h.
	* objc/deprecated/Protocol.h: New.
	* Makefile.in (OBJC_DEPRECATED_H): Added Protocol.h.

From-SVN: r168040
2010-12-19 00:54:27 +00:00
Nicola Pero 002d467548 Object.h: Moved all the methods, with the exception of -class and -isEqual:, into ...
2010-12-14  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc/Object.h: Moved all the methods, with the exception of
	-class and -isEqual:, into ...
	* objc/deprecated/Object.h: here.
	* Object.m: Moved all the methods, with the exception of -class
	and -isEqual: into the 'Deprecated' category.

From-SVN: r167825
2010-12-14 23:36:36 +00:00
Nicola Pero 375d1239a4 module-abi-8.h (struct objc_symtab): Updated description of sel_ref_cnt and refs.
2010-12-11  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-private/module-abi-8.h (struct objc_symtab): Updated
	description of sel_ref_cnt and refs.
	* objc/deprecated/struct_objc_symtab.h (objc_symtab): Same change.

From-SVN: r167710
2010-12-11 14:03:38 +00:00
Nicola Pero debfbfeefc In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Makefile.in (C_SOURCE_FILES): Added protocols.c.
        * objc-private/protocols.h: New.
        * protocols.c: New.
        * init.c: Include objc-private/protocols.h.
        (__objc_exec_class): Call __objc_protocols_init on startup.
        (__objc_init_protocols): Call __objc_protocols_add_protocol.
        * objc-private/runtime.h: Use (struct objc_method_list *) instead
        of MethodList_t, and (struct objc_method *) instead of Method_t.
        * objc/deprecated/struct_objc_class.h: Define
        __objc_STRUCT_OBJC_CLASS_defined.
        * objc-private/module-abi-8.h (struct
        objc_method_description_list): New.
        (struct objc_class): Only define if
        __objc_STRUCT_OBJC_CLASS_defined is undefined.
        * objc/runtime.h (class_getName): New.
        (objc_getProtocol): New.
        (objc_copyProtocolList): New.
        (class_addProtocol): New.
        (class_conformsToProtocol): New.
        (class_copyProtocolList): New.
        (protocol_conformsToProtocol): New.
        (protocol_isEqual): New.
        (protocol_getName): New.
        (protocol_getMethodDescription): New.
        (protocol_copyMethodDescriptionList): New.
        (protocol_getProperty): New.
        (protocol_copyPropertyList): New.
        (protocol_copyProtocolList): New.
        * class.c (class_getName): New.
        * selector.c (sel_isEqual): New.

From-SVN: r165349
2010-10-12 02:43:25 +00:00
Nicola Pero 524660d2e3 In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * selector.c (sel_getName): Return "<null selector>" for a NULL
        argument.
        (sel_get_name): Return 0 for a NULL argument.
        * objc/runtime.h (sel_getName): Updated documentation.

        * objc-private/hash.h (class_hash_table): Unused declaration
        removed.
        (module_hash_table): Same.
        * objc/deprecated/hash.h: Same changes.

From-SVN: r165348
2010-10-12 00:27:02 +00:00
Nicola Pero bc18535a3e objc.h: Updated comments.
2010-10-11  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc/objc.h: Updated comments.
        * objc/objc-api.h: (object_copy): Added one argument; use a
        #define to maintain backwards-compatibility.  Moved
        _objc_object_alloc, _objc_object_copy, _objc_object_dispose and
        objc_get_uninstalled_dtable into
        objc/deprecated/objc_get_uninstalled_dtable.h and
        objc/deprecated/objc_object_alloc.h.  Include these files.
        * objc/deprecated/objc_get_uninstalled_dtable.h: New.
        * objc/deprecated/objc_object_alloc.h: New.
        * objc/runtime.h (set_getName): New.
        (sel_getType): New.
        (sel_getUid): New.
        (sel_registerName): New.
        (sel_registerTypedName): New.
        (sel_isEqual): New.
        (class_createInstance): New.
        (object_copy): New.
        (object_dispose): New.
        * objects.c: Do not include tconfig.h.  Include gc_typed.h if
        building the garbage collection version.
        (__objc_object_alloc): Removed.
        (__objc_object_copy): Removed.
        (__objc_object_dispose): Removed.
        (class_createInstance): New from code in class_create_instance.
        Cast second argument of GC_malloc_explicitly_typed.  Use
        objc_calloc.  Do not call _objc_object_alloc.
        (class_create_instance): Call class_createInstance.
        (object_copy): Added extraBytes argument.  Do not call
        _objc_object_copy.
        (object_dispose): Do not call _objc_object_dispose.
        * memory.c (objc_free): When using garbage collection, mark the
        argument as unused.
        * selector.c (sel_getName): New.
        (sel_get_name): Call sel_getName.
        (sel_getType): New.
        (sel_get_type): Call sel_getType.
        (sel_registerName): New.
        (sel_register_name): Call sel_registerName.
        (sel_registerTypedName): New.
        (sel_register_typed_name): Call sel_registerTypedName.
        (sel_getUid): New.
        (sel_get_uid): Call sel_getUid.

From-SVN: r165264
2010-10-10 23:28:12 +00:00
Nicola Pero e4d508663e In libobjc/: 2010-10-10 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-10  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc/objc-api.h: Define Method, Method_t, Category and
        Category_t.  Prevent including this file at the same time as
        objc/runtime.h.  Updated comments.
        * objc/deprecated/struct_objc_method.h: Do not define Method,
        Method_t.
        * objc/deprecated/struct_objc_category.h: Do not define Category,
        Category_t.
        * objc-private/module-abi-8.h: New file containing a copy of all
        the structure definitions.  Not used yet.
        * objc/encoding.h (objc_aligned_size): Removed duplicate
        declaration.  Updated comments.
        * objc/runtime.h: Added Ivar, objc_property_t, Property, Method,
        Category, struct objc_method_description, _C_ID and similar,
        _C_CONST and similar and _F_CONST and similar.  Added
        objc_sizeof_type, objc_alignof_type, objc_aligned_size,
        objc_promoted_size, objc_skip_type_qualifier, objc_skip_typespec,
        objc_skip_offset, objc_skip_argspec, objc_get_type_qualifiers,
        struct objc_struct_layout, objc_layout_structure,
        objc_layout_structure_next_member, objc_layout_finish_structure,
        objc_layout_structure_get_info.  Prevent including this file at
        the same time as objc/objc-api.h.

From-SVN: r165256
2010-10-10 17:43:07 +00:00
Nicola Pero 2461ab4bb7 In libobjc/: 2010-10-10 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-10  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Makefile.in (OBJC_DEPRECATED_H): Added struct_objc_category.h,
        struct_objc_ivar.h, struct_objc_ivar_list.h, struct_objc_method.h,
        struct_objc_method_list.h, struct_objc_module.h,
        struct_objc_protocol_list.h, struct_objc_symtab.h.
        * objc/deprecated/struct_objc_category.h: New.
        * objc/deprecated/struct_objc_ivar.h: New.
        * objc/deprecated/struct_objc_ivar_list.h: New.
        * objc/deprecated/struct_objc_method.h: New.
        * objc/deprecated/struct_objc_method_list.h: New.
        * objc/deprecated/struct_objc_module.h: New.
        * objc/deprecated/struct_objc_protocol_list.h: New.
        * objc/deprecated/struct_objc_symtab.h: New.
        * objc/deprecated/struct_objc_static_instances.h: New.
        * objc/objc-api.h: Definitions of deprecated structures moved into
        the above header fragment files in objc/deprecated/.  Include the
        files instead of definition the structures here.  Updated
        comments.
        * objc/runtime.h: Updated comments.  Do not include objc-api.h.
        (objc_set_enumeration_mutation_handler): Renamed to
        objc_setEnumerationMutationHandler.
        * objc-foreach.c (objc_set_enumeration_mutation_handler): Renamed
        to objc_setEnumerationMutationHandler.
        * objc/objc-exception.h (objc_set_exception_matcher): Renamed to
        objc_setExceptionMatcher.
        (objc_set_uncaught_exception_handler): Renamed to
        objc_setUncaughtExceptionHandler.
        * exception.c: Same changes.

From-SVN: r165249
2010-10-10 11:18:57 +00:00
Nicola Pero cf3822f181 In libobjc/: 2010-10-10 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-10  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-foreach.c: Include objc-private/common.h.
        * objc/deprecated/METHOD_NULL.h: New file.
        * objc/objc-api.h: Include deprecated/METHOD_NULL.h instead of
        defining METHOD_NULL here.
        * Makefile.in (OBJC_DEPRECATED_H): Added METHOD_NULL.h.
        * Object.m ([+instancesRespondTo:]): Use (Method_t)0 instead of
        METHOD_NULL.
        ([-respondsTo:]): Same change.
        * objc/objc-api.h (method_get_imp): Converted it into a normal
        function so that we can hide the internals of struct objc_method.
        * sendmsg.c (method_get_imp): Implemented.

From-SVN: r165241
2010-10-09 22:22:23 +00:00
Kai Tietz 2de87f04d8 struct_objc_class.h: Add padding to avoid warning with -Wpadded.
2010-09-30  Kai Tietz  <kai.tietz@onevision.com>

        * objc/deprecated/struct_objc_class.h: Add padding
        to avoid warning with -Wpadded.

From-SVN: r164746
2010-09-30 11:01:19 +02:00
Nicola Pero 5d3b14bd9a In libobjc/:
* hash.c: Include objc-private/hash.h instead of objc/hash.h.

        * objc/sarray.h: Moved into objc/deprecated/sarray.h;
        objc/sarray.h replaced with a placeholder including the file from
        the deprecated/ directory.
        * objc-private/sarray.h: New file (private copy of sarray.h).
        * hash.c: Include <assert.h> instead of "assert.h"
        * sarray.c: Include <assert.h> instead of "assert.h".  Include
        objc-private/sarray.h instead of objc/sarray.h.
        * selector.c: Include objc-private/sarray.h instead of
        objc/sarray.h.
        * sendmsg.c: Include <assert.h>.  Include objc-private/sarray.h
        instead of objc/sarray.h.
        * Makefile.in (OBJC_DEPRECATED_H): Added sarray.h.

From-SVN: r164389
2010-09-18 09:34:58 +00:00
Nicola Pero 5be9cdc112 In libobjc/:
* objc/hash.h: Moved into objc/deprecated/hash.h; objc/hash.h
        replaced with a placeholder including the file from the
        deprecated/ directory.
        * objc/objc-api.h: Updated includes.
        * objc/typedstream.h: Updated includes.
        * objc-private/hash.h: New file (private copy of hash.h).
        * objc/objc-list.h: Moved into objc/deprecated/objc-list.h;
        objc/objc-list.h replaced with a placeholder including the file
        from the deprecated/ directory.
        * objc-private/objc-list.h: New file (private copy of objc-list.h).
        * init.c: Include objc-private/hash.h and objc-private/objc-list.h
        instead of objc/hash.h and objc/objc-list.h.
        * selector.c: Same change.
        * class.c: Added include <string.h>, which used to be implicitly included
        when hash.h was included.
        * exception.c: Same change.
        * objects.c: Same change.
        * sarray.c: Same change.
        * sendmsg.c: Same change.
        * Makefile.in (OBJC_DEPRECATED_H): Added hash.h and objc-list.h.
        (OBJC_H): Removed hash.h and objc-list.h

From-SVN: r164373
2010-09-17 16:35:15 +00:00
Nicola Pero d1be5d82e0 In libobjc/:
* objc/deprecated/objc_malloc.h: New file.
        * objc/deprecated/objc_valloc.h: New file.
        * objc/objc-api.h: Include the files instead of defining
        objc_valloc, _objc_malloc() and similar.
        * Makefile.in (OBJC_DEPRECATED_H): Added objc_valloc.h and
        objc_malloc.h.
        * memory.c: Removed the extra layer of indirection of _objc_malloc
        and similar.
        (objc_calloc): Use GC_malloc in the garbage-collected
        implementation as GC_malloc returns memory that is already freed.
        (objc_valloc): Deprecated.

From-SVN: r164224
2010-09-12 01:44:58 +00:00
Nicola Pero 7b86998664 In libobjc/:
* objc/deprecated/objc_error.h: New file.
        * objc/objc-api.h: Include deprecated/objc_error.h instead of
        defining objc_error and related.
        * error.c: New file.  Added _objc_abort function which replaces
        objc_error.  No change in functionality as they both print an
        error and abort.
        * misc.c: File removed.  Code moved into memory.c and error.c.
        * memory.c: New file.
        * objc-private/error.h: New file.
        * archive.c: Include objc-private/error.h and use _objc_abort
        instead of objc_error everywhere.
        * class.c: Same change.
        * encoding.c: Same change.
        * init.c: Same change, and simplified init_check_module_version.
        * memory.c: Same change.
        * sendmsg.c:  Same change.
        * thr.c: Same change.
        * Makefile.in (OBJ_DEPRECATED_H): Added objc_error.h.
        (OBJ_H): Reordered list.
        (OBJS): Removed misc.lo, added memory.lo and error.lo.
        (OBJS_GC): Removed misc_gc.lo, added memory_gc.lo and error_gc.lo.
        (misc_gc.lo): Rule removed.
        (error_gc.lo): Rule added.
        (memory_gc.lo): Rule added.

From-SVN: r164223
2010-09-12 00:43:15 +00:00
Nicola Pero 3d0d87390b In libobjc:
* objc/deprecated/struct_objc_selector.h: New file.  Definition of
        'struct objc_selector' and 'sel_eq' moved here.
        * objc/deprecated/struct_objc_protocol.h: New file.  Definition of
        'struct objc_procotol' moved here.
        * objc/deprecated/struct_objc_class.h: New file.  Definition of
        'struct objc_class' moved here.
        * objc/deprecated/MetaClass.h: New file.  Definition of MetClass
        moved here.
        * objc/deprecated/STR.h: New file.  Definition of STR moved here.       
        * objc/message.h: New file.  Definitions for relval_t, apply_t,
        arglist, arglist_t and objc_msg_lookup were moved here.
        * objc/objc.h: Include the above files instead of defining the
        corresponding structs, types and functions here.  Added new opaque
        definitions for SEL and Class.  Use Class and not 'struct
        objc_class *' in the definition of 'struct objc_object'.
        Commented all types defined in the file.  Removed special
        definition of BOOL as 'int' on __vxworks; use 'unsigned char'
        there as well.
        * objc/deprecated/objc-unexpected-exception.h: Renamed to
        objc_unexpected_exception.h.
        * objc/objc-api.h: Updated include of
        objc-unexpetected-exception.h
        * objc/objc-exception.h: Updated comments.
        * Makefile.in (OBJC_H, OBJC_DEPRECATED_H): Added the new header
        files.  Reindented list of files.

From-SVN: r164212
2010-09-11 12:38:56 +00:00
Nicola Pero e976a775e2 deprecated: New directory.
* libobjc/objc/deprecated: New directory.
        * libobjc/objc/deprecated/README: New file.
        * libobjc/objc/README: New file.
        * libobjc/objc/typedstream.h: Moved into objc/deprecated/typedstream.h;
        objc/typedstream.h replaced with a placeholder including the file
        from the deprecated/ directory.
        * libobjc/objc/deprecated/objc-unexpected-exception.h: New file with the
        definition of _objc_unexpected_exception.       
        * libobjc/objc/objc-api.h: Include deprecated/objc-unexcepted-exception.h
        instead of defining _objc_unexpected_exception.
        * libobjc/objc/deprecated/Object.h: New file with the deprecated Object
        methods in a 'Deprecated' category.
        * libobjc/objc/Object.h Include deprecated/Object.h instead of defining
        the deprecated methods.
        * libobjc/Object.m: Moved deprecated methods into 'Deprecated' category.
        * libobjc/objc-private: New directory.
        * libobjc/objc-private/README: New file.
        * libobjc/Makefile.in (OBJC_DEPRECATED_H): New variable.
        (install-headers): Create installation directory for
        OBJC_DEPRECATED_H headers, and install them.

From-SVN: r164153
2010-09-10 09:56:40 +00:00