summaryrefslogtreecommitdiff
path: root/runtime/runtime-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/runtime-inl.h')
-rw-r--r--runtime/runtime-inl.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/runtime/runtime-inl.h b/runtime/runtime-inl.h
index 9281577b3e..609f0d658d 100644
--- a/runtime/runtime-inl.h
+++ b/runtime/runtime-inl.h
@@ -20,6 +20,7 @@
#include "runtime.h"
#include "art_method.h"
+#include "base/callee_save_type.h"
#include "gc_root-inl.h"
#include "obj_ptr-inl.h"
@@ -41,15 +42,15 @@ inline QuickMethodFrameInfo Runtime::GetRuntimeMethodFrameInfo(ArtMethod* method
DCHECK_NE(method, GetImtConflictMethod());
DCHECK_NE(method, GetResolutionMethod());
// Don't use GetCalleeSaveMethod(), some tests don't set all callee save methods.
- if (method == GetCalleeSaveMethodUnchecked(Runtime::kSaveRefsAndArgs)) {
- return GetCalleeSaveMethodFrameInfo(Runtime::kSaveRefsAndArgs);
- } else if (method == GetCalleeSaveMethodUnchecked(Runtime::kSaveAllCalleeSaves)) {
- return GetCalleeSaveMethodFrameInfo(Runtime::kSaveAllCalleeSaves);
- } else if (method == GetCalleeSaveMethodUnchecked(Runtime::kSaveRefsOnly)) {
- return GetCalleeSaveMethodFrameInfo(Runtime::kSaveRefsOnly);
+ if (method == GetCalleeSaveMethodUnchecked(CalleeSaveType::kSaveRefsAndArgs)) {
+ return GetCalleeSaveMethodFrameInfo(CalleeSaveType::kSaveRefsAndArgs);
+ } else if (method == GetCalleeSaveMethodUnchecked(CalleeSaveType::kSaveAllCalleeSaves)) {
+ return GetCalleeSaveMethodFrameInfo(CalleeSaveType::kSaveAllCalleeSaves);
+ } else if (method == GetCalleeSaveMethodUnchecked(CalleeSaveType::kSaveRefsOnly)) {
+ return GetCalleeSaveMethodFrameInfo(CalleeSaveType::kSaveRefsOnly);
} else {
- DCHECK_EQ(method, GetCalleeSaveMethodUnchecked(Runtime::kSaveEverything));
- return GetCalleeSaveMethodFrameInfo(Runtime::kSaveEverything);
+ DCHECK_EQ(method, GetCalleeSaveMethodUnchecked(CalleeSaveType::kSaveEverything));
+ return GetCalleeSaveMethodFrameInfo(CalleeSaveType::kSaveEverything);
}
}
@@ -76,7 +77,7 @@ inline ArtMethod* Runtime::GetCalleeSaveMethod(CalleeSaveType type)
inline ArtMethod* Runtime::GetCalleeSaveMethodUnchecked(CalleeSaveType type)
REQUIRES_SHARED(Locks::mutator_lock_) {
- return reinterpret_cast<ArtMethod*>(callee_save_methods_[type]);
+ return reinterpret_cast<ArtMethod*>(callee_save_methods_[static_cast<size_t>(type)]);
}
} // namespace art