Slow ART.
Run ART with the interpreter for all but boot.oat code.
Change-Id: I1654ecff6769a6c754f713be7580717d5ce07dc1
diff --git a/src/oat/runtime/support_interpreter.cc b/src/oat/runtime/support_interpreter.cc
index 7f413c3..ada19a3 100644
--- a/src/oat/runtime/support_interpreter.cc
+++ b/src/oat/runtime/support_interpreter.cc
@@ -20,8 +20,8 @@
#include "interpreter/interpreter.h"
#include "mirror/abstract_method-inl.h"
#include "mirror/class-inl.h"
-#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
+#include "mirror/object_array-inl.h"
#include "object_utils.h"
namespace art {
@@ -43,6 +43,7 @@
} else {
sf_.SetVRegLong(cur_reg_, *reinterpret_cast<jlong*>(GetParamAddress()));
}
+ ++cur_reg_;
break;
case Primitive::kPrimNot:
sf_.SetVRegReference(cur_reg_, *reinterpret_cast<mirror::Object**>(GetParamAddress()));
@@ -90,6 +91,16 @@
self->PushManagedStackFragment(&fragment);
self->PushShadowFrame(shadow_frame.get());
self->EndAssertNoThreadSuspension(old_cause);
+
+ if (method->IsStatic() && !method->GetDeclaringClass()->IsInitializing()) {
+ // Ensure static method's class is initialized.
+ if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(method->GetDeclaringClass(),
+ true, true)) {
+ DCHECK(Thread::Current()->IsExceptionPending());
+ return 0;
+ }
+ }
+
JValue result = interpreter::EnterInterpreterFromStub(self, mh, code_item, *shadow_frame.get());
// Pop transition.
self->PopManagedStackFragment(fragment);