summaryrefslogtreecommitdiff
path: root/libobjc/sendmsg.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright years.Jakub Jelinek2023-01-161-1/+1
|
* Update copyright years.Jakub Jelinek2022-01-031-1/+1
|
* Update copyright years.Jakub Jelinek2021-01-041-1/+1
|
* Update copyright years.Jakub Jelinek2020-01-011-1/+1
| | | | From-SVN: r279813
* PR other/16615 [1/5]Sandra Loosemore2019-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 [1/5] contrib/ * mklog: Mechanically replace "can not" with "cannot". gcc/ * Makefile.in: Mechanically replace "can not" with "cannot". * alias.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * common/config/i386/i386-common.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/sync.md: Likewise. * config/arc/arc.c: Likewise. * config/arc/predicates.md: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm.h: Likewise. * config/arm/arm.md: Likewise. * config/arm/cortex-r4f.md: Likewise. * config/csky/csky.c: Likewise. * config/csky/csky.h: Likewise. * config/darwin-f.c: Likewise. * config/epiphany/epiphany.md: Likewise. * config/i386/i386.c: Likewise. * config/i386/sol2.h: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.h: Likewise. * config/microblaze/microblaze.md: Likewise. * config/mips/20kc.md: Likewise. * config/mips/sb1.md: Likewise. * config/nds32/nds32.c: Likewise. * config/nds32/predicates.md: Likewise. * config/pa/pa.c: Likewise. * config/rs6000/e300c2c3.md: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.h: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh.md: Likewise. * config/spu/vmx2spu.h: Likewise. * cprop.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * doc/cfg.texi: Likewise. * doc/extend.texi: Likewise. * doc/fragments.texi: Likewise. * doc/gty.texi: Likewise. * doc/invoke.texi: Likewise. * doc/lto.texi: Likewise. * doc/md.texi: Likewise. * doc/objc.texi: Likewise. * doc/rtl.texi: Likewise. * doc/tm.texi: Likewise. * dse.c: Likewise. * emit-rtl.c: Likewise. * emit-rtl.h: Likewise. * except.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * genautomata.c: Likewise. * gimple-fold.c: Likewise. * hard-reg-set.h: Likewise. * ifcvt.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-fnsummary.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * ira.h: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-streamer-out.c: Likewise. * postreload-gcse.c: Likewise. * predict.c: Likewise. * profile-count.h: Likewise. * profile.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * symtab.c: Likewise. * target.def: Likewise. * toplev.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-core.h: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nrv.c: Likewise. * tree-profile.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-phionlycprop.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssanames.c: Likewise. * tree-streamer-out.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * vr-values.c: Likewise. gcc/ada/ * exp_ch9.adb: Mechanically replace "can not" with "cannot". * libgnat/s-regpat.ads: Likewise. * par-ch4.adb: Likewise. * set_targ.adb: Likewise. * types.ads: Likewise. gcc/cp/ * cp-tree.h: Mechanically replace "can not" with "cannot". * parser.c: Likewise. * pt.c: Likewise. gcc/fortran/ * class.c: Mechanically replace "can not" with "cannot". * decl.c: Likewise. * expr.c: Likewise. * gfc-internals.texi: Likewise. * intrinsic.texi: Likewise. * invoke.texi: Likewise. * io.c: Likewise. * match.c: Likewise. * parse.c: Likewise. * primary.c: Likewise. * resolve.c: Likewise. * symbol.c: Likewise. * trans-array.c: Likewise. * trans-decl.c: Likewise. * trans-intrinsic.c: Likewise. * trans-stmt.c: Likewise. gcc/go/ * go-backend.c: Mechanically replace "can not" with "cannot". * go-gcc.cc: Likewise. gcc/lto/ * lto-partition.c: Mechanically replace "can not" with "cannot". * lto-symtab.c: Likewise. * lto.c: Likewise. gcc/objc/ * objc-act.c: Mechanically replace "can not" with "cannot". libbacktrace/ * backtrace.h: Mechanically replace "can not" with "cannot". libgcc/ * config/c6x/libunwind.S: Mechanically replace "can not" with "cannot". * config/tilepro/atomic.h: Likewise. * config/vxlib-tls.c: Likewise. * generic-morestack-thread.c: Likewise. * generic-morestack.c: Likewise. * mkmap-symver.awk: Likewise. libgfortran/ * caf/single.c: Mechanically replace "can not" with "cannot". * io/unit.c: Likewise. libobjc/ * class.c: Mechanically replace "can not" with "cannot". * objc/runtime.h: Likewise. * sendmsg.c: Likewise. liboffloadmic/ * include/coi/common/COIResult_common.h: Mechanically replace "can not" with "cannot". * include/coi/source/COIBuffer_source.h: Likewise. libstdc++-v3/ * include/ext/bitmap_allocator.h: Mechanically replace "can not" with "cannot". From-SVN: r267783
* Update copyright years.Jakub Jelinek2019-01-011-1/+1
| | | | From-SVN: r267494
* Update copyright years.Jakub Jelinek2018-01-031-1/+1
| | | | From-SVN: r256169
* Update copyright years.Jakub Jelinek2017-01-011-1/+1
| | | | From-SVN: r243994
* Update copyright years.Jakub Jelinek2016-01-041-1/+1
| | | | From-SVN: r232055
* stop including tm.h in sendmsg.cTrevor Saunders2015-09-121-2/+0
| | | | | | | | | | | libobjc/ChangeLog: 2015-09-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> PR libobjc/24775 * sendmsg.c (tm.h): Remove include. From-SVN: r227712
* remove unused defines from sendmsg.cTrevor Saunders2015-09-121-7/+0
| | | | | | | | | | | | | | 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. From-SVN: r227711
* remove STRUCT_VALUE macroTrevor Saunders2015-09-121-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. From-SVN: r227710
* sendmsg.c: Add prototypes for __objc_get_forward_imp and get_imp.Matthias Klose2015-01-271-0/+8
| | | | | | | | 2015-01-27 Matthias Klose <doko@ubuntu.com> * sendmsg.c: Add prototypes for __objc_get_forward_imp and get_imp. From-SVN: r220175
* Update copyright years.Jakub Jelinek2015-01-051-1/+1
| | | | From-SVN: r219188
* Update copyright years in libobjc/Richard Sandiford2014-01-021-1/+1
| | | | From-SVN: r206299
* Update copyright years in libobjc.Richard Sandiford2013-02-031-2/+1
| | | | From-SVN: r195693
* In libobjc/: 2011-10-08 Richard Frith-Macdonald <rfm@gnu.org> Nicola Pero ↵Nicola Pero2011-10-081-26/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <nicola.pero@meta-innovation.com> In libobjc/: 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. From-SVN: r179711
* In libobjc/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2011-06-071-25/+3
| | | | | | | | | | | In libobjc/: 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. From-SVN: r174775
* In libobjc/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2011-06-071-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* In libobjc/: 2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2011-06-031-3/+6
| | | | | | | | | | | In libobjc/: 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. From-SVN: r174607
* In libobjc/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2011-06-021-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In libobjc/: 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. From-SVN: r174587
* In libobjc/: 2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2011-05-261-132/+111
| | | | | | | | | | In libobjc/: 2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c: Reindented part of the file. No non-trivial changes in code. From-SVN: r174269
* In libobjc/: 2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2011-05-261-1/+1
| | | | | | | | | | In libobjc/: 2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (__objc_install_dtable_for_class): Use objc_getClass, not objc_lookupClass. From-SVN: r174268
* In libobjc/: 2011-05-25 Richard Frith-Macdonald <rfm@gnu.org> David Ayers ↵Richard Frith-Macdonald2011-05-251-205/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <ayers@fsfe.org> In libobjc/: 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. Co-Authored-By: David Ayers <ayers@fsfe.org> From-SVN: r174221
* In libobjc/: 2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-231-1/+19
| | | | | | | | | | | | | | | | | | | | In libobjc/: 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. From-SVN: r168215
* In gcc/testsuite/: 2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-231-0/+39
| | | | | | | | | | | | | | | | | In gcc/testsuite/: 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. From-SVN: r168199
* In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-191-1/+1
| | | | | | | | | | | | In libobjc/: 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. From-SVN: r168066
* In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-191-4/+0
| | | | | | | | | In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c (method_setImplementation): Do not declare. From-SVN: r168064
* In gcc/testsuite/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-191-5/+2
| | | | | | | | | | | In libobjc/: 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. From-SVN: r168058
* In gcc/testsuite/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* In libobjc/: 2010-12-16 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-161-13/+23
| | | | | | | | | | | | | | | | | | | | | | In libobjc/: 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. From-SVN: r167961
* In libobjc/: 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-151-1/+1
| | | | | | | | | | | | | | | In libobjc/: 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'. From-SVN: r167869
* sendmsg.c: Reindented some code and tidied up comments.Nicola Pero2010-12-151-133/+134
| | | | | | | | | 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c: Reindented some code and tidied up comments. No actual code changes. From-SVN: r167835
* In libobjc/: 2010-12-11 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-12-111-14/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | In libobjc/: 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. From-SVN: r167712
* In libobjc/: 2010-11-23 Richard Frith-Macdonald <rfm@gnu.org>Richard Frith-Macdonald2010-11-231-2/+7
| | | | | | | | | | | In libobjc/: 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. From-SVN: r167092
* In libobjc/: 2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-10-161-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In libobjc/: 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. From-SVN: r165563
* Makefile.in (C_SOURCE_FILES): Added methods.c.Nicola Pero2010-10-121-19/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* archive.c: Do not include objc/objc.h.Nicola Pero2010-10-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* In libobjc/: 2010-10-10 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2010-10-091-0/+7
| | | | | | | | | | | | | | | | | | | 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
* Reverted removing 'inline' from get_impNicola Pero2010-09-261-1/+1
| | | | From-SVN: r164636
* sendmsg.c (get_imp): Remove inline.Kai Tietz2010-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-09-26 Kai Tietz <kai.tietz@onevision.com> * 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. From-SVN: r164632
* In libobjc/:Nicola Pero2010-09-181-1/+2
| | | | | | | | | | | | | | | | | | | * 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
* In libobjc/:Nicola Pero2010-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* In libobjc/:Nicola Pero2010-09-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* In libobjc/:Nicola Pero2010-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. From-SVN: r164218
* In libobjc/:Nicola Pero2010-09-111-2/+0
| | | | | | | | | | | | | | * 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. From-SVN: r164214
* In libobjc/:Nicola Pero2010-09-111-1/+6
| | | | | | | | | | | | | | | | | | | | * 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. From-SVN: r164213
* Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.Jakub Jelinek2009-04-091-11/+10
| | | | From-SVN: r145841
* Object.m (errno): Replaced by errno.h include.Kai Tietz2008-11-211-3/+3
| | | | | | | | | | | | | | | | 2008-11-21 Kai Tietz <kai.tietz@onevision.com> * 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. From-SVN: r142087