summaryrefslogtreecommitdiff
path: root/runtime/class_linker.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-12-10 16:01:41 -0800
committer android-build-merger <android-build-merger@google.com> 2015-12-10 16:01:41 -0800
commit673fdc77f1242af51e10e7a74975ef57d138b36b (patch)
treec878b89f24f88426291d0b1738e759a6aa0099b6 /runtime/class_linker.h
parent898e04bc81777772ed269bc89294c3fb54f7a481 (diff)
parent682857fece0425362c4fb55da611e7144c9ec092 (diff)
Merge "ART: Stash a resolved method late in the verifier" am: 748047de83
am: 682857fece * commit '682857fece0425362c4fb55da611e7144c9ec092': ART: Stash a resolved method late in the verifier
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r--runtime/class_linker.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 29aac312c1..0d3bc1e2c3 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -246,11 +246,19 @@ class ClassLinker {
SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!dex_lock_, !Roles::uninterruptible_);
+ // Determine whether a dex cache result should be trusted, or an IncompatibleClassChangeError
+ // check should be performed even after a hit.
+ enum ResolveMode { // private.
+ kNoICCECheckForCache,
+ kForceICCECheck
+ };
+
// Resolve a method with a given ID from the DexFile, storing the
// result in DexCache. The ClassLinker and ClassLoader are used as
// in ResolveType. What is unique is the method type argument which
// is used to determine if this method is a direct, static, or
// virtual method.
+ template <ResolveMode kResolveMode>
ArtMethod* ResolveMethod(const DexFile& dex_file,
uint32_t method_idx,
Handle<mirror::DexCache> dex_cache,
@@ -262,6 +270,7 @@ class ClassLinker {
ArtMethod* GetResolvedMethod(uint32_t method_idx, ArtMethod* referrer)
SHARED_REQUIRES(Locks::mutator_lock_);
+ template <ResolveMode kResolveMode>
ArtMethod* ResolveMethod(Thread* self, uint32_t method_idx, ArtMethod* referrer, InvokeType type)
SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!dex_lock_, !Roles::uninterruptible_);