From 5d37c152f21a0807459c6f53bc25e2d84f56d259 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 12 Jan 2017 13:25:19 +0000 Subject: Put inlined ArtMethod pointer in stack maps. Currently done for JIT. Can be extended for AOT and inlined boot image methods. Also refactor the lookup of a inlined method at runtime to not rely on the dex cache, but look at the class loader tables. bug: 30933338 test: test-art-host, test-art-target Change-Id: I58bd4d763b82ab8ca3023742835ac388671d1794 --- compiler/optimizing/nodes.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index d45fa11534..f7c2f9735c 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -2387,6 +2387,14 @@ bool HInvoke::NeedsEnvironment() const { return !opt.GetDoesNotNeedEnvironment(); } +const DexFile& HInvokeStaticOrDirect::GetDexFileForPcRelativeDexCache() const { + ArtMethod* caller = GetEnvironment()->GetMethod(); + ScopedObjectAccess soa(Thread::Current()); + // `caller` is null for a top-level graph representing a method whose declaring + // class was not resolved. + return caller == nullptr ? GetBlock()->GetGraph()->GetDexFile() : *caller->GetDexFile(); +} + bool HInvokeStaticOrDirect::NeedsDexCacheOfDeclaringClass() const { if (GetMethodLoadKind() != MethodLoadKind::kDexCacheViaMethod) { return false; -- cgit v1.2.3-59-g8ed1b