Merged branch subtype-trunk into default.
[cacao.git] / src / vm / class.cpp
index ec8a9538bf336cf5b4036f90ea5999307c7edec9..698356d11566973010920c69af5720f75694445d 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "arch.h"
 
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
 #include "native/llni.h"
 
@@ -1471,12 +1471,16 @@ bool class_isanysubclass(classinfo *sub, classinfo *super)
                if (sub->flags & ACC_INTERFACE)
                        return (super == class_java_lang_Object);
 
-               linker_classrenumber_mutex->lock();
+#if USES_NEW_SUBTYPE
+               result = fast_subtype_check(sub->vftbl, super->vftbl);
+#else
+               LOCK_CLASSRENUMBER_LOCK;
 
                diffval = sub->vftbl->baseval - super->vftbl->baseval;
                result  = diffval <= (uint32_t) super->vftbl->diffval;
 
-               linker_classrenumber_mutex->unlock();
+               UNLOCK_CLASSRENUMBER_LOCK;
+#endif
        }
 
        return result;