Home
last modified time | relevance | path

Searched refs:vh (Results 1 – 9 of 9) sorted by relevance

/art/test/712-varhandle-invocations/src/
DVarHandleTypeConversionTests.java26 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 …]
DVarHandleBadCoordinateTests.java25 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 …]
DVarHandleAccessorExceptionTests.java25 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 …]
DVarHandleReflectiveTest.java24 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/test/1981-structural-redef-private-method-handles/src/art/
DTest1981.java34 public default Object get(Object vh) throws Throwable { in get() argument
38 public default void set(Object vh, Object v) throws Throwable { in set() argument
64 public static String printGeneric(VarHandler vh, Object o) { in printGeneric() argument
80 } else if (vh.instanceofVarHandle(o)) { in printGeneric()
82 return "(ID: " + id + ") " + o.getClass().getName() + "()->" + vh.getVarTypeName(o); in printGeneric()
171 public static void doTest(VarHandler vh) throws Exception { in doTest() argument
184 Object foo_handle = vh.findStaticVarHandle(lookup, Transform.class, "FOO", Object.class); in doTest()
187 foo_handle, vh.findStaticVarHandle(lookup, Transform.class, "BAR", Object.class), in doTest()
195 + printGeneric(vh, handles[i]) in doTest()
197 + printGeneric(vh, handles[i].invoke())); in doTest()
[all …]
DTest1981_Varhandles.java36 public Object get(Object vh) throws Throwable { in get() argument
37 return ((VarHandle) vh).get(); in get()
40 public void set(Object vh, Object v) throws Throwable { in set() argument
41 ((VarHandle) vh).set(v); in set()
/art/runtime/mirror/
Dvar_handle_test.cc71 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 …]
Dvar_handle.cc1429 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/
Dmethod_handles.cc987 Handle<mirror::VarHandle> vh, in DoVarHandleInvokeTranslationUnchecked() argument
1006 if (!vh->Access(access_mode, accessor_frame.get(), &accessor_operands, result)) { in DoVarHandleInvokeTranslationUnchecked()
1056 Handle<mirror::VarHandle> vh(hs.NewHandle(ObjPtr<mirror::VarHandle>::DownCast(receiver))); in DoVarHandleInvokeTranslation() local
1057 DCHECK(GetClassRoot<mirror::VarHandle>()->IsAssignableFrom(vh->GetClass())); in DoVarHandleInvokeTranslation()
1065 hs.NewHandle(vh->GetMethodTypeForAccessMode(self, access_mode)); in DoVarHandleInvokeTranslation()
1089 vh, in DoVarHandleInvokeTranslation()