diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-07-04 09:41:32 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-07-14 10:06:11 +0100 |
commit | e50383288a75244255d3ecedcc79ffe9caf774cb (patch) | |
tree | 8858489463a57c7b50f7db4d972abec21302b7a7 /compiler/driver/compiler_driver.h | |
parent | cf90ba7ebe00346651f3b7ce1e5b1f785f7caabd (diff) | |
download | art-e50383288a75244255d3ecedcc79ffe9caf774cb.zip art-e50383288a75244255d3ecedcc79ffe9caf774cb.tar.gz art-e50383288a75244255d3ecedcc79ffe9caf774cb.tar.bz2 |
Support fields in optimizing compiler.
- Required support for temporaries, to be only used by baseline compiler.
- Also fixed a few invalid assumptions around locations and instructions
that don't need materialization. These instructions should not have an Out.
Change-Id: Idc4a30dd95dd18015137300d36bec55fc024cf62
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r-- | compiler/driver/compiler_driver.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index ae709f8..6dae398 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -222,14 +222,14 @@ class CompilerDriver { // Resolve compiling method's class. Returns nullptr on failure. mirror::Class* ResolveCompilingMethodsClass( - ScopedObjectAccess& soa, Handle<mirror::DexCache> dex_cache, + const ScopedObjectAccess& soa, Handle<mirror::DexCache> dex_cache, Handle<mirror::ClassLoader> class_loader, const DexCompilationUnit* mUnit) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Resolve a field. Returns nullptr on failure, including incompatible class change. // NOTE: Unlike ClassLinker's ResolveField(), this method enforces is_static. mirror::ArtField* ResolveField( - ScopedObjectAccess& soa, Handle<mirror::DexCache> dex_cache, + const ScopedObjectAccess& soa, Handle<mirror::DexCache> dex_cache, Handle<mirror::ClassLoader> class_loader, const DexCompilationUnit* mUnit, uint32_t field_idx, bool is_static) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); @@ -245,7 +245,7 @@ class CompilerDriver { // Can we fast-path an IGET/IPUT access to an instance field? If yes, compute the field offset. std::pair<bool, bool> IsFastInstanceField( mirror::DexCache* dex_cache, mirror::Class* referrer_class, - mirror::ArtField* resolved_field, uint16_t field_idx, MemberOffset* field_offset) + mirror::ArtField* resolved_field, uint16_t field_idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Can we fast-path an SGET/SPUT access to a static field? If yes, compute the field offset, @@ -298,6 +298,13 @@ class CompilerDriver { MemberOffset* field_offset, bool* is_volatile) LOCKS_EXCLUDED(Locks::mutator_lock_); + mirror::ArtField* ComputeInstanceFieldInfo(uint32_t field_idx, + const DexCompilationUnit* mUnit, + bool is_put, + const ScopedObjectAccess& soa) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + + // Can we fastpath static field access? Computes field's offset, volatility and whether the // field is within the referrer (which can avoid checking class initialization). bool ComputeStaticFieldInfo(uint32_t field_idx, const DexCompilationUnit* mUnit, bool is_put, |