@@ -907,7 +907,6 @@ const Function& TypedListGetNativeFunction(Thread* thread, classid_t cid) {
907907 V (ReceivePort_getSendPort, ReceivePort_send_port) \
908908 V (ReceivePort_getHandler, ReceivePort_handler) \
909909 V (ImmutableLinkedHashBase_getData, ImmutableLinkedHashBase_data) \
910- V (ImmutableLinkedHashBase_getIndex, ImmutableLinkedHashBase_index) \
911910 V (LinkedHashBase_getData, LinkedHashBase_data) \
912911 V (LinkedHashBase_getDeletedKeys, LinkedHashBase_deleted_keys) \
913912 V (LinkedHashBase_getHashMask, LinkedHashBase_hash_mask) \
@@ -925,6 +924,9 @@ const Function& TypedListGetNativeFunction(Thread* thread, classid_t cid) {
925924 V (WeakProperty_getValue, WeakProperty_value) \
926925 V (WeakReference_getTarget, WeakReference_target)
927926
927+ #define LOAD_ACQUIRE_NATIVE_FIELD (V ) \
928+ V (ImmutableLinkedHashBase_getIndex, ImmutableLinkedHashBase_index)
929+
928930#define STORE_NATIVE_FIELD (V ) \
929931 V (Finalizer_setCallback, Finalizer_callback) \
930932 V (FinalizerBase_setAllEntries, FinalizerBase_all_entries) \
@@ -1115,6 +1117,7 @@ bool FlowGraphBuilder::IsRecognizedMethodForFlowGraph(
11151117 case MethodRecognizer::kDouble_hashCode :
11161118#define CASE (method, slot ) case MethodRecognizer::k##method:
11171119 LOAD_NATIVE_FIELD (CASE)
1120+ LOAD_ACQUIRE_NATIVE_FIELD (CASE)
11181121 STORE_NATIVE_FIELD (CASE)
11191122 STORE_NATIVE_FIELD_NO_BARRIER (CASE)
11201123#undef CASE
@@ -1925,6 +1928,15 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfRecognizedMethod(
19251928 break ;
19261929 LOAD_NATIVE_FIELD (IL_BODY)
19271930#undef IL_BODY
1931+ #define IL_BODY (method, slot ) \
1932+ case MethodRecognizer::k##method: \
1933+ ASSERT_EQUAL (function.NumParameters (), 1 ); \
1934+ body += LoadLocal (parsed_function_->RawParameterVariable (0 )); \
1935+ body += \
1936+ LoadNativeField (Slot::slot (), false , compiler::Assembler::kAcquire ); \
1937+ break ;
1938+ LOAD_ACQUIRE_NATIVE_FIELD (IL_BODY)
1939+ #undef IL_BODY
19281940#define IL_BODY (method, slot ) \
19291941 case MethodRecognizer::k##method: \
19301942 ASSERT_EQUAL (function.NumParameters (), 2 ); \
0 commit comments