static s4 interfaceindex; /* sequential numbering of interfaces */
static s4 classvalue;
+#if !USES_NEW_SUBTYPE
+java_object_t *linker_classrenumber_lock;
+#endif
+
#if defined(__cplusplus)
extern "C" {
#endif
interfaceindex = 0;
+#if defined(ENABLE_THREADS) && !USES_NEW_SUBTYPE
+ /* create the global lock object */
+
+ linker_classrenumber_lock = NEW(java_object_t);
+
+ LOCK_INIT_OBJECT_LOCK(linker_classrenumber_lock);
+#endif
+
/* Link the most basic classes. */
if (!link_class(class_java_lang_Object))
*******************************************************************************/
+#if USES_NEW_SUBTYPE
static int build_display_inner(classinfo *topc, classinfo *c, int i)
{
int depth;
c->vftbl->subtype_display[i] = NULL;
}
}
+#endif
static classinfo *link_class_intern(classinfo *c)
{
/* FIXME: this is completely useless now */
RT_TIMING_GET_TIME(time_subclasses);
+#if USES_NEW_SUBTYPE
build_display(c);
+#endif
/* revert the linking state and class is linked */
static void linker_compute_subclasses(classinfo *c)
{
+ LOCK_CLASSRENUMBER_LOCK;
+
if (!(c->flags & ACC_INTERFACE)) {
c->nextsub = NULL;
c->sub = NULL;
+#if USES_NEW_SUBTYPE
c->vftbl->baseval = 1; /* so it does not look like an interface */
+#endif
}
if (!(c->flags & ACC_INTERFACE) && (c->super != NULL)) {
classvalue = 0;
+#if !USES_NEW_SUBTYPE
+ /* compute class values */
+
+ linker_compute_class_values(class_java_lang_Object);
+#endif
+
+ UNLOCK_CLASSRENUMBER_LOCK;
+
}