Handle OOMEs in class linker with grace.
Check for OOMEs and then fail due to them in class loading.
Make the compiler driver spot OOMEs during resolution and abort compilation to
avoid needless GC thrash then eventual death.
Allocate the pre-allocated OOME during Runtime::Init as Runtime::Start isn't
called in the context of the compiler/tools.
Change-Id: Id72199d0fe82001b5bf22758b3cdc9cc4b8efbb9
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index 28a91dd..efaa183 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -79,10 +79,10 @@
Object* Clone(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
int32_t IdentityHashCode() const {
- #ifdef MOVING_GARBAGE_COLLECTOR
+#ifdef MOVING_GARBAGE_COLLECTOR
// TODO: we'll need to use the Object's internal concept of identity
- UNIMPLEMENTED(FATAL);
- #endif
+ UNIMPLEMENTED(FATAL);
+#endif
return reinterpret_cast<int32_t>(this);
}