Add an abstraction over a compiled code.
That's just step 1, moving code-related functions of ArtMethod to
another class. That class is only a wrapper on an ArtMethod, but will
be changed to be a wrapper around compiled code.
Change-Id: I6f35fc06d37220558dff61691e51ae20066b0dd6
diff --git a/test/457-regs/regs_jni.cc b/test/457-regs/regs_jni.cc
index c21168b..6fcebdb 100644
--- a/test/457-regs/regs_jni.cc
+++ b/test/457-regs/regs_jni.cc
@@ -15,6 +15,7 @@
*/
#include "arch/context.h"
+#include "art_code.h"
#include "art_method-inl.h"
#include "jni.h"
#include "scoped_thread_state_change.h"
@@ -63,7 +64,9 @@
CHECK_EQ(value, 1u);
bool success = GetVReg(m, 2, kIntVReg, &value);
- if (m->IsOptimized(sizeof(void*))) CHECK(!success);
+ if (!IsCurrentFrameInInterpreter() && GetCurrentCode().IsOptimized(sizeof(void*))) {
+ CHECK(!success);
+ }
CHECK(GetVReg(m, 3, kReferenceVReg, &value));
CHECK_EQ(value, 1u);