Use slow-path static field accessors; added tests
Modified the compiler to always take the slow path for static
field accesses. Still need to implement the fast path, but this
allows us to test the slow path now.
It's also about time we added command-line (or other) options for
compiler control. We'll want to have a testing option to force slow
paths for testing, and also an option to control the compiler's
debug output (which is starting to get annoying).
Change-Id: I9c1bc6faea0042894270d242366c688f1662842b
diff --git a/src/compiler_test.cc b/src/compiler_test.cc
index 694a85a..ca357f2 100644
--- a/src/compiler_test.cc
+++ b/src/compiler_test.cc
@@ -114,6 +114,12 @@
10);
}
+TEST_F(CompilerTest, StaticFieldTest) {
+ CompileDex(kIntMathDex, "kIntMathDex");
+ AssertStaticIntMethod("IntMath", "staticFieldTest", "(I)I", 1404,
+ 404);
+}
+
TEST_F(CompilerTest, UnopTest) {
CompileDex(kIntMathDex, "kIntMathDex");
AssertStaticIntMethod("IntMath", "unopTest", "(I)I", 37,