diff options
author | Vladimir Marko <vmarko@google.com> | 2015-04-13 17:10:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-13 17:10:48 +0000 |
commit | 4b5673b7387804947a1605a906deee132ab28f14 (patch) | |
tree | 0205117473bcbd8ce2dcbb2edaf714d572762fb4 /runtime/mirror | |
parent | fac107bdddb5f2370f762e55a89847570e901245 (diff) | |
parent | 3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b (diff) | |
download | art-4b5673b7387804947a1605a906deee132ab28f14.zip art-4b5673b7387804947a1605a906deee132ab28f14.tar.gz art-4b5673b7387804947a1605a906deee132ab28f14.tar.bz2 |
Merge "ART: Clean up includes."
Diffstat (limited to 'runtime/mirror')
-rw-r--r-- | runtime/mirror/class-inl.h | 11 | ||||
-rw-r--r-- | runtime/mirror/class.cc | 7 | ||||
-rw-r--r-- | runtime/mirror/class.h | 2 | ||||
-rw-r--r-- | runtime/mirror/field-inl.h | 1 |
4 files changed, 12 insertions, 9 deletions
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 5b72e5a..f4656ec 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -21,7 +21,6 @@ #include "art_field-inl.h" #include "art_method-inl.h" -#include "class_linker-inl.h" #include "class_loader.h" #include "common_throws.h" #include "dex_cache.h" @@ -39,12 +38,8 @@ namespace mirror { template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption> inline uint32_t Class::GetObjectSize() { - if (kIsDebugBuild) { - // Use a local variable as (D)CHECK can't handle the space between - // the two template params. - bool is_variable_size = IsVariableSize<kVerifyFlags, kReadBarrierOption>(); - CHECK(!is_variable_size) << " class=" << PrettyTypeOf(this); - } + // Note: Extra parentheses to avoid the comma being interpreted as macro parameter separator. + DCHECK((!IsVariableSize<kVerifyFlags, kReadBarrierOption>())) << " class=" << PrettyTypeOf(this); return GetField32(ObjectSizeOffset()); } @@ -706,7 +701,7 @@ inline bool Class::DescriptorEquals(const char* match) { } else if (IsPrimitive()) { return strcmp(Primitive::Descriptor(GetPrimitiveType()), match) == 0; } else if (IsProxyClass()) { - return Runtime::Current()->GetClassLinker()->GetDescriptorForProxy(this) == match; + return ProxyDescriptorEquals(match); } else { const DexFile& dex_file = GetDexFile(); const DexFile::TypeId& type_id = dex_file.GetTypeId(GetClassDef()->class_idx_); diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 8fb8147..2afb4af 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -18,7 +18,7 @@ #include "art_field-inl.h" #include "art_method-inl.h" -#include "class_linker.h" +#include "class_linker-inl.h" #include "class_loader.h" #include "class-inl.h" #include "dex_cache.h" @@ -871,5 +871,10 @@ Class* Class::CopyOf(Thread* self, int32_t new_length, return new_class->AsClass(); } +bool Class::ProxyDescriptorEquals(const char* match) { + DCHECK(IsProxyClass()); + return Runtime::Current()->GetClassLinker()->GetDescriptorForProxy(this) == match; +} + } // namespace mirror } // namespace art diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h index 92493bc..20f2387 100644 --- a/runtime/mirror/class.h +++ b/runtime/mirror/class.h @@ -1095,6 +1095,8 @@ class MANAGED Class FINAL : public Object { ArtField* GetSFieldsUnchecked() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); ArtField* GetIFieldsUnchecked() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + bool ProxyDescriptorEquals(const char* match) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + // defining class loader, or NULL for the "bootstrap" system loader HeapReference<ClassLoader> class_loader_; diff --git a/runtime/mirror/field-inl.h b/runtime/mirror/field-inl.h index 7db1811..9820db7 100644 --- a/runtime/mirror/field-inl.h +++ b/runtime/mirror/field-inl.h @@ -20,6 +20,7 @@ #include "field.h" #include "art_field-inl.h" +#include "mirror/dex_cache-inl.h" #include "runtime-inl.h" namespace art { |