Module org.kink_lang.kink
Class SsaChecker
java.lang.Object
org.kink_lang.kink.internal.program.itreeoptimize.ssafy.SsaChecker
- All Implemented Interfaces:
DeepTransformer.Callback
Determines whether a fun can be converted to SSA.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnchecked exception for an itree which cannot be converted to SSA. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanConvertToSsa(Itree body) Determines whether a fun can be converted to SSA.Transforms dereference of a local var.Transforms the itree.Transforms storing to a local var.
-
Constructor Details
-
SsaChecker
public SsaChecker()
-
-
Method Details
-
canConvertToSsa
Determines whether a fun can be converted to SSA.- Parameters:
body- the fun body to test.- Returns:
- whether the fun can be converted to SSA.
-
derefLvar
Description copied from interface:DeepTransformer.CallbackTransforms dereference of a local var.Dereference of
NoTraitNewValItree,TraitNewValItree,IfItree,BranchItree, andBranchWithElseItreemust not be transformed.- Specified by:
derefLvarin interfaceDeepTransformer.Callback- Parameters:
lvar- the local var.- Returns:
- the result of transformation.
-
storeLvar
Description copied from interface:DeepTransformer.CallbackTransforms storing to a local var.- Specified by:
storeLvarin interfaceDeepTransformer.Callback- Parameters:
lvar- the original local var to be transformed.- Returns:
- the result of transformation.
-
itree
Description copied from interface:DeepTransformer.CallbackTransforms the itree.If
itreeisFastFunItree, the result must also beFastFunItree.- Specified by:
itreein interfaceDeepTransformer.Callback- Parameters:
itree- the itree to be transformed.- Returns:
- the result of transformation.
-