From ea46f950e7a51585db293cd7f047de190a482414 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Tue, 30 Jul 2013 01:26:50 -0700 Subject: Refactor java.lang.reflect implementation Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7 --- runtime/scoped_thread_state_change.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/scoped_thread_state_change.h') diff --git a/runtime/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h index 965e6b85ac..5f649b117b 100644 --- a/runtime/scoped_thread_state_change.h +++ b/runtime/scoped_thread_state_change.h @@ -204,7 +204,7 @@ class ScopedObjectAccessUnchecked : public ScopedThreadStateChange { return down_cast(Self()->DecodeJObject(obj)); } - mirror::Field* DecodeField(jfieldID fid) const + mirror::ArtField* DecodeField(jfieldID fid) const LOCKS_EXCLUDED(JavaVMExt::globals_lock, JavaVMExt::weak_globals_lock) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { @@ -214,10 +214,10 @@ class ScopedObjectAccessUnchecked : public ScopedThreadStateChange { // TODO: we should make these unique weak globals if Field instances can ever move. UNIMPLEMENTED(WARNING); #endif - return reinterpret_cast(fid); + return reinterpret_cast(fid); } - jfieldID EncodeField(mirror::Field* field) const + jfieldID EncodeField(mirror::ArtField* field) const LOCKS_EXCLUDED(JavaVMExt::globals_lock, JavaVMExt::weak_globals_lock) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { @@ -229,7 +229,7 @@ class ScopedObjectAccessUnchecked : public ScopedThreadStateChange { return reinterpret_cast(field); } - mirror::AbstractMethod* DecodeMethod(jmethodID mid) const + mirror::ArtMethod* DecodeMethod(jmethodID mid) const LOCKS_EXCLUDED(JavaVMExt::globals_lock, JavaVMExt::weak_globals_lock) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { @@ -239,10 +239,10 @@ class ScopedObjectAccessUnchecked : public ScopedThreadStateChange { // TODO: we should make these unique weak globals if Method instances can ever move. UNIMPLEMENTED(WARNING); #endif - return reinterpret_cast(mid); + return reinterpret_cast(mid); } - jmethodID EncodeMethod(mirror::AbstractMethod* method) const + jmethodID EncodeMethod(mirror::ArtMethod* method) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Locks::mutator_lock_->AssertSharedHeld(Self()); DCHECK_EQ(thread_state_, kRunnable); // Don't work with raw objects in non-runnable states. -- cgit v1.2.3