Refactor java.lang.reflect implementation
Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.
Move to ArtMethod/Field instead of AbstractMethod/Field and have
java.lang.reflect APIs delegate to ArtMethod/ArtField.
Bug: 10014286.
Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc
index 20d683a..073b550 100644
--- a/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -365,7 +365,7 @@
break;
case 1: // Get method->dex_cache_resolved_methods_
cg->LoadWordDisp(cg->TargetReg(kArg0),
- mirror::AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(), cg->TargetReg(kArg0));
+ mirror::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value(), cg->TargetReg(kArg0));
// Set up direct code if known.
if (direct_code != 0) {
if (direct_code != static_cast<unsigned int>(-1)) {
@@ -395,7 +395,7 @@
if (cu->instruction_set != kX86) {
if (direct_code == 0) {
cg->LoadWordDisp(cg->TargetReg(kArg0),
- mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
+ mirror::ArtMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
cg->TargetReg(kInvokeTgt));
}
break;
@@ -448,7 +448,7 @@
case 4: // Get the compiled code address [uses kArg0, sets kInvokeTgt]
if (cu->instruction_set != kX86) {
cg->LoadWordDisp(cg->TargetReg(kArg0),
- mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
+ mirror::ArtMethod::GetEntryPointFromCompiledCodeOffset().Int32Value(),
cg->TargetReg(kInvokeTgt));
break;
}
@@ -514,7 +514,7 @@
break;
case 1: // Get method->dex_cache_resolved_methods_ [set/use kArg0]
cg->LoadWordDisp(cg->TargetReg(kArg0),
- mirror::AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(),
+ mirror::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value(),
cg->TargetReg(kArg0));
break;
case 2: // Grab target method* [set/use kArg0]
@@ -1407,7 +1407,7 @@
} else {
if (fast_path && info->type != kInterface) {
call_inst = OpMem(kOpBlx, TargetReg(kArg0),
- mirror::AbstractMethod::GetEntryPointFromCompiledCodeOffset().Int32Value());
+ mirror::ArtMethod::GetEntryPointFromCompiledCodeOffset().Int32Value());
} else {
ThreadOffset trampoline(-1);
switch (info->type) {