/art/runtime/mirror/ |
D | method_handle_impl.h | 35 class MANAGED MethodHandle : public Object { 64 const int32_t handle_kind = GetField32(OFFSET_OF_OBJECT_MEMBER(MethodHandle, handle_kind_)); in GetHandleKind() 76 GetField64(OFFSET_OF_OBJECT_MEMBER(MethodHandle, art_field_or_method_))); in GetTargetField() 81 GetField64(OFFSET_OF_OBJECT_MEMBER(MethodHandle, art_field_or_method_))); in GetTargetMethod() 95 HeapReference<mirror::MethodHandle> cached_spread_invoker_; 103 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, cached_spread_invoker_)); in CachedSpreadInvokerOffset() 106 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, nominal_type_)); in NominalTypeOffset() 109 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, method_type_)); in MethodTypeOffset() 112 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, art_field_or_method_)); in ArtFieldOrMethodOffset() 115 return MemberOffset(OFFSETOF_MEMBER(MethodHandle, handle_kind_)); in HandleKindOffset() [all …]
|
D | method_handle_impl-inl.h | 28 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() 36 inline ObjPtr<mirror::Class> MethodHandle::GetTargetClass() { in GetTargetClass()
|
D | call_site-inl.h | 27 inline ObjPtr<MethodHandle> CallSite::GetTarget() { in GetTarget() 28 return GetFieldObject<MethodHandle>(TargetOffset()); in GetTarget()
|
D | method_handle_impl.cc | 25 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()
|
D | call_site.h | 32 ObjPtr<MethodHandle> GetTarget() REQUIRES_SHARED(Locks::mutator_lock_); 39 HeapReference<mirror::MethodHandle> target_;
|
/art/test/957-methodhandle-transforms/src/ |
D | Main.java | 17 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/716-jli-jit-samples/src-art/ |
D | Main.java | 17 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/979-const-method-handle/src/ |
D | Main.java | 19 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/959-invoke-polymorphic-accessors/src/ |
D | Main.java | 16 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/953-invoke-polymorphic-compiler/src/ |
D | Main.java | 17 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/ |
D | Main.smali | 18 # 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/952-invoke-custom/src/ |
D | TestInvocationKinds.java | 21 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()
|
D | UnrelatedBSM.java | 19 import java.lang.invoke.MethodHandle; 27 MethodHandle mh = lookup.findStatic(target, name, methodType); in bsm()
|
D | TestVariableArityLinkerMethod.java | 22 import java.lang.invoke.MethodHandle; 62 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithStringArray() 140 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithIntAndStringArray() 220 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithLongAndIntArray() 259 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithFloatAndLongArray() 296 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithClassAndFloatArray() 333 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithDoubleArray() 368 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithClassArray() 448 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithWiderArray() 478 MethodHandle mh = lookup.findStatic(lookup.lookupClass(), methodName, methodType); in bsmWithBoxedArray()
|
/art/test/958-methodhandle-stackframe/src-art/ |
D | Main.java | 17 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/ |
D | MethodHandleToString.smali | 24 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;
|
D | TooFewArguments.smali | 24 # 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…
|
D | MethodHandleNotInvoke.smali | 24 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;
|
D | Subclass.smali | 25 # 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 ] …
|
D | TooManyArguments.smali | 24 # 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/ |
D | Test1948.java | 21 import java.lang.invoke.MethodHandle; 35 MethodHandle getClassBase64 = MethodHandles.lookup().findStatic( 37 MethodHandle getDexBase64 = MethodHandles.lookup().findStatic(
|
/art/test/959-invoke-polymorphic-accessors/ |
D | expected.txt | 3 Passed MethodHandle.invokeExact() tests for accessors. 4 Passed MethodHandle.invoke() tests for accessors.
|
/art/runtime/ |
D | method_handles.cc | 362 inline bool IsInvoke(const mirror::MethodHandle::Kind handle_kind) { in IsInvoke() 363 return handle_kind <= mirror::MethodHandle::Kind::kLastInvokeKind; in IsInvoke() 366 inline bool IsInvokeTransform(const mirror::MethodHandle::Kind handle_kind) { in IsInvokeTransform() 367 return (handle_kind == mirror::MethodHandle::Kind::kInvokeTransform in IsInvokeTransform() 368 || handle_kind == mirror::MethodHandle::Kind::kInvokeCallSiteTransform); in IsInvokeTransform() 371 inline bool IsInvokeVarHandle(const mirror::MethodHandle::Kind handle_kind) { in IsInvokeVarHandle() 372 return (handle_kind == mirror::MethodHandle::Kind::kInvokeVarHandle || in IsInvokeVarHandle() 373 handle_kind == mirror::MethodHandle::Kind::kInvokeVarHandleExact); in IsInvokeVarHandle() 376 inline bool IsFieldAccess(mirror::MethodHandle::Kind handle_kind) { in IsFieldAccess() 377 return (handle_kind >= mirror::MethodHandle::Kind::kFirstAccessorKind in IsFieldAccess() [all …]
|
D | method_handles.h | 32 class MethodHandle; variable 132 Handle<mirror::MethodHandle> method_handle, 140 Handle<mirror::MethodHandle> method_handle,
|
/art/test/dexdump/ |
D | const-method-handle.lst | 5 0x00000434 94 constmethodhandle.ConstTest displayMethodHandle (Ljava/lang/invoke/MethodHandle;)V Co… 8 0x00000518 6 constmethodhandle.ConstTest test1 ()Ljava/lang/invoke/MethodHandle; ConstTest.java -1
|