Commit Graph

9 Commits

Author SHA1 Message Date
Nicola Pero 80e4b9e501 In libobjc/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2011-06-07  Nicola Pero  <nicola.pero@meta-innovation.com>

	Removed the Traditional Objective-C runtime public API.
	* Makefile.in (OBJC_DEPRECATED_H): Variable removed.
	(install-headers): Do not create the objc/deprecated directory and
	do not install the deprecated headers.
	(OBJC_H): Removed encoding.h and objc-api.h.
	* Object.m: Removed all methods with the exception of -class and
	-isEqual:.  Updated includes.  ([-class]): Use Modern API.
	* objc/Object.h: Do not include deprecated/Object.h.
	* objc/deprecated/Object.h: Removed.
	* linking.m (__objc_linking): Call [Object class] instead of
	[Object name].
	* Protocol.m: Removed all methods with the exception of -isEqual:.
	Updated includes.
	* objc/Protocol.h: Do not include deprecated/Protocol.h.
	* objc/deprecated/Protocol.h: Removed.
	* objc/deprecated/struct_objc_symtab.h: Removed.
	* objc/deprecated/struct_objc_module.h: Removed.
	* objc/deprecated/struct_objc_ivar.h: Removed.
	* objc/deprecated/struct_objc_ivar_list.h: Removed.
	* objc/deprecated/struct_objc_method.h: Removed.
	* objc/deprecated/struct_objc_method_list.h: Removed.
	* objc/deprecated/struct_objc_protocol_list.h: Removed.
	* objc/deprecated/struct_objc_category.h: Removed.
	* objc/deprecated/MetaClass.h: Removed.
	* objc/deprecated/objc_msg_sendv.h: Removed.  
	* objc/deprecated/README: Removed.
	* objc/deprecated/struct_objc_class.h: Removed.
	* objc/deprecated/struct_objc_protocol.h: Removed.
	* objc/deprecated/struct_objc_selector.h: Removed.
	* objc/encoding.h: Removed.
	* objc/message.h (struct objc_super): Removed the definition for
	the Traditional Objective-C runtime API.
	* objc/objc.h: Do not include objc/objc-decls.h.
	deprecated/struct_objc_selector.h, deprecated/MetaClass.h,
	deprecated/struct_objc_class.h, deprecated/struct_objc_protocol.h
	and deprecated/objc_msg_sendv.h.  Uncommented new definition of
	Protocol *.
	* objc/objc-api.h: Removed.
	* objc/runtime.h: Updated comments.  Removed check to detect
	concurrent usage of Traditional and Modern APIs.
	* objc-private/module-abi-8.h: Always define struct objc_class and
	struct objc_protocol.  (struct objc_protocol_list): Changed type
	of 'list' argument from 'Protocol *' to 'struct objc_protocol *'.
	(class_get_instance_size): Added.
	* objc-private/protocols.h (__objc_protocols_add_protocol): Take a
	'struct objc_protocol *' as argument, not a 'Protocol *'.
	* objc-private/runtime.h: Updated comments.
	* objc-private/selector.h (struct objc_selector, sel_eq): Added.
	* class.c: Include objc-private/selector.h.
	(objc_get_meta_class): Return a Class instead of a MetaClass.
	* encoding.c (method_get_next_argument): Removed.
	(method_get_first_argument): Removed.
	(method_get_nth_argument): Removed.
	* gc.c: Include objc/runtime.h instead of objc/encoding.h.
	Include objc-private/module-abi-8.h and ctype.h.
	* protocols.c (__objc_protocols_add_protocol): Take a 'struct
	objc_protocl *' as argument, not a 'Protocol *'.
	(class_addProtocol): Added casts to 'struct objc_protocol *' and
	'Protocol *'.
	(class_copyProtocolList): Likewise.
	(protocol_conformsToProtocol): Likewise.
	(protocol_copyProtocolList): Likewise.
	* sarray.c: Include objc-private/module-abi-8.h.
	* sendmsg.c (method_get_next_argument): Removed.
	(method_get_first_argument): Removed.
	(method_get_nth_argument): Removed.
	(objc_msg_sendv): Removed.
	(arglist_t, retval_t): New.  (class_get_class_method): Take a
	'Class', not 'MetaClass', argument.
	* thr.c: Include module-abi-8.h.

From-SVN: r174765
2011-06-07 19:37:35 +00:00
Nicola Pero 6e45b376c6 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-objc.m: Fixed test to test objc_lookUpClass,
	not objc_lookupClass.
	* obj-c++.dg/gnu-api-2-objc.mm: Same change.
	
In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* class.c (objc_lookupClass): Renamed to objc_lookUpClass.
	* protocols.c: Updated all calls to objc_lookupClass to call
	objc_lookUpClass instead.
	* sendmsg.c (objc_lookupClass): Do not declare.
	(get_imp): Update call to objc_lookupClass to call
	objc_lookUpClass instead.
	* objc/runtime.h (objc_lookupClass): Renamed to objc_lookUpClass.

From-SVN: r168059
2010-12-19 15:13:54 +00:00
Nicola Pero 575584a982 In libobjc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* class.c: Tidied up comments and indentation.  No code changes.
	* error.c: Same.
	* exception.c: Same.
	* init.c: Same.
	* ivars.c: Same.
	* memory.c: Same.
	* objc-foreach.c: Same.
	* objc-sync.c: Same.
	* objects.c: Same.
	* protocols.c: Same.
	* sarray.c: Same.
	* thr.c: Same.

