From: Nicola Pero Date: Fri, 3 Jun 2011 19:15:23 +0000 (+0000) Subject: In libobjc/: 2011-06-03 Nicola Pero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=309ce401bcbab1b68e4c15e5130cf84bc7ec0e66;p=gcc.git In libobjc/: 2011-06-03 Nicola Pero In libobjc/: 2011-06-03 Nicola Pero * Makefile.in (OBJC_DEPRECATED_H): Removed objc_valloc.h, objc_malloc.h and objc_unexpected_exception.h. (exception.lo): Do not use -Wno-deprecated-declarations. (exception_gc.lo): Likewise. * objc/objc-api.h: Do not include deprecated/objc_valloc.h, deprecated/objc_malloc.h and deprecated/objc_unexpected_exception.h. * objc/deprecated/objc_valloc.h: Removed. * objc/deprecated/objc_malloc.h: Removed. * objc/deprecated/objc_unexpected_exception.h: Removed. * exception.c (_objc_unexpected_exception): Removed. (objc_exception_throw): Do not check for _objc_unexpected_exception. * memory.c (objc_valloc, _objc_malloc, _objc_atomic_malloc, _objc_valloc, _objc_realloc, _objc_calloc, _objc_free): Removed. * libobjc.def (_objc_unexpected_exception, objc_valloc): Removed. From-SVN: r174615 --- diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index e197762cb92..735e0644bf5 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,22 @@ +2011-06-03 Nicola Pero + + * Makefile.in (OBJC_DEPRECATED_H): Removed objc_valloc.h, + objc_malloc.h and objc_unexpected_exception.h. + (exception.lo): Do not use -Wno-deprecated-declarations. + (exception_gc.lo): Likewise. + * objc/objc-api.h: Do not include deprecated/objc_valloc.h, + deprecated/objc_malloc.h and + deprecated/objc_unexpected_exception.h. + * objc/deprecated/objc_valloc.h: Removed. + * objc/deprecated/objc_malloc.h: Removed. + * objc/deprecated/objc_unexpected_exception.h: Removed. + * exception.c (_objc_unexpected_exception): Removed. + (objc_exception_throw): Do not check for + _objc_unexpected_exception. + * memory.c (objc_valloc, _objc_malloc, _objc_atomic_malloc, + _objc_valloc, _objc_realloc, _objc_calloc, _objc_free): Removed. + * libobjc.def (_objc_unexpected_exception, objc_valloc): Removed. + 2011-06-03 Nicola Pero * objc/objc.h: Do not include deprecated/STR.h. diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in index e91fff716a1..1d021e8b91f 100644 --- a/libobjc/Makefile.in +++ b/libobjc/Makefile.in @@ -132,11 +132,8 @@ OBJC_DEPRECATED_H = \ Object.h \ Protocol.h \ objc_get_uninstalled_dtable.h \ - objc_malloc.h \ objc_msg_sendv.h \ objc_object_alloc.h \ - objc_unexpected_exception.h \ - objc_valloc.h \ struct_objc_category.h \ struct_objc_class.h \ struct_objc_ivar.h \ @@ -268,16 +265,14 @@ sendmsg_gc.lo: sendmsg.c runtime-info.h # These files have separate rules because they require special # compiler flags. -# -Wno-deprecated-declarations is to silence warnings from using -# _objc_unexpected_exception. exception.lo: exception.c $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) -fexceptions -Wno-deprecated-declarations \ + $(ALL_CFLAGS) $(INCLUDES) -fexceptions \ -o $@ exception_gc.lo: exception.c $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fexceptions -Wno-deprecated-declarations \ + $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fexceptions \ -o $@ doc: info dvi pdf html diff --git a/libobjc/exception.c b/libobjc/exception.c index 1ffb80b5352..37daed8f30c 100644 --- a/libobjc/exception.c +++ b/libobjc/exception.c @@ -31,12 +31,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "unwind-pe.h" #include /* For memcpy */ -/* This hook allows libraries to sepecify special actions when an - exception is thrown without a handler in place. This is deprecated - in favour of objc_set_uncaught_exception_handler (). */ -void (*_objc_unexpected_exception) (id exception); /* !T:SAFE */ - - /* 'is_kind_of_exception_matcher' is our default exception matcher - it determines if the object 'exception' is of class 'catch_class', or of a subclass. */ @@ -539,13 +533,6 @@ objc_exception_throw (id exception) (*__objc_uncaught_exception_handler) (exception); } - /* As a last resort support the old, deprecated way of setting an - uncaught exception handler. */ - if (_objc_unexpected_exception != 0) - { - (*_objc_unexpected_exception) (exception); - } - abort (); } diff --git a/libobjc/libobjc.def b/libobjc/libobjc.def index a478f76665f..b825e4e3831 100644 --- a/libobjc/libobjc.def +++ b/libobjc/libobjc.def @@ -26,7 +26,6 @@ objc_get_uninstalled_dtable _objc_load_callback objc_malloc objc_atomic_malloc -objc_valloc objc_realloc objc_calloc objc_free @@ -36,7 +35,6 @@ objc_mutex_deallocate objc_mutex_lock objc_mutex_trylock objc_mutex_unlock -_objc_unexpected_exception objc_thread_detach objc_thread_exit objc_thread_get_data diff --git a/libobjc/memory.c b/libobjc/memory.c index b0519fc87a1..c02176ef874 100644 --- a/libobjc/memory.c +++ b/libobjc/memory.c @@ -133,38 +133,3 @@ objc_free (void *mem) } #endif /* !OBJC_WITH_GC */ - -/* The rest of the file contains deprecated code. */ - -#if OBJC_WITH_GC - -void * -objc_valloc (size_t size) -{ - void *res = (void *)(GC_malloc (size)); - if (! res) - _objc_abort ("Virtual memory exhausted\n"); - return res; -} - -#else - -void * -objc_valloc (size_t size) -{ - void *res = (void *)(malloc (size)); - if (! res) - _objc_abort ("Virtual memory exhausted\n"); - return res; -} - -#endif /* !OBJC_WITH_GC */ - -/* Hook functions for memory allocation and disposal. Deprecated and - currently unused. */ -void *(*_objc_malloc) (size_t) = malloc; -void *(*_objc_atomic_malloc) (size_t) = malloc; -void *(*_objc_valloc) (size_t) = malloc; -void *(*_objc_realloc) (void *, size_t) = realloc; -void *(*_objc_calloc) (size_t, size_t) = calloc; -void (*_objc_free) (void *) = free; diff --git a/libobjc/objc/deprecated/objc_malloc.h b/libobjc/objc/deprecated/objc_malloc.h deleted file mode 100644 index cf6c6e9d092..00000000000 --- a/libobjc/objc/deprecated/objc_malloc.h +++ /dev/null @@ -1,17 +0,0 @@ -/* -** Hook functions for memory allocation and disposal. -** This makes it easy to substitute garbage collection systems -** such as Boehm's GC by assigning these function pointers -** to the GC's allocation routines. By default these point -** to the ANSI standard malloc, realloc, free, etc. -** -** Users should call the normal objc routines above for -** memory allocation and disposal within their programs. -*/ -objc_EXPORT void *(*_objc_malloc)(size_t); -objc_EXPORT void *(*_objc_atomic_malloc)(size_t); -objc_EXPORT void *(*_objc_valloc)(size_t); -objc_EXPORT void *(*_objc_realloc)(void *, size_t); -objc_EXPORT void *(*_objc_calloc)(size_t, size_t); -objc_EXPORT void (*_objc_free)(void *); - diff --git a/libobjc/objc/deprecated/objc_unexpected_exception.h b/libobjc/objc/deprecated/objc_unexpected_exception.h deleted file mode 100644 index 69ffd4e87da..00000000000 --- a/libobjc/objc/deprecated/objc_unexpected_exception.h +++ /dev/null @@ -1,9 +0,0 @@ -/* -** Hook for uncaught exceptions. This hook is called when an -** exception is thrown and no valid exception handler is in place. -** The function is expected never to return. If the function returns -** the result is currently undefined. This is deprecated. Please use -** objc_set_uncaught_exception_handler() from objc/objc-exception.h -** instead. -*/ -objc_EXPORT void (*_objc_unexpected_exception)(id) __attribute__ ((deprecated)); diff --git a/libobjc/objc/deprecated/objc_valloc.h b/libobjc/objc/deprecated/objc_valloc.h deleted file mode 100644 index a715f1a7330..00000000000 --- a/libobjc/objc/deprecated/objc_valloc.h +++ /dev/null @@ -1,2 +0,0 @@ -void * -objc_valloc(size_t size); diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h index 411f4b2aaea..f0734d76e48 100644 --- a/libobjc/objc/objc-api.h +++ b/libobjc/objc/objc-api.h @@ -218,11 +218,6 @@ objc_calloc(size_t nelem, size_t size); objc_EXPORT void objc_free(void *mem); -#include "deprecated/objc_valloc.h" -#include "deprecated/objc_malloc.h" - -#include "deprecated/objc_unexpected_exception.h" - objc_EXPORT Method_t class_get_class_method(MetaClass _class, SEL aSel); objc_EXPORT Method_t class_get_instance_method(Class _class, SEL aSel);