From: Mathieu Chartier Date: Fri, 5 Feb 2016 21:47:06 +0000 (-0800) Subject: Address missed amend X-Git-Tag: android-x86-7.1-r1~424^2^2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a61347b5f2ffb228e6a6c455b7d7bcde02d44960;p=android-x86%2Fart.git Address missed amend Forgot to amend after addressing code review comments. Bug: 26990650 (cherry picked from commit 3cfc2e4fb6c4735a145aa184db14d0bf33653e33) Change-Id: Ic8483a50e0670cac1291385a82b7c5e4a313cd18 --- diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h index 455e53f75..a28376fad 100644 --- a/runtime/entrypoints/entrypoint_utils.h +++ b/runtime/entrypoints/entrypoint_utils.h @@ -133,13 +133,6 @@ enum FindFieldType { StaticPrimitiveWrite, }; -inline constexpr bool FindFieldTypeIsRead(FindFieldType type) { - return type == InstanceObjectRead || - type == InstancePrimitiveRead || - type == StaticObjectRead || - type == StaticPrimitiveRead; -} - template inline ArtField* FindFieldFromCode( uint32_t field_idx, ArtMethod* referrer, Thread* self, size_t expected_size) diff --git a/runtime/entrypoints/quick/quick_field_entrypoints.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc index bb9066738..a245f18d3 100644 --- a/runtime/entrypoints/quick/quick_field_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_field_entrypoints.cc @@ -27,6 +27,16 @@ namespace art { +inline constexpr bool FindFieldTypeIsRead(FindFieldType type) { + return type == InstanceObjectRead || + type == InstancePrimitiveRead || + type == StaticObjectRead || + type == StaticPrimitiveRead; +} + +// Helper function to do a null check after trying to resolve the field. Not for statics since obj +// does not exist there. There is a suspend check, object is a double pointer to update the value +// in the caller in case it moves. template ALWAYS_INLINE static inline ArtField* FindInstanceField(uint32_t field_idx, ArtMethod* referrer,