Complete static field accesses; clear TODO's
This adds the fast path for static field accesses. Miscellaneous
changes include adding dummy helper for filled array allocation,
elimination of redunant arg1/r1 load, deleting TODO's that I'm not
going to do, and altered compiler_test to use System.out.println
instead of System.out.printf.
Change-Id: I560aa6093c98f1d288d64f346c8fd9ab7f180994
diff --git a/src/thread.cc b/src/thread.cc
index 31786c9..a617fb4 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -106,6 +106,18 @@
*/
}
+// TODO: placeholder. Helper function to alloc array for OP_FILLED_NEW_ARRAY
+static Array* CheckAndAllocFromCode(uint32_t type_index, Method* method,
+ int32_t component_count)
+{
+ /*
+ * Just a wrapper around Array::AllocFromCode() that additionally
+ * throws a runtime exception "bad Filled array req" for 'D' and 'J'.
+ */
+ UNIMPLEMENTED(WARNING) << "Need check that not 'D' or 'J'";
+ return Array::AllocFromCode(type_index, method, component_count);
+}
+
void Thread::InitFunctionPointers() {
#if defined(__arm__)
pShlLong = art_shl_long;
@@ -137,6 +149,7 @@
pInvokeInterfaceTrampoline = art_invoke_interface_trampoline;
#endif
pAllocFromCode = Array::AllocFromCode;
+ pCheckAndAllocFromCode = CheckAndAllocFromCode;
pAllocObjectFromCode = Class::AllocObjectFromCode;
pMemcpy = memcpy;
pHandleFillArrayDataFromCode = HandleFillArrayDataFromCode;
@@ -150,6 +163,7 @@
pThrowException = ThrowException;
pInitializeTypeFromCode = InitializeTypeFromCode;
pResolveMethodFromCode = ResolveMethodFromCode;
+ pInitializeStaticStorage = ClassLinker::InitializeStaticStorageFromCode;
pDebugMe = DebugMe;
#if 0
bool (Thread::*pUnlockObject)(Thread*, Object*);