summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-02-05 14:53:36 +0000
committerVladimir Marko <vmarko@google.com>2014-02-07 14:13:43 +0000
commit5dc5727261e87ba8a418e2d0e970c75f67e4ab79 (patch)
treeef722d79fb041864aca76a0243271c6edc7a9bd6 /compiler/driver/compiler_driver.h
parenta52214230ad091359956ed7566670963aedf2045 (diff)
downloadart-5dc5727261e87ba8a418e2d0e970c75f67e4ab79.zip
art-5dc5727261e87ba8a418e2d0e970c75f67e4ab79.tar.gz
art-5dc5727261e87ba8a418e2d0e970c75f67e4ab79.tar.bz2
Check FastInstance() early for special getters and setters.
Perform the FastInstance() check for getters and setters when they are detected by the inliner. This will help avoid the FastInstance() check for inlining. We also record the field offset and whether the field is volatile and whether the method is static for use when inlining or generating the special accessors. Change-Id: I3f832fc9ae263883b8a984be89a3b7793398b55a
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 4307212..ea43e4f 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -38,10 +38,15 @@
namespace art {
+namespace verifier {
+class MethodVerifier;
+} // namespace verifier
+
class AOTCompilationStats;
class ParallelCompilationManager;
class DexCompilationUnit;
class DexFileToMethodInlinerMap;
+class InlineIGetIPutData;
class OatWriter;
class TimingLogger;
class VerificationResults;
@@ -194,6 +199,13 @@ class CompilerDriver {
bool* is_type_initialized, bool* use_direct_type_ptr,
uintptr_t* direct_type_ptr);
+ // Can we fast path instance field access in a verified accessor?
+ // If yes, computes field's offset and volatility and whether the method is static or not.
+ static bool ComputeSpecialAccessorInfo(uint32_t field_idx, bool is_put,
+ verifier::MethodVerifier* verifier,
+ InlineIGetIPutData* result)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
// Can we fast path instance field access? Computes field's offset and volatility.
bool ComputeInstanceFieldInfo(uint32_t field_idx, const DexCompilationUnit* mUnit, bool is_put,
int* field_offset, bool* is_volatile)