summaryrefslogtreecommitdiff
path: root/runtime/method_helper-inl.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-07-16 12:06:35 -0700
committer Ian Rogers <irogers@google.com> 2014-07-16 12:06:35 -0700
commite5877a12c30afe10a5c6a1afaff7a47ef44a2a5f (patch)
tree161535abb39394fc3b1d96d31625ba7eb61c8497 /runtime/method_helper-inl.h
parentaab012d6196bd29b3167963ec8acb0b9780672b2 (diff)
Fix x86 build.
Also fix attributes/annotalysis on entrypoint_utils functions now we have clang that is smarter wrt warnings than GCC. Change-Id: I69257b4ad9a27d07acbc973d21a1cfa4260a8ed6
Diffstat (limited to 'runtime/method_helper-inl.h')
-rw-r--r--runtime/method_helper-inl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/method_helper-inl.h b/runtime/method_helper-inl.h
index 42a60896a0..4f95a28e81 100644
--- a/runtime/method_helper-inl.h
+++ b/runtime/method_helper-inl.h
@@ -19,7 +19,10 @@
#include "method_helper.h"
+#include "class_linker.h"
+#include "mirror/object_array.h"
#include "runtime.h"
+#include "thread-inl.h"
namespace art {
@@ -33,6 +36,15 @@ inline mirror::Class* MethodHelper::GetClassFromTypeIdx(uint16_t type_idx, bool
return type;
}
+inline mirror::Class* MethodHelper::GetReturnType(bool resolve) {
+ mirror::ArtMethod* method = GetMethod();
+ const DexFile* dex_file = method->GetDexFile();
+ const DexFile::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex());
+ const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id);
+ uint16_t return_type_idx = proto_id.return_type_idx_;
+ return GetClassFromTypeIdx(return_type_idx, resolve);
+}
+
inline mirror::String* MethodHelper::ResolveString(uint32_t string_idx) {
mirror::ArtMethod* method = GetMethod();
mirror::String* s = method->GetDexCacheStrings()->Get(string_idx);