summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-01-17 09:16:31 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-01-17 09:16:31 +0000
commite037a736be43c1e8ba9340dcbf1d17722356a37b (patch)
treef0bc7b4a78d04376b042046afbfd0677d766b523 /compiler/optimizing/nodes.cc
parentdb54cc42859a8cc24ed1cda7f9b2f64b27dcb34a (diff)
parent5d37c152f21a0807459c6f53bc25e2d84f56d259 (diff)
Merge "Put inlined ArtMethod pointer in stack maps."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 0af0d19849..81662fabc5 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -2391,6 +2391,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;