OSDN Git Service

Address missed amend
authorMathieu Chartier <mathieuc@google.com>
Fri, 5 Feb 2016 21:47:06 +0000 (13:47 -0800)
committerMathieu Chartier <mathieuc@google.com>
Fri, 5 Feb 2016 22:13:02 +0000 (14:13 -0800)
Forgot to amend after addressing code review comments.

Bug: 26990650
Change-Id: Icfac33444d3d6a590f72b888e020327ee77d5520

runtime/entrypoints/entrypoint_utils.h
runtime/entrypoints/quick/quick_field_entrypoints.cc

index 455e53f..a28376f 100644 (file)
@@ -133,13 +133,6 @@ enum FindFieldType {
   StaticPrimitiveWrite,
 };
 
-inline constexpr bool FindFieldTypeIsRead(FindFieldType type) {
-  return type == InstanceObjectRead ||
-         type == InstancePrimitiveRead ||
-         type == StaticObjectRead ||
-         type == StaticPrimitiveRead;
-}
-
 template<FindFieldType type, bool access_check>
 inline ArtField* FindFieldFromCode(
     uint32_t field_idx, ArtMethod* referrer, Thread* self, size_t expected_size)
index bb90667..a245f18 100644 (file)
 
 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<FindFieldType type, bool kAccessCheck>
 ALWAYS_INLINE static inline ArtField* FindInstanceField(uint32_t field_idx,
                                                         ArtMethod* referrer,