/art/test/710-varhandle-creation/src/ |
D | Main.java | 18 import java.lang.invoke.VarHandle; 19 import java.lang.invoke.VarHandle.AccessMode; 61 static final VarHandle vz; 62 static final VarHandle vb; 63 static final VarHandle vc; 64 static final VarHandle vs; 65 static final VarHandle vi; 66 static final VarHandle vj; 67 static final VarHandle vf; 68 static final VarHandle vd; [all …]
|
/art/runtime/mirror/ |
D | var_handle_test.cc | 127 static int32_t AccessModesBitMask(VarHandle::AccessMode mode) { in AccessModesBitMask() 132 static int32_t AccessModesBitMask(VarHandle::AccessMode first, Args... args) { in AccessModesBitMask() 137 static void InitializeVarHandle(ObjPtr<VarHandle> vh, in InitializeVarHandle() 141 vh->SetFieldObject<false>(VarHandle::VarTypeOffset(), var_type.Get()); in InitializeVarHandle() 142 vh->SetField32<false>(VarHandle::AccessModesBitMaskOffset(), access_modes_bit_mask); in InitializeVarHandle() 145 static void InitializeVarHandle(ObjPtr<VarHandle> vh, in InitializeVarHandle() 151 vh->SetFieldObject<false>(VarHandle::CoordinateType0Offset(), coordinate_type0.Get()); in InitializeVarHandle() 154 static void InitializeVarHandle(ObjPtr<VarHandle> vh, in InitializeVarHandle() 161 vh->SetFieldObject<false>(VarHandle::CoordinateType0Offset(), coordinate_type0.Get()); in InitializeVarHandle() 162 vh->SetFieldObject<false>(VarHandle::CoordinateType1Offset(), coordinate_type1.Get()); in InitializeVarHandle() [all …]
|
D | var_handle.cc | 44 VarHandle::AccessMode access_mode; 61 const VarHandleAccessorToAccessModeEntry kAccessorToAccessMode[VarHandle::kNumberOfAccessModes] = { 62 { "compareAndExchange", VarHandle::AccessMode::kCompareAndExchange }, 63 { "compareAndExchangeAcquire", VarHandle::AccessMode::kCompareAndExchangeAcquire }, 64 { "compareAndExchangeRelease", VarHandle::AccessMode::kCompareAndExchangeRelease }, 65 { "compareAndSet", VarHandle::AccessMode::kCompareAndSet }, 66 { "get", VarHandle::AccessMode::kGet }, 67 { "getAcquire", VarHandle::AccessMode::kGetAcquire }, 68 { "getAndAdd", VarHandle::AccessMode::kGetAndAdd }, 69 { "getAndAddAcquire", VarHandle::AccessMode::kGetAndAddAcquire }, [all …]
|
D | var_handle.h | 47 class MANAGED VarHandle : public Object { 158 ObjPtr<VarHandle> var_handle, 163 return MemberOffset(OFFSETOF_MEMBER(VarHandle, var_type_)); in VarTypeOffset() 167 return MemberOffset(OFFSETOF_MEMBER(VarHandle, coordinate_type0_)); in CoordinateType0Offset() 171 return MemberOffset(OFFSETOF_MEMBER(VarHandle, coordinate_type1_)); in CoordinateType1Offset() 175 return MemberOffset(OFFSETOF_MEMBER(VarHandle, access_modes_bit_mask_)); in AccessModesBitMaskOffset() 185 DISALLOW_IMPLICIT_CONSTRUCTORS(VarHandle); 190 class MANAGED FieldVarHandle : public VarHandle { 215 class MANAGED ArrayElementVarHandle : public VarHandle { 230 class MANAGED ByteArrayViewVarHandle : public VarHandle { [all …]
|
/art/test/709-checker-varhandles/src/ |
D | Main.java | 17 import java.lang.invoke.VarHandle; 40 VarHandle.fullFence(); in fullFence() 52 VarHandle.acquireFence(); in acquireFence() 64 VarHandle.releaseFence(); in releaseFence() 76 VarHandle.loadLoadFence(); in loadLoadFence() 88 VarHandle.storeStoreFence(); in storeStoreFence()
|
/art/test/954-invoke-polymorphic-verifier/smali/ |
D | VarHandleHappyAccessors.smali | 24 invoke-static {}, LVarHandleHappyAccessors;->getVarHandle()Ljava/lang/invoke/VarHandle; 29 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->compareAndExchange([Ljava/lang/Object;)… 30 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->compareAndExchangeAcquire([Ljava/lang/O… 31 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->compareAndExchangeRelease([Ljava/lang/O… 32 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->compareAndSet([Ljava/lang/Object;)Z, ([… 33 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->get([Ljava/lang/Object;)Ljava/lang/Obje… 34 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->getAcquire([Ljava/lang/Object;)Ljava/la… 35 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->getAndAdd([Ljava/lang/Object;)Ljava/lan… 36 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->getAndAddAcquire([Ljava/lang/Object;)Lj… 37 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->getAndAddRelease([Ljava/lang/Object;)Lj… [all …]
|
D | VarHandleUnhappyAccessors.smali | 24 invoke-static {}, LVarHandleUnhappyAccessors;->getVarHandle()Ljava/lang/invoke/VarHandle; 28 … v1}, LVarHandleUnhappyAccessors;->compareAndExchange(Ljava/lang/invoke/VarHandle;[Ljava/lang/Obje… 29 …-static {v0}, LVarHandleUnhappyAccessors;->compareAndExchangeAcquire(Ljava/lang/invoke/VarHandle;)V 30 …-static {v0}, LVarHandleUnhappyAccessors;->compareAndExchangeRelease(Ljava/lang/invoke/VarHandle;)V 31 invoke-static {v0}, LVarHandleUnhappyAccessors;->compareAndSet(Ljava/lang/invoke/VarHandle;)V 35 # The following methods all invoke VarHandle accessors but the targetted 38 .method public static compareAndExchange(Ljava/lang/invoke/VarHandle;[Ljava/lang/Object;)V 40 …invoke-polymorphic {p0, p1}, Ljava/lang/invoke/VarHandle;->compareAndExchange([Ljava/lang/Object;)… 43 .method public static compareAndExchangeAcquire(Ljava/lang/invoke/VarHandle;)V 46 …invoke-polymorphic {p0, v0}, Ljava/lang/invoke/VarHandle;->compareAndExchangeAcquire(I)Ljava/lang/… [all …]
|
D | VarHandleUnknownAccessor.smali | 24 invoke-static {}, LVarHandleUnknownAccessor;->getVarHandle()Ljava/lang/invoke/VarHandle; 28 # Attempt invoke-polymorphic on VarHandle.unknownAccessor(). 29 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/VarHandle;->unknownAccessor([Ljava/lang/Object;)Lja… 33 .method public static getVarHandle()Ljava/lang/invoke/VarHandle;
|
/art/runtime/ |
D | var_handles.cc | 32 Handle<mirror::VarHandle> var_handle, in VarHandleInvokeAccessorWithConversions() 34 const mirror::VarHandle::AccessMode access_mode, in VarHandleInvokeAccessorWithConversions() 63 Handle<mirror::VarHandle> var_handle, in VarHandleInvokeAccessor() 65 const mirror::VarHandle::AccessMode access_mode, in VarHandleInvokeAccessor() 78 mirror::VarHandle::MatchKind match_kind = in VarHandleInvokeAccessor() 80 if (LIKELY(match_kind == mirror::VarHandle::MatchKind::kExact)) { in VarHandleInvokeAccessor() 82 } else if (match_kind == mirror::VarHandle::MatchKind::kWithConversions) { in VarHandleInvokeAccessor() 91 DCHECK_EQ(match_kind, mirror::VarHandle::MatchKind::kNone); in VarHandleInvokeAccessor()
|
D | var_handles.h | 26 Handle<mirror::VarHandle> var_handle, 28 const mirror::VarHandle::AccessMode access_mode,
|
D | class_root.h | 52 class VarHandle; variable 76 …le, "Ljava/lang/invoke/VarHandle;", mirror::VarHandle) …
|
D | method_handles.cc | 970 mirror::VarHandle::AccessMode access_mode, in DoVarHandleInvokeTranslationUnchecked() 971 Handle<mirror::VarHandle> vh, in DoVarHandleInvokeTranslationUnchecked() 1027 mh_ptypes->Get(0) != GetClassRoot<mirror::VarHandle>()) { in DoVarHandleInvokeTranslation() 1040 Handle<mirror::VarHandle> vh(hs.NewHandle(ObjPtr<mirror::VarHandle>::DownCast(receiver))); in DoVarHandleInvokeTranslation() 1041 DCHECK(GetClassRoot<mirror::VarHandle>()->IsAssignableFrom(vh->GetClass())); in DoVarHandleInvokeTranslation() 1046 mirror::VarHandle::AccessMode access_mode = in DoVarHandleInvokeTranslation() 1047 mirror::VarHandle::GetAccessModeByIntrinsic(static_cast<Intrinsics>(intrinsic_index)); in DoVarHandleInvokeTranslation()
|
/art/test/954-invoke-polymorphic-verifier/ |
D | expected.txt | 12 …VarHandle, java.lang.Object[]) failed to verify: void VarHandleUnhappyAccessors.compareAndExchange… 13 …VarHandle) failed to verify: void VarHandleUnhappyAccessors.compareAndExchangeAcquire(java.lang.in… 14 …VarHandle) failed to verify: void VarHandleUnhappyAccessors.compareAndExchangeRelease(java.lang.in… 15 …VarHandle) failed to verify: void VarHandleUnhappyAccessors.compareAndSet(java.lang.invoke.VarHand… 16 …arHandleUnknownAccessor.<init>(): couldn't find method java.lang.invoke.VarHandle.unknownAccessor …
|
/art/test/712-varhandle-invocations/src/ |
D | VarHandleReflectiveTest.java | 18 import java.lang.invoke.VarHandle; 24 private static final VarHandle vh; 38 for (VarHandle.AccessMode accessMode : VarHandle.AccessMode.values()) { in doTest() 40 VarHandle.class.getMethod(accessMode.methodName(), Object[].class); in doTest()
|
D | VarHandleAccessorExceptionTests.java | 18 import java.lang.invoke.VarHandle; 25 private static final VarHandle vh = null; 43 private static final VarHandle vh; 58 vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND); in doTest() 74 private static final VarHandle vh; 103 private static final VarHandle vh; 131 private static final VarHandle vh; 162 private static final VarHandle vh; 194 private static final VarHandle vh; 208 boolean supported = vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND); in doTest()
|
D | VarHandleTypeConversionTests.java | 18 import java.lang.invoke.VarHandle; 26 private static final VarHandle vh; 63 private static final VarHandle vh; 91 private static final VarHandle vh; 118 private static final VarHandle vh; 145 private static final VarHandle vh; 174 private static final VarHandle vh; 202 private static final VarHandle vh; 231 private static final VarHandle vh; 261 private static final VarHandle vh; [all …]
|
D | VarHandleBadCoordinateTests.java | 18 import java.lang.invoke.VarHandle; 25 private static final VarHandle vh; 87 private static final VarHandle vh; 123 private static final VarHandle vh; 151 private static final VarHandle vh; 177 private static final VarHandle vh; 202 private static final VarHandle vh; 228 private static final VarHandle vh; 270 private static final VarHandle vh; 475 private static final VarHandle vh; [all …]
|
D | VarHandleUnitTestHelpers.java | 20 import java.lang.invoke.VarHandle; 278 private static final VarHandle vh_probe_short; 279 private static final VarHandle vh_probe_int; 280 private static final VarHandle vh_probe_long;
|
/art/test/716-jli-jit-samples/src-art/ |
D | Main.java | 20 import java.lang.invoke.VarHandle; 27 private static final VarHandle widgetIdVarHandle; 118 assertEquals(0, getHotnessCounter(VarHandle.class, "set")); in testVarHandleCounters() 119 assertEquals(0, getHotnessCounter(VarHandle.class, "get")); in testVarHandleCounters() 123 Method setMethod = VarHandle.class.getMethod(accessorName, Object[].class); in testVarHandleCounters() 131 assertEquals(0, getHotnessCounter(VarHandle.class, "set")); in testVarHandleCounters() 132 assertEquals(0, getHotnessCounter(VarHandle.class, "get")); in testVarHandleCounters()
|
/art/test/713-varhandle-invokers/src/ |
D | Main.java | 20 import java.lang.invoke.VarHandle; 68 private static final VarHandle fieldVarHandle; 87 VarHandle.AccessMode.GET_AND_SET, in run() 131 VarHandle vhNull = null; in run() 164 VarHandle vhNull = null; in run() 174 private static final VarHandle fieldVarHandle; 191 VarHandle.AccessMode.GET_AND_SET, in run() 237 VarHandle vhNull = null; in run() 290 VarHandle vhNull = null; in run() 300 private static final VarHandle floatsArrayVarHandle; [all …]
|
/art/test/710-varhandle-creation/ |
D | info.txt | 1 This test checks VarHandle creation and the VarHandle instance methods
|
/art/test/716-jli-jit-samples/ |
D | expected.txt | 3 VarHandle OK
|
D | info.txt | 1 Test MethodHandle and VarHandle invokes do not accumulate JIT samples
|
/art/test/712-varhandle-invocations/ |
D | info.txt | 1 Generates and runs tests that invoke VarHandle accessor methods.
|
/art/test/709-checker-varhandles/ |
D | info.txt | 1 Test support for intrinsics in Java 9 java.lang.invoke.VarHandle.
|