Small cleanups from last commit.

This commit is contained in:
theraven 2010-03-12 22:59:36 +00:00
parent 8ce32fd1c9
commit 0abdc2a574
4 changed files with 8 additions and 20 deletions

View File

@ -27,7 +27,7 @@ static void createNSBlockSubclass(Class superclass, Class newClass,
// Set up the new class
newClass->class_pointer = metaClass;
newClass->super_class = superclass->name;
newClass->super_class = (Class)superclass->name;
newClass->name = name;
newClass->info = _CLS_CLASS;
newClass->dtable = __objc_uninstalled_dtable;

View File

@ -66,7 +66,7 @@ void __objc_init_class_tables(void)
class_table = class_table_internal_create(16);
}
static void objc_resolve_class(Class cls)
void objc_resolve_class(Class cls)
{
// Skip this if the class is already resolved.
if (CLS_ISRESOLV(cls)) { return; }

View File

@ -856,7 +856,7 @@ const char *object_getClassName(id obj)
}
void __objc_add_class_to_hash(Class cls);
void __objc_resolve_class_links(void);
void objc_resolve_class(Class cls);
void objc_registerClassPair(Class cls)
{
@ -865,8 +865,8 @@ void objc_registerClassPair(Class cls)
__objc_update_dispatch_table_for_class(metaClass);
__objc_update_dispatch_table_for_class(cls);
__objc_add_class_to_hash(cls);
// Add pointer from super class
__objc_resolve_class_links();
objc_resolve_class(cls);
}
static id objectNew(id cls)

View File

@ -30,19 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc/encoding.h"
#include "lock.h"
/* This is how we hack STRUCT_VALUE to be 1 or 0. */
#define gen_rtx(args...) 1
#define gen_rtx_MEM(args...) 1
#define gen_rtx_REG(args...) 1
/* Alread defined in gcc/coretypes.h. So prevent double definition warning. */
#undef rtx
#define rtx int
#if ! defined (STRUCT_VALUE) || STRUCT_VALUE == 0
#define INVISIBLE_STRUCT_RETURN 1
#else
#define INVISIBLE_STRUCT_RETURN 0
#endif
void objc_resolve_class(Class);
/* The uninstalled dispatch table */
struct sarray *__objc_uninstalled_dtable = 0; /* !T:MUTEX */
@ -414,7 +402,7 @@ __objc_send_initialize (Class class)
* held so that we can create the premature dtable. */
LOCK(&initialize_lock);
if (! CLS_ISRESOLV (class))
__objc_resolve_class_links ();
objc_resolve_class(class);
/* Create the garbage collector type memory description */
@ -555,7 +543,7 @@ static struct sarray *create_dtable_for_class (Class class)
/* If the class has not yet had its class links resolved, we must
re-compute all class links */
if (! CLS_ISRESOLV (class))
__objc_resolve_class_links ();
objc_resolve_class(class);
super = class->super_class;