mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-13 05:59:55 +08:00
In libobjc/: 2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> * 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
This commit is contained in:
parent
4f570b66f1
commit
309ce401bc
@ -1,3 +1,22 @@
|
||||
2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* 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 <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc/objc.h: Do not include deprecated/STR.h.
|
||||
|
@ -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
|
||||
|
@ -31,12 +31,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#include "unwind-pe.h"
|
||||
#include <string.h> /* 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 ();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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 *);
|
||||
|
@ -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));
|
@ -1,2 +0,0 @@
|
||||
void *
|
||||
objc_valloc(size_t size);
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user