Invoke static/direct dispatch change.
There was a subtle race in static/direct dispatch via the code and methods
table. This patch removes the table in preparation of architectures like
x86 which will more aggressively sink loads.
Removes unused fields, code.. Brings back resolved methods table
short-cut and associated fast paths to use this (such as in Proxy). Adds
a resolution method that is used as the trampoline for static and direct
methods.
Add source file and line number to Throwable::Dump.
MethodHelper knowledge of runtime methods.
Change-Id: Ieae1b74c24072e6327a5bb2cad466f04e3c46c4d
diff --git a/src/compiler/codegen/arm/ArchFactory.cc b/src/compiler/codegen/arm/ArchFactory.cc
index 62e4b3e..79a62ad 100644
--- a/src/compiler/codegen/arm/ArchFactory.cc
+++ b/src/compiler/codegen/arm/ArchFactory.cc
@@ -490,16 +490,17 @@
case 0: // Get the current Method* [sets r0]
loadCurrMethodDirect(cUnit, r0);
break;
- case 1: // Get method->code_and_direct_methods_
+ case 1: // Get method->dex_cache_resolved_methods_
loadWordDisp(cUnit, r0,
- Method::GetDexCacheCodeAndDirectMethodsOffset().Int32Value(),
+ Method::DexCacheResolvedMethodsOffset().Int32Value(),
r0);
break;
- case 2: // Grab target method* and target code_
+ case 2: // Grab target method*
loadWordDisp(cUnit, r0,
- CodeAndDirectMethods::CodeOffsetInBytes(dexIdx), rLR);
- loadWordDisp(cUnit, r0,
- CodeAndDirectMethods::MethodOffsetInBytes(dexIdx), r0);
+ Array::DataOffset().Int32Value() + dexIdx * 4, r0);
+ break;
+ case 3: // Grab the code from the method*
+ loadWordDisp(cUnit, r0, Method::GetCodeOffset().Int32Value(), rLR);
break;
default:
return -1;