Package qilin.core.invokedynamic
Class LambdaMetafactoryModel
java.lang.Object
qilin.core.invokedynamic.LambdaMetafactoryModel
- All Implemented Interfaces:
MethodEffectModel
Precisely models invokedynamic call sites whose
DynamicInvokeResolver target is a
non-capturing static LambdaMetafactory implementation - every non-capturing lambda body
and every static method reference. 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.
Calls on that object then dispatch straight to the target, with the functional interface's
arguments bound.
All other targets (captured values, instance/constructor refs) are called from the
invokedynamic statement itself, like CHA/RTA/Spark do - see
CallGraphBuilder#addDynamicInvokeEdge.
-
Constructor Summary
ConstructorsConstructorDescriptionLambdaMetafactoryModel(PTAScene ptaScene, PAG pag, DynamicInvokeResolver resolver) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidapply(SootMethod m) static booleanhandles(InvokableStmt stmt, DynamicInvokeTarget target) Whether this model handlestargetof the invokedynamicstmt: a non-capturing static lambda implementation whose functional object is assigned to a local.
-
Constructor Details
-
LambdaMetafactoryModel
-
-
Method Details
-
handles
Whether this model handlestargetof the invokedynamicstmt: a non-capturing static lambda implementation whose functional object is assigned to a local. -
appliesTo
- Specified by:
appliesToin interfaceMethodEffectModel
-
apply
- Specified by:
applyin interfaceMethodEffectModel
-