Complete direct, static & virtual invoke
Reworked direct/static invoke to use code_and_method_ structure. Removed
slow/fast path distinction for direct/static (because there is only
a single path). Added fast and reworked slow path for virtual invokes.
Change-Id: I037aee26b63244d03ac2bd8720d8c55e256b9b4d
diff --git a/src/thread.cc b/src/thread.cc
index c0e986c..aa24bec 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -58,6 +58,18 @@
return NULL;
}
+// TODO: placeholder. Helper function to resolve virtual method
+static void ResolveMethodFromCode(Method* method, uint32_t method_idx) {
+ /*
+ * Slow-path handler on invoke virtual method path in which
+ * base method is unresolved at compile-time. Doesn't need to
+ * return anything - just either ensure that
+ * method->dex_cache_resolved_methods_(method_idx) != NULL or
+ * throw and unwind. The caller will restart call sequence
+ * from the beginning.
+ */
+}
+
void Thread::InitFunctionPointers() {
#if defined(__arm__)
pShlLong = art_shl_long;
@@ -100,6 +112,7 @@
pCanPutArrayElementFromCode = Class::CanPutArrayElementFromCode;
pThrowException = ThrowException;
pInitializeTypeFromCode = InitializeTypeFromCode;
+ pResolveMethodFromCode = ResolveMethodFromCode;
#if 0
bool (Thread::*pUnlockObject)(Thread*, Object*);
int (Thread::*pInstanceofNonTrivialFromCode)(const Class*, const Class*);