/art/test/712-varhandle-invocations/src/ |
D | VarHandleTypeConversionTests.java | 26 private static final VarHandle vh; field in VarHandleTypeConversionTests.VoidReturnTypeTest 31 vh = MethodHandles.lookup().findVarHandle(cls, "i", int.class); 40 vh.setVolatile(this, 33); in doTest() 41 vh.get(this); in doTest() 42 vh.compareAndSet(this, 33, 44); in doTest() 43 vh.compareAndSet(this, 27, 16); in doTest() 44 vh.weakCompareAndSet(this, 17, 19); in doTest() 45 vh.getAndSet(this, 200000); in doTest() 46 vh.getAndBitwiseXor(this, 0x5a5a5a5a); in doTest() 47 vh.getAndAdd(this, 99); in doTest() [all …]
|
D | VarHandleBadCoordinateTests.java | 25 private static final VarHandle vh; field in VarHandleBadCoordinateTests.FieldCoordinateTypeTest 39 vh = MethodHandles.lookup().findVarHandle(A.class, "field", byte.class); 47 vh.compareAndSet(new A(), (byte) 0, (byte) 3); in doTest() 48 vh.compareAndSet(new B(), (byte) 0, (byte) 3); in doTest() 50 vh.compareAndSet(new C(), (byte) 0, (byte) 3); in doTest() 55 vh.compareAndSet(0xbad0bad0, (byte) 0, (byte) 3); in doTest() 60 vh.compareAndSet(0xbad0bad0, (byte) 0, Integer.MAX_VALUE); in doTest() 65 vh.compareAndSet(0xbad0bad0, (byte) 0); in doTest() 70 vh.compareAndSet(new A(), (byte) 0, Integer.MAX_VALUE); in doTest() 75 vh.compareAndSet((A) null, (byte) 0, (byte) 3); in doTest() [all …]
|
D | VarHandleAccessorExceptionTests.java | 25 private static final VarHandle vh = null; field in VarHandleAccessorExceptionTests.NullReceiverTest 30 vh.set(3); in doTest() 43 private static final VarHandle vh; field in VarHandleAccessorExceptionTests.UnsupportedAccessModeTest 48 vh = MethodHandles.lookup().findStaticVarHandle(cls, "b", boolean.class); 58 vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND); in doTest() 61 vh.getAndBitwiseAnd(true); in doTest() 74 private static final VarHandle vh; field in VarHandleAccessorExceptionTests.WrongArgumentTypeCausingWrongMethodTypeTest 79 vh = MethodHandles.lookup().findVarHandle(cls, "s", short.class); 87 vh.set(this, (short) 0xcafe); in doTest() 89 vh.setVolatile(this, System.out); // System.out is a PrintStream, not short! in doTest() [all …]
|
D | VarHandleReflectiveTest.java | 24 private static final VarHandle vh; field in VarHandleReflectiveTest.ReflectiveAccessorInvocations 30 vh = MethodHandles.lookup().findStaticVarHandle(cls, "field", int.class); 42 accessorMethod.invoke(vh, new Object[] {new Object[] {}}); in doTest()
|
/art/runtime/mirror/ |
D | var_handle_test.cc | 71 Handle<ArrayElementVarHandle> vh = hs.NewHandle( in CreateArrayElementVarHandle() local 79 InitializeVarHandle(vh.Get(), var_type, array_class, index_type, access_modes_bit_mask); in CreateArrayElementVarHandle() 80 return vh.Get(); in CreateArrayElementVarHandle() 137 static void InitializeVarHandle(ObjPtr<VarHandle> vh, in InitializeVarHandle() argument 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() argument 150 InitializeVarHandle(vh, var_type, access_modes_bit_mask); in InitializeVarHandle() 151 vh->SetFieldObject<false>(VarHandle::CoordinateType0Offset(), coordinate_type0.Get()); in InitializeVarHandle() 154 static void InitializeVarHandle(ObjPtr<VarHandle> vh, in InitializeVarHandle() argument [all …]
|
D | var_handle.cc | 1429 ObjPtr<VarHandle> vh = this; in GetMethodTypeMatchForAccessMode() local 1430 ObjPtr<Class> var_type = vh->GetVarType(); in GetMethodTypeMatchForAccessMode() 1475 Handle<VarHandle> vh(hs.NewHandle(this)); in IsInvokerMethodTypeCompatible() local 1476 Handle<Class> var_type(hs.NewHandle(vh->GetVarType())); in IsInvokerMethodTypeCompatible() 1519 Handle<VarHandle> vh = hs.NewHandle(var_handle); in GetMethodTypeForAccessMode() local 1520 Handle<Class> rtype = hs.NewHandle(GetReturnType(access_mode_template, vh->GetVarType())); in GetMethodTypeForAccessMode() 1522 vh->GetCoordinateType0(), in GetMethodTypeForAccessMode() 1523 vh->GetCoordinateType1()); in GetMethodTypeForAccessMode() 1534 vh->GetVarType(), in GetMethodTypeForAccessMode() 1535 vh->GetCoordinateType0(), in GetMethodTypeForAccessMode() [all …]
|
/art/runtime/ |
D | method_handles.cc | 971 Handle<mirror::VarHandle> vh, in DoVarHandleInvokeTranslationUnchecked() argument 990 if (!vh->Access(access_mode, accessor_frame.get(), &accessor_operands, result)) { in DoVarHandleInvokeTranslationUnchecked() 1040 Handle<mirror::VarHandle> vh(hs.NewHandle(ObjPtr<mirror::VarHandle>::DownCast(receiver))); in DoVarHandleInvokeTranslation() local 1041 DCHECK(GetClassRoot<mirror::VarHandle>()->IsAssignableFrom(vh->GetClass())); in DoVarHandleInvokeTranslation() 1049 hs.NewHandle(vh->GetMethodTypeForAccessMode(self, access_mode)); in DoVarHandleInvokeTranslation() 1073 vh, in DoVarHandleInvokeTranslation()
|