summaryrefslogtreecommitdiff
path: root/compiler/compiler.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2017-10-27 10:34:04 +0100
committerVladimir Marko <vmarko@google.com>2017-11-10 08:30:36 +0000
commitb0a6aeee250945b1d156ebab94053380f2e5a3c5 (patch)
tree7ddb52bb20997b8f1c81be3df2250949a088e697 /compiler/compiler.h
parent0db16e00e3927445585a588499731c58c1ae1bef (diff)
Record @{Fast,Critical}Native in method's access flags.
Repurpose the old kAccFastNative flag (which wasn't actually used for some time) and define a new kAccCriticalNative flag to record the native method's annotation-based kind. This avoids repeated determination of the kind from GenericJNI. And making two transitions to runnable and back (using the ScopedObjectAccess) from GenericJniMethodEnd() for normal native methods just to determine that we need to transition to runnable was really weird. Since the IsFastNative() function now records the presence of the @FastNative annotation, synchronized @FastNative method calls now avoid thread state transitions. When initializing the Runtime without a boot image, the WellKnowClasses may not yet be initialized, so relax the DCheckNativeAnnotation() to take that into account. Also revert https://android-review.googlesource.com/509715 as the annotation checks are now much faster. Bug: 65574695 Bug: 35644369 Test: m test-art-host-gtest Test: testrunner.py --host Change-Id: I2fc5ba192b9ce710a0e9202977b4f9543e387efe
Diffstat (limited to 'compiler/compiler.h')
-rw-r--r--compiler/compiler.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/compiler.h b/compiler/compiler.h
index 6c542c841a..9179e9c7c6 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -46,12 +46,6 @@ class Compiler {
kOptimizing
};
- enum JniOptimizationFlags {
- kNone = 0x0,
- kFastNative = 0x1,
- kCriticalNative = 0x2,
- };
-
static Compiler* Create(CompilerDriver* driver, Kind kind);
virtual void Init() = 0;
@@ -71,8 +65,7 @@ class Compiler {
virtual CompiledMethod* JniCompile(uint32_t access_flags,
uint32_t method_idx,
- const DexFile& dex_file,
- JniOptimizationFlags optimization_flags) const = 0;
+ const DexFile& dex_file) const = 0;
virtual bool JitCompile(Thread* self ATTRIBUTE_UNUSED,
jit::JitCodeCache* code_cache ATTRIBUTE_UNUSED,