summaryrefslogtreecommitdiff
path: root/runtime/method_handles.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/method_handles.cc')
-rw-r--r--runtime/method_handles.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/method_handles.cc b/runtime/method_handles.cc
index 161fa2cd01..7e04d66252 100644
--- a/runtime/method_handles.cc
+++ b/runtime/method_handles.cc
@@ -100,12 +100,12 @@ bool GetUnboxedTypeAndValue(ObjPtr<mirror::Object> o, Primitive::Type* type, JVa
REQUIRES_SHARED(Locks::mutator_lock_) {
ScopedAssertNoThreadSuspension ants(__FUNCTION__);
ObjPtr<mirror::Class> klass = o->GetClass();
- ArtField* primitive_field = &klass->GetIFieldsPtr()->At(0);
-#define CASE_PRIMITIVE(primitive, abbrev, _, shorthand) \
- if (klass == GetBoxedPrimitiveClass(primitive)) { \
- *type = primitive; \
- value->Set ## shorthand(primitive_field->Get ## abbrev(o)); \
- return true; \
+#define CASE_PRIMITIVE(primitive, abbrev, java_name, shorthand) \
+ if (klass == GetBoxedPrimitiveClass(primitive)) { \
+ *type = primitive; \
+ value->Set ## shorthand( \
+ WellKnownClasses::java_lang_ ## java_name ## _value->Get ## abbrev(o)); \
+ return true; \
}
PRIMITIVES_LIST(CASE_PRIMITIVE)
#undef CASE_PRIMITIVE