aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKresten Krab Thorup <krab@gcc.gnu.org>1993-05-05 15:52:00 +0000
committerKresten Krab Thorup <krab@gcc.gnu.org>1993-05-05 15:52:00 +0000
commit90a0448559cf57a0cc464b19646afa228b069a50 (patch)
tree4e271cb7eea35b03d3cc54c6b8aeacc39b6fdfc9
parent6731a3e3a0a29ce66cc04e00526562246b80f16a (diff)
downloadgcc-90a0448559cf57a0cc464b19646afa228b069a50.zip
gcc-90a0448559cf57a0cc464b19646afa228b069a50.tar.gz
gcc-90a0448559cf57a0cc464b19646afa228b069a50.tar.bz2
undid freed+error patch
From-SVN: r4336
-rw-r--r--gcc/objc/Makefile.in4
-rw-r--r--gcc/objc/Object.h1
-rw-r--r--gcc/objc/Object.m11
-rw-r--r--gcc/objc/misc.c44
4 files changed, 2 insertions, 58 deletions
diff --git a/gcc/objc/Makefile.in b/gcc/objc/Makefile.in
index 867e96b..66c2029 100644
--- a/gcc/objc/Makefile.in
+++ b/gcc/objc/Makefile.in
@@ -53,7 +53,7 @@ all:
cd ..; $(MAKE) sublibobjc.a
OBJC_O = hash.o sarray.o class.o sendmsg.o init.o archive.o \
- selector.o objects.o misc.o Object.o Protocol.o FREED.o
+ selector.o objects.o misc.o Object.o Protocol.o
libobjc.a: $(OBJC_O)
-rm -f libobjc.a
@@ -61,7 +61,7 @@ libobjc.a: $(OBJC_O)
# ranlib is run in the parent directory's makefile.
OBJC_H = hash.h list.h sarray.h objc.h \
- objc-api.h error.h \
+ objc-api.h \
Object.h Protocol.h mutex.h \
typedstream.h
diff --git a/gcc/objc/Object.h b/gcc/objc/Object.h
index b55a653..917fed5 100644
--- a/gcc/objc/Object.h
+++ b/gcc/objc/Object.h
@@ -102,7 +102,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Enforcing intentions */
- subclassResponsibility:(SEL)aSel;
- notImplemented:(SEL)aSel;
-- shouldNotImplement:(SEL)aSel;
/* Error handling */
- doesNotRecognize:(SEL)aSel;
diff --git a/gcc/objc/Object.m b/gcc/objc/Object.m
index e6c90ec..79bbdd8 100644
--- a/gcc/objc/Object.m
+++ b/gcc/objc/Object.m
@@ -27,8 +27,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "objc/Protocol.h"
#include "objc/objc-api.h"
-@class FREED;
-
#include "gstdarg.h"
extern void (*_objc_error)(id object, const char *format, va_list);
@@ -60,10 +58,6 @@ extern int errno;
- free
{
- static Class* freedClass = 0;
- if (!freedClass)
- freedClass = [FREED class];
- isa = freedClass;
return object_dispose(self);
}
@@ -299,11 +293,6 @@ extern int errno;
object_get_class_name(self), sel_get_name(aSel)];
}
-- shouldNotImplement
-{
- return [self error:"should not implement %s", sel_get_name(aSel)];
-}
-
- error:(const char *)aString, ...
{
#define FMT "error: %s (%s)\n%s\n"
diff --git a/gcc/objc/misc.c b/gcc/objc/misc.c
index ec42c2c..6b6b342 100644
--- a/gcc/objc/misc.c
+++ b/gcc/objc/misc.c
@@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License along with
covered by the GNU General Public License. */
#include "runtime.h"
-#include "error.h"
void objc_error(id object, const char* fmt, va_list);
@@ -71,46 +70,3 @@ __objc_xcalloc(size_t nelem, size_t size)
objc_fatal("Virtual memory exhausted\n");
return res;
}
-
-struct objc_ex_handler __ex_base_handler = {0, 0, 0, 0, 0 };
-struct objc_ex_handler* __ex_last_handler = &__ex_base_handler;
-
-objc_uncaught_exception_handler _objc_uncaught_exception_handler = 0;
-
-void
-__objc_add_handler(struct objc_ex_handler* hdlr)
-{
- hdlr->ex_prev = __ex_last_handler;
- __ex_last_handler = hdlr;
-}
-
-void
-__objc_remove_handler(struct objc_ex_handler* hdlr)
-{
- __ex_last_handler = hdlr->ex_prev;
-}
-
-#ifndef __STRICT_ANSI__
-__volatile
-#endif
-extern void __objc_raise_error(int code, const void* data1, const void* data2)
-{
- if (__ex_last_handler->ex_prev)
- {
- __ex_last_handler->code = code;
- __ex_last_handler->data1 = data1;
- __ex_last_handler->data2 = data2;
- longjmp (__ex_last_handler->ex_env, 1);
- }
- else
- {
- if (_objc_uncaught_exception_handler)
- (*_objc_uncaught_exception_handler)(code, data1, data2);
- else
- {
- printf ("uncaught exception: code=%d, data1=%x, data2=%x\n",
- code, data1, data2);
- abort();
- }
- }
-}