diff options
| author | 2014-03-12 01:02:21 -0700 | |
|---|---|---|
| committer | 2014-03-12 01:02:21 -0700 | |
| commit | 1a5706611bffa5d6ed6843ee5e320f504590e097 (patch) | |
| tree | 56aca131dbb86ce5c757baa61cf47968d978f14f /compiler | |
| parent | 37d4c1db4d705f5a28001f65afdd68d0527948d8 (diff) | |
A few 64bit fixes.
Change-Id: I1fe189d638b9cb5127b897da6cecdad6902db930
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/image_writer.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index f4b507a64a..8885652adc 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -639,14 +639,17 @@ void ImageWriter::FixupMethod(ArtMethod* orig, ArtMethod* copy) { (!orig->IsStatic() || orig->IsConstructor() || orig->GetDeclaringClass()->IsInitialized())) { // We have code for a non-static or initialized method, just use the code. copy->SetEntryPointFromQuickCompiledCode<kVerifyNone>(quick_code); - } else if (quick_code == nullptr && orig->IsNative() && !orig->IsStatic()) { - // Non-static native method missing compiled code, use generic JNI version. + } else if (quick_code == nullptr && orig->IsNative() && + (!orig->IsStatic() || orig->GetDeclaringClass()->IsInitialized())) { + // Non-static or initialized native method missing compiled code, use generic JNI version. copy->SetEntryPointFromQuickCompiledCode<kVerifyNone>(GetOatAddress(quick_generic_jni_trampoline_offset_)); } else if (quick_code == nullptr && !orig->IsNative()) { // We don't have code at all for a non-native method, use the interpreter. copy->SetEntryPointFromQuickCompiledCode<kVerifyNone>(GetOatAddress(quick_to_interpreter_bridge_offset_)); } else { - // We have code for a static method, but need to go through the resolution stub for class initialization. + CHECK(!orig->GetDeclaringClass()->IsInitialized()); + // We have code for a static method, but need to go through the resolution stub for class + // initialization. copy->SetEntryPointFromQuickCompiledCode<kVerifyNone>(GetOatAddress(quick_resolution_trampoline_offset_)); } const byte* portable_code = GetOatAddress(orig->GetPortableOatCodeOffset()); |