diff options
| author | 2016-04-06 14:41:23 -0700 | |
|---|---|---|
| committer | 2016-04-06 14:48:43 -0700 | |
| commit | 03c7df9648028228d75dddfc25cbc81ab8096167 (patch) | |
| tree | c472a57995b52707da355ebc31091e34f8bafc75 /compiler/driver/compiler_driver.h | |
| parent | bdf6df1ef5ac0e2b5420a4b4d6a4c77758b0037d (diff) | |
Check if we require barrier if we did not resolve classes
Check fields instead of just always inserting the return void
barrier.
Bug: 28005874
Change-Id: I62cc1c3979304642109961fcf2607a7df065a162
Diffstat (limited to 'compiler/driver/compiler_driver.h')
| -rw-r--r-- | compiler/driver/compiler_driver.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 98e3d890cd..0ed0bb6af7 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -619,6 +619,8 @@ class CompilerDriver { void FreeThreadPools(); void CheckThreadPools(); + bool RequiresConstructorBarrier(const DexFile& dex_file, uint16_t class_def_idx) const; + const CompilerOptions* const compiler_options_; VerificationResults* const verification_results_; DexFileToMethodInlinerMap* const method_inliner_map_; @@ -629,10 +631,14 @@ class CompilerDriver { const InstructionSet instruction_set_; const InstructionSetFeatures* const instruction_set_features_; - // All class references that do not require constructor barriers + // All class references that do not require constructor barriers. Only filled in if + // resolved_classes_ is true. mutable ReaderWriterMutex no_barrier_constructor_classes_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; std::set<ClassReference> no_barrier_constructor_classes_ GUARDED_BY(no_barrier_constructor_classes_lock_); + // resolved_classes_ is true if we performed the resolve phase and filled in + // no_barrier_constructor_classes_. + bool resolved_classes_; typedef SafeMap<const ClassReference, CompiledClass*> ClassTable; // All class references that this compiler has compiled. |