aboutsummaryrefslogtreecommitdiff
path: root/libobjc/sendmsg.c
AgeCommit message (Collapse)Author
2015-09-12stop including tm.h in sendmsg.ctbsaunde
libobjc/ChangeLog: 2015-09-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> PR libobjc/24775 * sendmsg.c (tm.h): Remove include. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227712 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-12remove unused defines from sendmsg.ctbsaunde
libobjc/ChangeLog: 2015-09-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> PR libobjc/24775 * sendmsg.c (gen_rtx): Remove macro. (gen_rtx_MEM): Likewise. (gen_rtx_REG): Likewise. (rtx): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227711 138bc75d-0d04-0410-961f-82ee72b054a4
2015-09-12remove STRUCT_VALUE macrotbsaunde
This macro was converted to the TARGET_STRUCT_VALUE_RTX hook many years ago, however there are still some lingering definitions, and a use in libobjc. All the remaining definitions define the macro to 0, which libobjc treats the same as undefined, so it won't break anything else to have libobjc stop checking the macro. However it may be that this part of libobjc has been broken for a long time on targets that only define the hook, but that is a separate issue. gcc/ChangeLog: 2015-09-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * config/arc/arc.h: Remove define of STRUCT_VALUE. * config/lm32/lm32.h: Likewise. * config/mep/mep.h: Likewise. * config/visium/visium.h: Likewise. * system.h: Poison STRUCT_VALUE macro. libobjc/ChangeLog: 2015-09-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> PR libobjc/24775 * sendmsg.c: Remove check of STRUCT_VALUE macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227710 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-272015-01-27 Matthias Klose <doko@ubuntu.com>doko
* sendmsg.c: Add prototypes for __objc_get_forward_imp and get_imp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220175 138bc75d-0d04-0410-961f-82ee72b054a4
2015-01-05 Update copyright years.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219188 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-02Update copyright years in libobjc/rsandifo
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206299 138bc75d-0d04-0410-961f-82ee72b054a4
2013-02-03Update copyright years in libobjc.rsandifo
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195693 138bc75d-0d04-0410-961f-82ee72b054a4
2011-10-08In libobjc/:nicola
2011-10-08 Richard Frith-Macdonald <rfm@gnu.org> Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/50428 * sendmsg.c (__objc_send_initialize): If a class does not have an +initialize method, search for an +initialize method in the superclass and in the ancestor classes and execute the first one that is found. This makes the GNU runtime behave in the same way as the Apple/NeXT runtime with respect to +initialize methods and subclassing. In gcc/: 2011-10-08 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/50428 * doc/objc.texi (Garbage Collection): Updated example to protect +initialize against execution in subclasses. In gcc/testsuite/: 2011-10-08 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/50428 * objc/execute/initialize-1.m: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179711 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-07In libobjc/:nicola
2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (class_get_instance_method): Removed. (class_get_class_method): Removed. (objc_get_uninstalled_dtable): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174775 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-07In libobjc/:nicola
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174765 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-03In libobjc/:nicola
2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> * Object.m ([-forward::]): Removed. * objc/deprecated/Object.h ([-forward::]): Removed. * sendmsg.c (__objc_forward): Updated comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174607 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-02In libobjc/:nicola
2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> * Makefile.in (OBJC_DEPRECATED_H): Removed objc_error.h. * objc/deprecated/objc_error.h: Removed. * objc/objc-api.h: Do not include deprecated/objc_error.h. * libobjc.def (objc_error, objc_verror): Removed. * error.c (_objc_error_handler, objc_error, objc_verror, objc_set_error_handler): Removed. * Object.m ([-error:], [-perform:], [-perform:with:], [-perform:with:with], [-subclassResponsibility:], [-notImplemented:], [-shouldNotImplement:], [-doesNotRecognize:]): Removed. * objc/deprecated/Object.h: Removed the same methods. * sendmsg.c (__objc_forward): Do not try to invoke the "error:" method after trying to invoke the "doesNotRecognize:" method. In gcc/testsuite/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/torture/forward-1.m (main): Updated testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174587 138bc75d-0d04-0410-961f-82ee72b054a4
2011-05-26In libobjc/:nicola
2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c: Reindented part of the file. No non-trivial changes in code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174269 138bc75d-0d04-0410-961f-82ee72b054a4
2011-05-26In libobjc/:nicola
2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (__objc_install_dtable_for_class): Use objc_getClass, not objc_lookupClass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174268 138bc75d-0d04-0410-961f-82ee72b054a4
2011-05-25In libobjc/:nicola
2011-05-25 Richard Frith-Macdonald <rfm@gnu.org> David Ayers <ayers@fsfe.org> PR libobjc/38037 * sendmsg.c: Include objc/hash.h. (get_implementation): New function, mostly with code from get_imp updated to support the new +initialize dispatch table logic. (get_imp): Use get_implementation. (__objc_responds_to): Updated to support the new +initialize dispatch table logic. (class_respondsToSelector): Likewise. (objc_msg_lookup): Use get_implementation. (__objc_init_install_dtable): Removed. (__objc_install_methods_in_dtable): Updated arguments. (__objc_install_dispatch_table_for_class): Renamed to __objc_install_dtable_for_class and updated to support the new +initialize dispatch table logic. (__objc_update_dispatch_table_for_class): Updated to support the new +initialize dispatch table logic. (__objc_forward): Call get_implementation instead of get_imp. (prepared_dtable_table): New. (__objc_prepare_dtable_for_class): New. (__objc_prepared_dtable_for_class): New. (__objc_get_prepared_imp): New. (__objc_install_prepared_dtable_for_class): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174221 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-23In libobjc/:nicola
2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com> * init.c (create_tree_of_subclasses_inherited_from): Updated DEBUG_PRINTF messages. (__objc_tree_insert_class): Same. (__objc_send_load_using_method_list): Same. (__objc_send_load): Same. (__objc_exec_class): Same. In particular, do not print the module name since it is no longer used. * sendmsg.c (__objc_send_initialize): Added DEBUG_PRINTFs for tracking +initialize calls. (__objc_update_dispatch_table_for_class): Added DEBUG_PRINTFs for tracking updates of dispatch tables. (__objc_install_dispatch_table_for_class): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168215 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-23In gcc/testsuite/:nicola
2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com> * obj-c.dg/gnu-api-2-class.m: Test that class_addMethod() returns NO if the method is already implemented in the class. * obj-c++.dg/gnu-api-2-class.mm: Same change. In libobjc/: 2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (class_addMethod): Return NO if the method already exists in the class. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168199 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-19In libobjc/:nicola
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * objc-private/runtime.h (__objc_class_links_resolved): Removed. (__objc_print_dtable_stats): Removed. (__sel_register_typed_name): Removed. * sendmsg.c (__objc_print_dtable_stats): Use 'void' as argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168066 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-19In libobjc/:nicola
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (method_setImplementation): Do not declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168064 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-19In gcc/testsuite/:nicola
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168059 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-19In libobjc/:nicola
2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * objc/runtime.h (class_ivar_set_gcinvisible): Declare. * sendmsg.c (_CLS_IN_CONSTRUCTION, CLS_IS_IN_CONSTRUCTION): Do not define. Updated comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168058 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-19In gcc/testsuite/:nicola
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168042 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-16In libobjc/:nicola
2010-12-16 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c: Include objc/runtime.h instead of objc/objc-api.h. Include objc-private/module-abi-8.h and objc-private/selector.h instead of objc/encoding.h. (objc_msg_lookup_super): Use super->super_class instead of super->class. (method_get_first_argument, method_get_next_argument): Declare locally. (class_get_instance_method): Declare before using. (objc_msg_sendv): Use 'struct objc_method' instead of 'Method'. (__objc_init_dispatch_tables, __objc_send_initialize): Use sel_registerName() instead of sel_register_name(). (__objc_forward): Use sel_getName() instead of sel_get_name(). (objc_get_uninstalled_dtable): Use 'void' as argument. * objc-private/selector.h: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167961 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-15In libobjc/:nicola
2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc/message.h (objc_super): When using the modern API, do not define Super and Super_t, and always use 'super_class' for the super class field. (objc_msg_lookup_super): Updated prototype to use 'struct objc_super *' instead of 'Super_t'. * sendmsg.c (objc_msg_lookup_super): Updated prototype to use 'struct objc_super *' instead of 'Super_t'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167869 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-152010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>nicola
* sendmsg.c: Reindented some code and tidied up comments. No actual code changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167835 138bc75d-0d04-0410-961f-82ee72b054a4
2010-12-11In libobjc/:nicola
2010-12-11 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (selector_resolveClassMethod): New. (selector_resolveInstanceMethod): New. (__objc_resolve_class_method): New. (__objc_resolve_instance_method): New. (get_imp): Call __objc_resolve_class_method or __objc_resolve_instance_method at the appropriate time. (objc_msg_lookup): Same. (class_getClassMethod): Same. (class_getInstanceMethod): Same. (__objc_init_dispatch_tables): Initialize selector_resolveClassMethod and selector_resolveInstanceMethod. * objc/runtime.h: Updated documentation of class_getClassMethod, class_getInstanceMethod and class_getMethodImplementation. In gcc/testsuite/: 2010-12-11 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/gnu-api-2-resolve-method.m: New. * obj-c++.dg/gnu-api-2-resolve-method.mm: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167712 138bc75d-0d04-0410-961f-82ee72b054a4
2010-11-23In libobjc/:nicola
2010-11-23 Richard Frith-Macdonald <rfm@gnu.org> * sendmsg.c (get_imp): Fixed call to __objc_get_forward_imp to pass nil as the receiver since we don't know the receiver at this point. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167092 138bc75d-0d04-0410-961f-82ee72b054a4
2010-10-16In libobjc/:nicola
2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com> * objc/runtime.h: Updated comments. (class_addMethod): New. (class_addIvar): New. (class_replaceMethod): New. (objc_allocateClassPair): New. (objc_registerClassPair): New. (objc_disposeClassPair): New. * class.c (objc_allocateClassPair): New. (objc_registerClassPair): New. (objc_disposeClassPair): New. (class_getSuperclass): Return Nil if a class is in construction. * init.c (__objc_exec_class): Call __objc_init_class. (__objc_init_class): New. * ivars.c (class_copyIvarList): Return NULL if class is in construction. Do not lock the runtime mutex. (class_getInstanceVariable): Return NULL if class is in construction. Do not lock the runtime mutex. (class_addIvar): New. * sendmsg.c (class_addMethod): New. (class_replaceMethod): New. * objc-private/module-abi-8.h (__CLS_SETNOTINFO): New. (_CLS_IN_CONSTRUCTION): New. (CLS_IS_IN_CONSTRUCTION): New. (CLS_SET_IN_CONSTRUCTION): New. (CLS_SET_NOT_IN_CONSTRUCTION): New. * objc-private/runtime.h (__objc_init_class): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165563 138bc75d-0d04-0410-961f-82ee72b054a4
2010-10-122010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>nicola
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165400 138bc75d-0d04-0410-961f-82ee72b054a4
2010-10-122010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>nicola
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165386 138bc75d-0d04-0410-961f-82ee72b054a4
2010-10-09In libobjc/:nicola
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165241 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-26Reverted removing 'inline' from get_impnicola
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164636 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-262010-09-26 Kai Tietz <kai.tietz@onevision.com>ktietz
* sendmsg.c (get_imp): Remove inline. (objc_msg_lookup): Likewise. (objc_get_uninstalled_dtable): Likewise. * encoding.c (objc_skip_type_qualifiers): Likewise. (objc_skip_offset): Likewise. * archive.c (__objc_write_object): Likewise (__objc_write_class): (__objc_write_selector): (objc_read_char): (objc_read_unsigned_char): (objc_read_short): (objc_read_unsigned_short): (objc_read_int): (objc_read_long): (__objc_read_nbyte_uint): (objc_read_unsigned_int): (objc_read_unsigned_long): * objc/objc-decls.h (obc_EXPORT): Remove dllexport for DLL_EXPORT case. (objc_EXPORT): Likewise. * objc/message.h (objc-decls.h): Add include. * objc/objc-api.h: Mark API by objc_EXPORT. * libobjc.def (__objc_responds_to): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164632 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-18In libobjc/:nicola
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164389 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-17In libobjc/:nicola
* 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164373 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-12In libobjc/:nicola
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164223 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-11In libobjc/:nicola
* objc/objc.h (__GNU_LIBOBJC__): New #define providing an easy way to check the API version. Added some comments. * objc-private/common.h: New file. * NXConstStr.m: Include objc-private/common.h. * Object.m: Same change. * Protocol.m: Same change. * archive.c: Same change. * class.c: Same change. * encoding.c: Same change. * exception.c: Same change. * gc.c: Same change. * hash.c: Same change. * init.c: Same change. * libobjc_entry.c: Same change. * linking.m: Same change. * misc.c: Same change (and added a comment). * nil_method.c: Same change. * objects.c: Same change. * sarray.c: Same change. * selector.c: Same change. * sendmsg.c: Same change. * thr.c: Same change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164218 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-11In libobjc/:nicola
* archive.c: Removed not needed includes. * class.c: Same change. * hash.c: Same change. * misc.c: Same change. * nil_method.c: Same change. * objects.c: Same change. * sarray.c: Same change. * sendmsg.c: Same change. * thr.c: Same change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164214 138bc75d-0d04-0410-961f-82ee72b054a4
2010-09-11In libobjc/:nicola
* objc/runtime.h: Moved to objc-private/runtime.h. Do not include all the objc/*.h files. * objc-private/runtime.h: New file. * archive.c: Include objc-private/runtime.h (and required objc/*.h files) instead of objc/runtime.h. * class.c: Same change. * hash.c: Same change. * init.c: Same change. * misc.c: Same change. * nil_method.c: Same change. * objects.c: Same change. * sarray.c: Same change. * selector.c: Same change. * sendmsg.c: Same change. * thr.c: Same change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164213 138bc75d-0d04-0410-961f-82ee72b054a4
2009-04-09Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145841 138bc75d-0d04-0410-961f-82ee72b054a4
2008-11-212008-11-21 Kai Tietz <kai.tietz@onevision.com>ktietz
* Object.m (errno): Replaced by errno.h include. (compare): Cast self to id to prevent warning on comparison. * objc/objc.h (BOOL): Prevent redeclaration of BOOL, if it is already there. * sendmsg.c (__objc_print_dtable_stats): Remove type warnings. * thr-win32.c (__objc_thread_detach): Remove type warning. (__objc_thread_id): Likewise. * thr.c (__objc_thread_detach_functiont): Add __builtin_trap () for noreturn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142087 138bc75d-0d04-0410-961f-82ee72b054a4
2008-06-102008-06-10 Kai Tietz <kai.tietz@onevision.com>ktietz
* Object.m (compare): Add type id. * objc/Object.h: Likewise. * archive.c (objc_read_class): Use size_t to extend version to be size of pointer scalar width. * sendmsg.c (rtx): Undefine it before redefinition. (__objc_print_dtable_stats): Cast arguments to long as intended. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136617 138bc75d-0d04-0410-961f-82ee72b054a4
2007-04-222007-04-21 Andrew Ruder <andy@aeruder.net>pinskia
* sendmsg.c (__objc_get_forward_imp): Call __objc_msg_forward2 for real. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124035 138bc75d-0d04-0410-961f-82ee72b054a4
2007-04-092007-04-09 Andrew Ruder <andy@aeruder.net>pinskia
* sendmsg.c: Added __objc_msg_forward2, a hook that allows external libraries to provide a function that returns the real forwarding function based on both the selector and the receiver. * objc/objc-api.h: Define __objc_msg_forward2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123678 138bc75d-0d04-0410-961f-82ee72b054a4
2005-08-172005-08-17 Kelley Cook <kcook@gcc.gnu.org>kcook
* All files: Update FSF address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103197 138bc75d-0d04-0410-961f-82ee72b054a4
2005-06-072005-06-07 David Ayers <d.ayers@inode.at>ayers
* archive.c, init.c, selector.c: Include hash.h. * archive.c, class.c, encoding.c, gc.c, hash.c, hash_compat.c, init.c, misc.c, nil_method.c, objects.c, sarray.c, selector.c, sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c, thr-mach.c, thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c, thr-rtems.c, thr-single.c, thr-solaris.c, thr-vxworks.c, thr-win32.c, thr.c: Include Objective-C headers with quotes and objc/ directory prefix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100723 138bc75d-0d04-0410-961f-82ee72b054a4
2004-05-252004-05-25 Andrew Pinski <pinskia@physics.uc.edu>pinskia
Merge from the libobjc-branch 2004-02-09 Andrew Pinski <pinskia@physics.uc.edu> * Makefile.in (OBJC_H): Change objc-deps.h to objc-decls.h. 2004-02-03 Andrew Pinski <pinskia@physics.uc.edu> * Makefile.in (OBJC_H): Add objc-deps.h. 2004-01-27 Nicola Pero <n.pero@mi.flashnet.it> * Protocol.m ([-conformsTo:]): If the argument is nil, return NO. ([-hash], [-isEqual:]): New methods. 2004-01-27 Richard Frith-Macdonald <rfm@gnu.org> * sarray.c (sarray_free): Add a better comment. 2004-01-27 Adam Fedor <fedor@gnu.org> * hash.c (hash_add): Cast cachep to int. * selector.c (__sel_register_typed_name): Cast soffset_decode to int. 2004-01-27 Alexander Malmberg <alexander@malmberg.org> * selector.c: Rename register_selectors_from_list to __objc_register_selectors_from_list. Update caller. (__objc_register_selectors_from_list): Lock __objc_runtime_mutex while registering selectors. Use __sel_register_typed_name instead of sel_register_typed_name. Check for NULL method_name:s. (pool_alloc_selector): New function. (__sel_register_typed_name): Use pool_alloc_selector to allocate selector structures. * sendmsg.c (class_add_method_list): Use __objc_register_selectors_from_list. * objc/runtime.h: Add __objc_register_selectors_from_list. 2004-01-25 Adam Fedor <fedor@gnu.org> Nicola Pero <n.pero@mi.flashnet.it> Andrew Pinski <pinskia@physics.uc.edu> * objc/objc-decls.h: New file. * objc/objc-api.h (_objc_lookup_class): Mark as export. (_objc_load_callback): Likewise. (_objc_object_alloc): Likewise. (_objc_object_copy): Likewise. (_objc_object_dispose): Likewise. 2004-01-25 Andrew Pinski <pinskia@physics.uc.edu> * archive.c: s/__inline__/inline * sendmsg.c: Likewise. * encoding.c: Remove FIXME about the warning about unused variable. * sendmsg.c: Add a FIXME comment saying that this should be using libffi. * Makefile.in (LIBTOOL): Use @LIBTOOL@ now as it works. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82253 138bc75d-0d04-0410-961f-82ee72b054a4
2003-07-10Fixed rare threading problemnicola
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69181 138bc75d-0d04-0410-961f-82ee72b054a4
2003-05-23 * hash.c, init.c, libobjc.def, libobjc_entry.c, linking.m,neroden
makefile.dos, misc.c, nil_method.c, objects.c, sarray.c, selector.c, sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c, thr-mach.c, thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c, thr-rtems.c, thr-single.c, thr-solaris.c, thr-vxworks.c, thr-win32.c, thr.c: Replace "GNU CC" with "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67134 138bc75d-0d04-0410-961f-82ee72b054a4
2002-12-16Merge basic-improvements-branch to trunkzack
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4