diff options
| author | 2015-10-12 12:25:47 +0000 | |
|---|---|---|
| committer | 2015-10-12 12:25:47 +0000 | |
| commit | 5021883b95d2637f9cc6b4f2c5cf305730e864df (patch) | |
| tree | 9ca3f8acec1bf5527d3d4aeaf06de3ba067b2e1b /compiler/optimizing/builder.cc | |
| parent | 34ce73a962379b7b844c605f1c4c80cf133009e3 (diff) | |
| parent | 4e2a55760b231554b72ba6703a22fcc7ab1f714e (diff) | |
Merge "Assert that referrers class should not need access check."
Diffstat (limited to 'compiler/optimizing/builder.cc')
| -rw-r--r-- | compiler/optimizing/builder.cc | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 503d08f6f5..6f152d1f12 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -1302,7 +1302,13 @@ bool HGraphBuilder::IsOutermostCompilingClass(uint16_t type_index) const {        soa, dex_cache, class_loader, type_index, dex_compilation_unit_)));    Handle<mirror::Class> outer_class(hs.NewHandle(GetOutermostCompilingClass())); -  return outer_class.Get() == cls.Get(); +  // GetOutermostCompilingClass returns null when the class is unresolved +  // (e.g. if it derives from an unresolved class). This is bogus knowing that +  // we are compiling it. +  // When this happens we cannot establish a direct relation between the current +  // class and the outer class, so we return false. +  // (Note that this is only used for optimizing invokes and field accesses) +  return (cls.Get() != nullptr) && (outer_class.Get() == cls.Get());  }  void HGraphBuilder::BuildUnresolvedStaticFieldAccess(const Instruction& instruction, |