summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils-inl.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2016-10-25 15:08:01 -0700
committer Mathieu Chartier <mathieuc@google.com> 2016-10-26 15:25:40 -0700
commitef41db7a3f322a1feb305fdb457410c4cea94d00 (patch)
treec03152c091ef62ab70f5be0a2fe3a965b189132c /runtime/entrypoints/entrypoint_utils-inl.h
parent1458e0c09fe0a3b9fa5fd7beb9b6077d1fc46b1d (diff)
Move interpreter to ObjPtr
Moved most of interpreter, interpreter_common, interpreter_switch_impl, and some of mterp to ObjPtr. Bug: 31113334 Test: test-art-host ART_TEST_INTERPRETER=true Test: art/tools/run-libcore-tests.sh '--mode=host' '--variant=X32' --debug Change-Id: I0935d18287e1332205c17c5a018aa167788ab897
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils-inl.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 31811fb96a..ed60f598d1 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -483,15 +483,15 @@ EXPLICIT_FIND_FIELD_FROM_CODE_TYPED_TEMPLATE_DECL(StaticPrimitiveWrite);
template<InvokeType type, bool access_check>
inline ArtMethod* FindMethodFromCode(uint32_t method_idx,
- mirror::Object** this_object,
+ ObjPtr<mirror::Object>* this_object,
ArtMethod* referrer,
Thread* self) {
ClassLinker* const class_linker = Runtime::Current()->GetClassLinker();
ArtMethod* resolved_method = class_linker->GetResolvedMethod(method_idx, referrer);
if (resolved_method == nullptr) {
StackHandleScope<1> hs(self);
- mirror::Object* null_this = nullptr;
- HandleWrapper<mirror::Object> h_this(
+ ObjPtr<mirror::Object> null_this = nullptr;
+ HandleWrapperObjPtr<mirror::Object> h_this(
hs.NewHandleWrapper(type == kStatic ? &null_this : this_object));
constexpr ClassLinker::ResolveMode resolve_mode =
access_check ? ClassLinker::kForceICCECheck
@@ -560,7 +560,7 @@ inline ArtMethod* FindMethodFromCode(uint32_t method_idx,
// defaults. What we actually need is a GetContainingClass that says which classes virtuals
// this method is coming from.
StackHandleScope<2> hs2(self);
- HandleWrapper<mirror::Object> h_this(hs2.NewHandleWrapper(this_object));
+ HandleWrapperObjPtr<mirror::Object> h_this(hs2.NewHandleWrapper(this_object));
Handle<mirror::Class> h_referring_class(hs2.NewHandle(referrer->GetDeclaringClass()));
const uint16_t method_type_idx =
h_referring_class->GetDexFile().GetMethodId(method_idx).class_idx_;
@@ -652,7 +652,7 @@ inline ArtMethod* FindMethodFromCode(uint32_t method_idx,
#define EXPLICIT_FIND_METHOD_FROM_CODE_TEMPLATE_DECL(_type, _access_check) \
template REQUIRES_SHARED(Locks::mutator_lock_) ALWAYS_INLINE \
ArtMethod* FindMethodFromCode<_type, _access_check>(uint32_t method_idx, \
- mirror::Object** this_object, \
+ ObjPtr<mirror::Object>* this_object, \
ArtMethod* referrer, \
Thread* self)
#define EXPLICIT_FIND_METHOD_FROM_CODE_TYPED_TEMPLATE_DECL(_type) \
@@ -722,8 +722,11 @@ inline ArtField* FindFieldFast(uint32_t field_idx, ArtMethod* referrer, FindFiel
}
// Fast path method resolution that can't throw exceptions.
-inline ArtMethod* FindMethodFast(uint32_t method_idx, mirror::Object* this_object,
- ArtMethod* referrer, bool access_check, InvokeType type) {
+inline ArtMethod* FindMethodFast(uint32_t method_idx,
+ ObjPtr<mirror::Object> this_object,
+ ArtMethod* referrer,
+ bool access_check,
+ InvokeType type) {
ScopedAssertNoThreadSuspension ants(__FUNCTION__);
if (UNLIKELY(this_object == nullptr && type != kStatic)) {
return nullptr;