summaryrefslogtreecommitdiff
path: root/compiler/jni/quick/calling_convention.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r--compiler/jni/quick/calling_convention.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
index e62fc33a85..faa83daf7c 100644
--- a/compiler/jni/quick/calling_convention.h
+++ b/compiler/jni/quick/calling_convention.h
@@ -291,6 +291,7 @@ class JniCallingConvention : public CallingConvention {
static std::unique_ptr<JniCallingConvention> Create(ArenaAllocator* allocator,
bool is_static,
bool is_synchronized,
+ bool is_fast_native,
bool is_critical_native,
const char* shorty,
InstructionSet instruction_set);
@@ -348,6 +349,10 @@ class JniCallingConvention : public CallingConvention {
return 4u;
}
+ bool IsFastNative() const {
+ return is_fast_native_;
+ }
+
bool IsCriticalNative() const {
return is_critical_native_;
}
@@ -376,9 +381,10 @@ class JniCallingConvention : public CallingConvention {
// Does the transition back spill the return value in the stack frame?
bool SpillsReturnValue() const {
- // Exclude return value for @CriticalNative methods for optimization speed.
+ // Exclude return value for @FastNative and @CriticalNative methods for optimization speed.
// References are passed directly to the "end method" and there is nothing to save for `void`.
- return !IsCriticalNative() && !IsReturnAReference() && SizeOfReturnValue() != 0u;
+ return (!IsFastNative() && !IsCriticalNative()) &&
+ (!IsReturnAReference() && SizeOfReturnValue() != 0u);
}
protected:
@@ -390,10 +396,12 @@ class JniCallingConvention : public CallingConvention {
JniCallingConvention(bool is_static,
bool is_synchronized,
+ bool is_fast_native,
bool is_critical_native,
const char* shorty,
PointerSize frame_pointer_size)
: CallingConvention(is_static, is_synchronized, shorty, frame_pointer_size),
+ is_fast_native_(is_fast_native),
is_critical_native_(is_critical_native) {}
protected:
@@ -426,6 +434,7 @@ class JniCallingConvention : public CallingConvention {
// Is the current argument (at the iterator) an extra argument for JNI?
bool IsCurrentArgExtraForJni() const;
+ const bool is_fast_native_;
const bool is_critical_native_;
private: