[llvm-commits] [vmkit] r51541 - /vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat May 24 05:01:03 PDT 2008
Author: geoffray
Date: Sat May 24 07:00:46 2008
New Revision: 51541
URL: http://llvm.org/viewvc/llvm-project?rev=51541&view=rev
Log:
Make a test before tracing objects that are unlikely to exist.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51541&r1=51540&r2=51541&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Sat May 24 07:00:46 2008
@@ -72,20 +72,21 @@
void JavaArray::TRACER {
classOf->MARK_AND_TRACE;
- lockObj->MARK_AND_TRACE;
+ if (lockObj) lockObj->MARK_AND_TRACE;
}
void ArrayObject::TRACER {
classOf->MARK_AND_TRACE;
- lockObj->MARK_AND_TRACE;
+ if (lockObj) lockObj->MARK_AND_TRACE;
for (sint32 i = 0; i < size; i++) {
- elements[i]->MARK_AND_TRACE;
+ if (elements[i]) elements[i]->MARK_AND_TRACE;
}
}
#define ARRAYTRACER(name) \
void name::TRACER { \
- lockObj->MARK_AND_TRACE; \
+ if (lockObj) \
+ lockObj->MARK_AND_TRACE; \
}
@@ -152,7 +153,7 @@
void JavaObject::TRACER {
classOf->MARK_AND_TRACE;
- lockObj->MARK_AND_TRACE;
+ if (lockObj) lockObj->MARK_AND_TRACE;
}
#ifdef MULTIPLE_GC
@@ -161,7 +162,7 @@
extern "C" void JavaObjectTracer(JavaObject* obj) {
#endif
obj->classOf->MARK_AND_TRACE;
- obj->lockObj->MARK_AND_TRACE;
+ if (obj->lockObj) obj->lockObj->MARK_AND_TRACE;
}
@@ -169,7 +170,7 @@
javaThread->MARK_AND_TRACE;
// FIXME: do I need this?
isolate->MARK_AND_TRACE;
- pendingException->MARK_AND_TRACE;
+ if (pendingException) pendingException->MARK_AND_TRACE;
}
void Typedef::TRACER {
More information about the llvm-commits
mailing list