Package qilin.core.invokedynamic
Class LambdaMetafactoryModel
java.lang.Object
qilin.core.invokedynamic.LambdaMetafactoryModel
- All Implemented Interfaces:
MethodEffectModel
Resolves invokedynamic call sites bootstrapped by
java.lang.invoke.LambdaMetafactory
whose target is a plain static method - every non-capturing lambda body and every static method
reference - by reading the target directly out of the bootstrap's MethodHandle constant.
Unlike reflection this needs no external trace/log - the compiler emits the exact target as
constant bootstrap data - so the resolution is sound, not heuristic. Splices in a synthetic
allocation of the functional-interface type (registered with PAG.registerLambdaTarget(java.lang.Object, sootup.core.signatures.MethodSignature, sootup.core.jimple.common.constant.MethodHandle.Kind) so
it becomes a LambdaAllocNode instead of a plain one) before the original
invokedynamic statement, which is left untouched - mirroring how ReflectionModel augments rather than replaces the original call.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LambdaMetafactoryModel
-
-
Method Details
-
appliesTo
- Specified by:
appliesToin interfaceMethodEffectModel
-
apply
- Specified by:
applyin interfaceMethodEffectModel
-