Home
last modified time | relevance | path

Searched refs:MethodHandle (Results 1 – 25 of 94) sorted by relevance

1234

/art/runtime/mirror/
Dmethod_handle_impl.h36 class MANAGED MethodHandle : public Object {
67 const int32_t handle_kind = GetField32(OFFSET_OF_OBJECT_MEMBER(MethodHandle, handle_kind_)); in GetHandleKind()
79 GetField64(OFFSET_OF_OBJECT_MEMBER(MethodHandle, art_field_or_method_))); in GetTargetField()
84 GetField64(OFFSET_OF_OBJECT_MEMBER(MethodHandle, art_field_or_method_))); in GetTargetMethod()
100 HeapReference<mirror::MethodHandle> cached_spread_invoker_;
108 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, cached_spread_invoker_)); in CachedSpreadInvokerOffset()
111 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, nominal_type_)); in NominalTypeOffset()
114 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, method_type_)); in MethodTypeOffset()
117 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, art_field_or_method_)); in ArtFieldOrMethodOffset()
120 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, handle_kind_)); in HandleKindOffset()
[all …]
Dmethod_handle_impl-inl.h28 inline ObjPtr<mirror::MethodType> MethodHandle::GetMethodType() { in GetMethodType()
29 return GetFieldObject<mirror::MethodType>(OFFSET_OF_OBJECT_MEMBER(MethodHandle, method_type_)); in GetMethodType()
32 inline ObjPtr<mirror::MethodType> MethodHandle::GetNominalType() { in GetNominalType()
33 return GetFieldObject<mirror::MethodType>(OFFSET_OF_OBJECT_MEMBER(MethodHandle, nominal_type_)); in GetNominalType()
Dmethod_handle_impl.cc25 const char* MethodHandle::GetReturnTypeDescriptor(const char* invoke_method_name) { in GetReturnTypeDescriptor()
33 void MethodHandle::Initialize(uintptr_t art_field_or_method, in Initialize()
47 MethodHandle::Kind kind, in Create()
57 void MethodHandle::VisitTarget(ReflectiveValueVisitor* v) { in VisitTarget()
Dcall_site-inl.h27 inline ObjPtr<MethodHandle> CallSite::GetTarget() { in GetTarget()
28 return GetFieldObject<MethodHandle>(TargetOffset()); in GetTarget()
Dcall_site.h34 ObjPtr<MethodHandle> GetTarget() REQUIRES_SHARED(Locks::mutator_lock_);
41 HeapReference<mirror::MethodHandle> target_;
/art/test/1981-structural-redef-private-method-handles/
Dexpected_no_mh.txt2 Reading field FOO using (ID: 0) MethodHandle()Object = (ID: 1) value of <FOO FIELD>
3 Reading field BAR using (ID: 2) MethodHandle()Object = (ID: 3) value of <BAR FIELD>
6 Reading field FOO using (ID: 0) MethodHandle()Object = (ID: 1) value of <FOO FIELD>
7 Reading field BAR using (ID: 2) MethodHandle()Object = (ID: 3) value of <BAR FIELD>
8 Reading new field BAZ using (ID: 4) MethodHandle()Object = (ID: 5) <NULL>
9 Reading new field FOO using (ID: 6) MethodHandle()Object = (ID: 1) value of <FOO FIELD>
10 Reading new field BAR using (ID: 7) MethodHandle()Object = (ID: 3) value of <BAR FIELD>
17 Reading field FOO using (ID: 0) MethodHandle()Object = (ID: 9) class art.Test1981$Transform
18 Reading field BAR using (ID: 2) MethodHandle()Object = (ID: 3) value of <BAR FIELD>
19 Reading new field BAZ using (ID: 4) MethodHandle()Object = (ID: 10) 42
[all …]
Dexpected-stdout.txt2 Reading field FOO using (ID: 0) MethodHandle()Object = (ID: 1) value of <FOO FIELD>
4 Reading field BAR using (ID: 3) MethodHandle()Object = (ID: 4) value of <BAR FIELD>
8 Reading field FOO using (ID: 0) MethodHandle()Object = (ID: 1) value of <FOO FIELD>
10 Reading field BAR using (ID: 3) MethodHandle()Object = (ID: 4) value of <BAR FIELD>
12 Reading new field BAZ using (ID: 6) MethodHandle()Object = (ID: 7) <NULL>
14 Reading new field FOO using (ID: 9) MethodHandle()Object = (ID: 1) value of <FOO FIELD>
16 Reading new field BAR using (ID: 11) MethodHandle()Object = (ID: 4) value of <BAR FIELD>
28 Reading field FOO using (ID: 0) MethodHandle()Object = (ID: 15) new_value object
30 Reading field BAR using (ID: 3) MethodHandle()Object = (ID: 4) value of <BAR FIELD>
32 Reading new field BAZ using (ID: 6) MethodHandle()Object = (ID: 16) 42
[all …]
/art/test/957-methodhandle-transforms/src/
DMain.java17 import java.lang.invoke.MethodHandle;
48 MethodHandle handle = MethodHandles.throwException(String.class, in testThrowException()
72 MethodHandle delegate = MethodHandles.lookup().findStatic(Main.class, in testDropArguments()
76 MethodHandle transform = MethodHandles.dropArguments(delegate, 0, int.class, Object.class); in testDropArguments()
158 MethodHandle target = MethodHandles.lookup().findStatic(Main.class, in testCatchException()
162 MethodHandle handler = MethodHandles.lookup().findStatic(Main.class, in testCatchException()
167 MethodHandle adapter = MethodHandles.catchException(target, IllegalArgumentException.class, in testCatchException()
233 MethodHandle test = MethodHandles.lookup().findStatic(Main.class, in testGuardWithTest()
240 final MethodHandle target = MethodHandles.lookup().findStatic(Main.class, in testGuardWithTest()
242 final MethodHandle fallback = MethodHandles.lookup().findStatic(Main.class, in testGuardWithTest()
[all …]
/art/test/1975-hello-structural-transformation/
Dexpected-stdout.txt3 Saving MethodHandle object (ID: 2) MethodHandle()Class for later
4 Saving MethodHandle object (ID: 3) MethodHandle()byte[] for later
5 Saving writable MethodHandle (ID: 4) MethodHandle(Class)void for later
20 (ID: 7) MethodHandle()Class (public static java.lang.Class art.Transform1975.CUR_CLASS) = (ID: 5) c…
21 (ID: 8) MethodHandle()byte[] (public static byte[] art.Transform1975.REDEFINED_DEX_BYTES) = (ID: 6)…
37 (ID: 9) MethodHandle()Class (public static java.lang.Class art.Transform1975.CUR_CLASS) = (ID: 5) c…
38 (ID: 10) MethodHandle()byte[] (public static byte[] art.Transform1975.REDEFINED_DEX_BYTES) = (ID: 6…
57 (ID: 12) MethodHandle()Class (public static java.lang.Class art.Transform1975.CUR_CLASS) = (ID: 5) …
58 (ID: 13) MethodHandle()String (public static java.lang.String art.Transform1975.NEW_STRING) = (ID: …
59 (ID: 14) MethodHandle()byte[] (public static byte[] art.Transform1975.REDEFINED_DEX_BYTES) = (ID: 6…
[all …]
/art/test/716-jli-jit-samples/src-art/
DMain.java17 import java.lang.invoke.MethodHandle;
81 MethodHandle mh = in testMethodHandleCounters()
87 assertEquals(0, getHotnessCounter(MethodHandle.class, "invoke")); in testMethodHandleCounters()
88 assertEquals(0, getHotnessCounter(MethodHandle.class, "invokeExact")); in testMethodHandleCounters()
93 Method invokeMethod = MethodHandle.class.getMethod(methodName, Object[].class); in testMethodHandleCounters()
94 MethodHandle instance = in testMethodHandleCounters()
105 assertEquals(0, getHotnessCounter(MethodHandle.class, "invoke")); in testMethodHandleCounters()
106 assertEquals(0, getHotnessCounter(MethodHandle.class, "invokeExact")); in testMethodHandleCounters()
/art/test/959-invoke-polymorphic-accessors/src/
DMain.java16 import java.lang.invoke.MethodHandle;
101 static void setByte(MethodHandle m, ValueHolder v, byte value, boolean expectFailure) in setByte()
118 static void setByte(MethodHandle m, byte value, boolean expectFailure) throws Throwable { in setByte()
122 static void getByte(MethodHandle m, ValueHolder v, byte value, boolean expectFailure) in getByte()
140 static void getByte(MethodHandle m, byte value, boolean expectFailure) throws Throwable { in getByte()
144 static void setChar(MethodHandle m, ValueHolder v, char value, boolean expectFailure) in setChar()
161 static void setChar(MethodHandle m, char value, boolean expectFailure) throws Throwable { in setChar()
165 static void getChar(MethodHandle m, ValueHolder v, char value, boolean expectFailure) in getChar()
183 static void getChar(MethodHandle m, char value, boolean expectFailure) throws Throwable { in getChar()
187 static void setShort(MethodHandle m, ValueHolder v, short value, boolean expectFailure) in setShort()
[all …]
/art/test/979-const-method-handle/src/
DMain.java19 import java.lang.invoke.MethodHandle;
105 private static MethodHandle printHelloHandle() { in printHelloHandle()
115 private static MethodHandle setNameHandle() { in setNameHandle()
125 private static MethodHandle getNameHandle() { in getNameHandle()
135 private static MethodHandle getMathE() { in getMathE()
145 private static MethodHandle putMathE() { in putMathE()
155 private static MethodHandle getSval() { in getSval()
167 private static MethodHandle putPeekc() { in putPeekc()
177 private static MethodHandle stackPop() { in stackPop()
187 private static MethodHandle stackTrim() { in stackTrim()
/art/test/953-invoke-polymorphic-compiler/src/
DMain.java17 import java.lang.invoke.MethodHandle;
114 MethodHandle mh; in $opt$BasicTest()
174 MethodHandle mh0 = null; in $opt$BasicTest()
228 MethodHandle mh = in $opt$ReturnBooleanTest()
256 MethodHandle mh = lookup.findStatic(Main.class, "Next", in $opt$ReturnCharTest()
265 MethodHandle mh = lookup.findStatic(Main.class, "Multiply", in $opt$ReturnByteTest()
274 MethodHandle mh = lookup.findStatic(Main.class, "Multiply", in $opt$ReturnShortTest()
283 MethodHandle mh = lookup.findStatic(Main.class, "Multiply", in $opt$ReturnIntTest()
292 MethodHandle mh = lookup.findStatic(Main.class, "Multiply", in $opt$ReturnLongTest()
301 MethodHandle mh = lookup.findStatic(Main.class, "Multiply", in $opt$ReturnFloatTest()
[all …]
/art/test/955-methodhandles-smali/smali/
DMain.smali18 # MethodHandle Main.getHandleForVirtual(Class<?> defc, String name, MethodType type);
22 …al(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
30 …al(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
35 # MethodHandle Main.getHandleForStatic(Class<?> defc, String name, MethodType type);
39 …ic(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
47 …ic(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
53 .method public static getStringConcatHandle()Ljava/lang/invoke/MethodHandle;
64 …al(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
70 .method public static getLongCompareToHandle()Ljava/lang/invoke/MethodHandle;
87 …al(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
[all …]
/art/test/1976-hello-structural-static-methods/
Dexpected-stdout.txt17 Invoking MethodHandle()void (public static void art.Transform1976.sayEverything())
19 Invoking MethodHandle()void (public static void art.Transform1976.sayHi())
58 Invoking MethodHandle()void (public static void art.Transform1976.sayEverything())
61 Invoking MethodHandle()void (public static void art.Transform1976.sayHi())
64 Invoking MethodHandle()void (public static void art.Transform1976.sayBye())
66 Invoking MethodHandle()void (public static void art.Transform1976.sayEverything())
69 Invoking MethodHandle()void (public static void art.Transform1976.sayHi())
/art/test/952-invoke-custom/src/
DTestInvocationKinds.java21 import java.lang.invoke.MethodHandle;
32 MethodHandle mh = in lookupStaticFieldGetter()
54 MethodHandle mh = in lookupStaticFieldSetter()
78 MethodHandle mh = in lookupInstanceFieldSetter()
101 MethodHandle mh = in lookupInstanceFieldGetter()
147 MethodHandle mh = lookup.findVirtual(TestInvocationKinds.class, name, mt); in lookupVirtual()
185 MethodHandle mh = lookup.findConstructor(cls, constructorMethodType); in lookupConstructor()
/art/test/958-methodhandle-stackframe/src-art/
DMain.java17 import java.lang.invoke.MethodHandle;
70 private final MethodHandle delegate;
72 public DelegatingTransformer(MethodHandle delegate) { in DelegatingTransformer()
84 MethodHandle specialFunctionHandle = MethodHandles.lookup().findStatic( in main()
89 MethodHandle delegate = new DelegatingTransformer(specialFunctionHandle); in main()
118 MethodHandle returner = MethodHandles.lookup().findStatic( in main()
/art/test/954-invoke-polymorphic-verifier/smali/
DMethodHandleToString.smali24 invoke-static {}, LMethodHandleToString;->getMethodHandle()Ljava/lang/invoke/MethodHandle;
26 # Attempt invoke-polymorphic on MethodHandle.toString().
27 …invoke-polymorphic {v0}, Ljava/lang/invoke/MethodHandle;->toString()Ljava/lang/String;, ()Ljava/la…
31 .method public static getMethodHandle()Ljava/lang/invoke/MethodHandle;
DMethodHandleNotInvoke.smali24 invoke-static {}, LMethodHandleNotInvoke;->getMethodHandle()Ljava/lang/invoke/MethodHandle;
28 # Attempt invoke-polymorphic on MethodHandle.notInvoke().
29 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/MethodHandle;->notInvoke([Ljava/lang/Object;)Ljava/…
33 .method public static getMethodHandle()Ljava/lang/invoke/MethodHandle;
DTooFewArguments.smali24 # Set up v0 as a null MethodHandle
27 …invoke-virtual {v0}, Ljava/lang/invoke/MethodHandle;->asFixedArity()Ljava/lang/invoke/MethodHandle;
31 …invoke-polymorphic {v0, v1}, Ljava/lang/invoke/MethodHandle;->invoke([Ljava/lang/Object;)Ljava/lan…
DSubclass.smali25 # Get a MethodHandleImpl instance (subclass of MethodHandle).
30 # Calling MethodHandle.invoke() on MethodHandleImpl instance (subclass of MethodHandle) => Okay
31 …invoke-polymorphic {v0, v1, v2}, Ljava/lang/invoke/MethodHandle;->invoke([Ljava/lang/Object;)Ljava…
32 …# Calling MethodHandleImpl.invoke() rather than MethodHandle.invoke() [ declaring class is okay ] …
DTooManyArguments.smali24 # Set up v0 as a null MethodHandle
27 …invoke-virtual {v0}, Ljava/lang/invoke/MethodHandle;->asFixedArity()Ljava/lang/invoke/MethodHandle;
33 …invoke-polymorphic {v0, v1, v2, v3}, Ljava/lang/invoke/MethodHandle;->invoke([Ljava/lang/Object;)L…
/art/test/1948-obsolete-const-method-handle/util-src/src/art/
DTest1948.java21 import java.lang.invoke.MethodHandle;
35 MethodHandle getClassBase64 = MethodHandles.lookup().findStatic(
37 MethodHandle getDexBase64 = MethodHandles.lookup().findStatic(
/art/test/959-invoke-polymorphic-accessors/
Dexpected-stdout.txt3 Passed MethodHandle.invokeExact() tests for accessors.
4 Passed MethodHandle.invoke() tests for accessors.
/art/runtime/
Dmethod_handles.cc363 inline bool IsInvoke(const mirror::MethodHandle::Kind handle_kind) { in IsInvoke()
364 return handle_kind <= mirror::MethodHandle::Kind::kLastInvokeKind; in IsInvoke()
367 inline bool IsInvokeTransform(const mirror::MethodHandle::Kind handle_kind) { in IsInvokeTransform()
368 return (handle_kind == mirror::MethodHandle::Kind::kInvokeTransform in IsInvokeTransform()
369 || handle_kind == mirror::MethodHandle::Kind::kInvokeCallSiteTransform); in IsInvokeTransform()
372 inline bool IsInvokeVarHandle(const mirror::MethodHandle::Kind handle_kind) { in IsInvokeVarHandle()
373 return (handle_kind == mirror::MethodHandle::Kind::kInvokeVarHandle || in IsInvokeVarHandle()
374 handle_kind == mirror::MethodHandle::Kind::kInvokeVarHandleExact); in IsInvokeVarHandle()
377 inline bool IsFieldAccess(mirror::MethodHandle::Kind handle_kind) { in IsFieldAccess()
378 return (handle_kind >= mirror::MethodHandle::Kind::kFirstAccessorKind in IsFieldAccess()
[all …]

1234