From-SVN: r168022
2010-12-18 12:22:59 +00:00
Nicola Pero 49a35931ee ivars.c: Include stdlib.h.
2010-11-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        * ivars.c: Include stdlib.h.
        * protocols.c: Same change.

From-SVN: r166895
2010-11-18 02:11:33 +00:00
Nicola Pero ae422ccd65 In libobjc/: 2010-10-15 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Protocol.m: Include objc/runtime.h and
        objc-private/module-abi-8.h instead of objc/objc-api.h.  Do not
        repeat Protocol's instance variables.
        (struct objc_method_description_list): Do not define here.
        ([-conformsTo:]): Reimplemented on top of protocol_conformsTo().
        ([descriptionForInstanceMethod:]): Use sel_isEqual() to compare
        selectors directly instead of getting names and then using strcmp.
        ([descriptionForClassMethod:]): Same change.
        ([-isEqual:]): Reimplemented on top of protocol_isEqual().
        * protocols.c (protocol_getMethodDescription): Use sel_isEqual()
        to compare selectors directly instead of getting names and then
        using strcmp.
        * objc/Protocol.h: Updated comments.

From-SVN: r165517
2010-10-15 18:24:27 +00:00
Nicola Pero f7185d4791 In libobjc/: 2010-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>

        * init.c (__objc_init_protocol): New function which fixes up a
        protocol's class pointer, registers it with the runtime, register
        all protocol selectors and registers associated protocols too.
        (objc_init_statics): Detect if we are initializing protocols, and
        if so, use __objc_init_protocol instead of only fixing up the
        class pointer.
        (__objc_init_protocls): Use __objc_init_protocol.
        * objc-private/module-abi-8.h: Updated comments.
        * objc-private/runtime.h
        (__objc_register_selectors_from_description_list): New.
        * selector.c (__objc_register_selectors_from_description_list):
        New.  (struct objc_method_description_list): Declare.
        * Protocol.m ([-descriptionForInstanceMethod:]): Use sel_get_name
        when accessing the name of a method, which is now correctly a SEL.
        ([-descriptionForClassMethod:]): Same change.
        * protocols.c (protocol_getMethodDescription): Same change.
        * objc/runtime.h: Updated comments.
        (sel_registerTypedName): Fixed typo in function name.

From-SVN: r165499
2010-10-15 10:35:00 +00:00
Nicola Pero ad9eef11df Makefile.in (C_SOURCE_FILES): Added methods.c.
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Makefile.in (C_SOURCE_FILES): Added methods.c.
        * encoding.c (method_getNumberOfArguments): New.
        (method_get_number_of_arguments): Call
        method_getNumberOfArguments.
        * ivars.c (ivar_getName): Check for NULL variable argument.
        (ivar_getOffset): Check for NULL variable argument.
        (ivar_getTypeEncoding): Check for NULL variable argument.
        (class_copyIvarList): New.
        * methods.c: New.
        * protocols.c (class_copyProtocolList): Check for Nil class_
        argument.
        * sendmsg.c: Use 'struct objc_method *' instead of Method_t, and
        'struct objc_method_list *' instead of MethodList_t.
        (class_getMethodImplementation): New.
        (class_respondsToSelector): New.
        (class_getInstanceMethod): New.
        (class_getClassMethod): New.
        * objc/runtime.h: Updated comments.
        (class_copyIvarList): New.
        (class_getInstanceMethod): New.
        (class_getClassMethod): New.
        (class_getMethodImplementation): New.
        (class_respondsToSelector): New.
        (method_getName): New.
        (method_getImplementation): New.
        (method_getTypeEncoding): New.
        (class_copyMethodList): New.
        (method_getNumberOfArguments): New.

From-SVN: r165400
2010-10-12 22:00:01 +00:00
Nicola Pero 718a8e53dc archive.c: Do not include objc/objc.h.
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * archive.c: Do not include objc/objc.h.
        * class.c: Do not include objc/objc.h.
        * encoding.c: Include objc/runtime.h, ctype.h and
        objc-private/module-abi-8.h instead of objc/objc-api.h and
        objc/encoding.h.
        * error.c: Do not include objc/objc.h.
        * gc.c: Include tconfig.h and objc/encoding.h only if
        OBJC_WITH_GC.
        * hash.c: Include objc/runtime.h and objc/thr.h instead of
        objc/objc-api.h.  Do not include objc/objc.h.
        * init.c: Do not include objc/objc.h.
        * ivars.c: Include objc/runtime.h, objc-private/module-abi-8.h and
        objc/thr.h instead of objc/objc-api.h.  Do not include
        objc/objc.h.
        * linking.m: Tidied comment.
        * memory.c: Include objc/runtime.h instead of objc/objc-api.h.
        Do not include objc/objc.h.
        * objects.c: Do not include objc/objc.h.
        * objc-sync.c: Include objc/runtime.h instead of objc/objc-api.h.
        * protocols.c: Do not include objc/objc.h.
        * sarray.c: Include objc/runtime.h instead of objc/objc-api.h.  Do
        not include objc/objc.h.
        * selector.c: Do not include objc/objc.h.
        * sendmsg.c: Do not include objc/objc.h.
        * thr.c: Include objc/runtime.h instead of objc/objc-api.h.
        Do not include objc/objc.h.
        * objc/objc-decls.h: Reindented code.
        * objc/runtime.h Include objc-decls.h.  Updated comments.
        (objc_malloc): New.
        (objc_atomic_malloc): New.
        (objc_calloc): New.
        (objc_realloc): New.
        (objc_free): New.
        * objc-private/runtime.h: Updated comments.

From-SVN: r165386
2010-10-12 16:17:18 +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