aboutsummaryrefslogtreecommitdiff
path: root/libobjc/ivars.c
AgeCommit message (Collapse)AuthorFilesLines
2010-12-24In libobjc/: 2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-1/+2
In libobjc/: 2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com> * objc/runtime.h (class_addIvar): Updated documentation. The alignment is actually the log_2 of the alignment in bytes. * ivars.c (class_addIvar): Corresponding change to the implementation. In gcc/testsuite/: 2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/gnu-api-2-class.m: Updated test to pass log_2 of the alignment to class_addIvar, instead of the alignment itself. * obj-c++.dg/gnu-api-2-class.mm: Same change. From-SVN: r168230
2010-12-18In libobjc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-13/+5
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-15In libobjc/: 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-1/+1
In libobjc/: 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com> * ivars.c (class_addIvar): Use the 'size' argument instead of trying to calculate it using objc_sizeof_type(). * objc/runtime.h (class_addIvar): Updated comments. From-SVN: r167837
2010-11-18ivars.c: Include stdlib.h.Nicola Pero1-1/+2
2010-11-18 Nicola Pero <nicola.pero@meta-innovation.com> * ivars.c: Include stdlib.h. * protocols.c: Same change. From-SVN: r166895
2010-10-16In libobjc/: 2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-17/+90
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
2010-10-16class.c (class_getSuperclass): Call __objc_resolve_class_links if the class ↵Nicola Pero1-1/+1
is not resolved yet. 2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com> * class.c (class_getSuperclass): Call __objc_resolve_class_links if the class is not resolved yet. * ivars.c (class_getInstanceVariable): Use class_getSuperclass. From-SVN: r165542
2010-10-16In libobjc/: 2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-0/+26
In libobjc/: 2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com> * objc/runtime.h (class_getIvarLayout): New. (class_getWeakIvarLayout): New. (class_setIvarLayout): New. (class_setWeakIvarLayout): New. * ivars.c (class_getIvarLayout): New. (class_getWeakIvarLayout): New. (class_setIvarLayout): New. (class_setWeakIvarLayout): New. From-SVN: r165533
2010-10-15In libobjc/: 2010-10-15 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-0/+53
In libobjc/: 2010-10-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc/runtime.h (class_copyPropertyList): New. (class_getProperty): New. (property_getAttributes): New. (property_getName): New. * ivars.c (class_copyPropertyList): New. (class_getProperty): New. (property_getAttributes): New. (property_getName): New. From-SVN: r165531
2010-10-12Makefile.in (C_SOURCE_FILES): Added methods.c.Nicola Pero1-2/+61
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-12In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-0/+19
In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com> * class.c: Include objc/runtime.h and objc-private/module-abi-8.h instead of objc/objc-api.h. (objc_get_unknown_class_handler): Do not define. (class_isMetaClass): New. (class_getSuperclass): New. (class_getVersion): New. (class_setVersion): New. (class_getInstanceSize): New. * exceptions.c: Include objc/runtime.h instead of objc/objc-api.h. (is_kind_of_exception_matcher): Use objc_getSuperclass instead of objc_get_super_class. (get_ttype_entry): Use objc_getRequiredClass instead of objc_get_class. * ivars.c (class_getClassVariable): New. * objects.c: Include objc/runtime.h, objc/thr.h and objc-private/module-abi-8.h instead of objc/objc-api.h * objc/runtime.h (class_getClassVariable): New. (class_isMetaClass): New. (class_getSuperclass): New. (class_getVersion): New. (class_setVersion): New. (class_getInstanceSize): New. * objc-private/module-abi-8.h (HOST_BITS_PER_LONG): New (from objc/objc-api.h) (__CLS_INFO): Same. (__CLS_ISINFO): Same. (__CLS_SETINFO): Same. (CLS_ISMETA): Same. (CLS_ISCLASS): Same. (CLS_ISRESOLV): Same. (CLS_SETRESOLV): Same. (CLS_ISINITIALIZED): Same. (CLS_SETINITIALIZED): Same. (CLS_GETNUMBER): Same. (CLS_SETNUMBER): Same. From-SVN: r165392
2010-10-12archive.c: Do not include objc/objc.h.Nicola Pero1-2/+3
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-11In libobjc/: 2010-10-11 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-0/+151
In libobjc/: 2010-10-11 Nicola Pero <nicola.pero@meta-innovation.com> * Makefile.in (C_SOURCE_FILES): Added ivars.c. * ivars.c: New. * objc/objc.h: Updated comments. * objc/runtime.h (object_getClass): New. (object_getClassName): New. (object_setClass): New. (class_getInstanceVariable): New. (object_getIndexedIvars): New. (object_getInstanceVariable): New. (object_setInstanceVariable): New. (object_getIvar): New. (object_setIvar): New. (ivar_getName): New. (ivar_getOffset): New. (ivar_getTypeEncoding): New. * objc-private/module-abi-8.h (struct objc_class): Added. * objects.c (object_getClassName): New. (object_setClass): New. From-SVN: r165269