Support for inlining methods that call/throw.
Mostly fixes here and there to make it working.
Change-Id: I1b535e895105d78b65634636d675b818551f783e
diff --git a/test/004-StackWalk/src/Main.java b/test/004-StackWalk/src/Main.java
index 1e2a91b..782f51d 100644
--- a/test/004-StackWalk/src/Main.java
+++ b/test/004-StackWalk/src/Main.java
@@ -2,9 +2,14 @@
public Main() {
}
- int f() {
+ int f() throws Exception {
g(1);
g(2);
+
+ // This loop currently defeats inlining of `f`.
+ for (int i = 0; i < 10; i++) {
+ Thread.sleep(0);
+ }
return 0;
}
@@ -86,7 +91,7 @@
System.loadLibrary("arttest");
}
- public static void main(String[] args) {
+ public static void main(String[] args) throws Exception {
Main st = new Main();
st.f();
}
diff --git a/test/004-StackWalk/stack_walk_jni.cc b/test/004-StackWalk/stack_walk_jni.cc
index c40de7e..97afe1c 100644
--- a/test/004-StackWalk/stack_walk_jni.cc
+++ b/test/004-StackWalk/stack_walk_jni.cc
@@ -45,11 +45,11 @@
if (m_name == "f") {
if (gJava_StackWalk_refmap_calls == 1) {
CHECK_EQ(1U, GetDexPc());
- CHECK_REGS(1);
+ CHECK_REGS(4);
} else {
CHECK_EQ(gJava_StackWalk_refmap_calls, 2);
CHECK_EQ(5U, GetDexPc());
- CHECK_REGS(1);
+ CHECK_REGS(4);
}
} else if (m_name == "g") {
if (gJava_StackWalk_refmap_calls == 1) {