-
Notifications
You must be signed in to change notification settings - Fork 24
Replaced access path bases with access paths in backward dataflow #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
What does the What about the "quality"? Comparing only the performance is not enough for such major change. Pick a metric (number of inferred types, ratio of all type, ratio of annotated type, number of inferred calls, etc) and add "old/new quality" columns. |
094d735
to
3f5fdde
Compare
doAddKnownTypes: Boolean = true, | ||
) : Analyzer<BackwardTypeDomainFact, AnalyzerEvent, EtsMethod, EtsStmt> { | ||
|
||
override val flowFunctions = BackwardFlowFunctions(graph, dominators, savedTypes, doAddKnownTypes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to keep savedTypes
, or somehow justify its removal and clean up the forward flow functions accordingly.
val typeRefinement = typeRefinements[propertyPath] | ||
val refinedType = if (type != null && typeRefinement != null) { | ||
typeProcessor.intersect(typeRefinement, type) | ||
} else type ?: typeRefinement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add { ... }
braces to the else
block.
|
||
refined | ||
} | ||
/*.mapValues { (_, typeFacts) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused code.
logger.warn { "Empty intersection type: ${acc.toStringLimited()} & ${typeFact.toStringLimited()}" } | ||
acc | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format
Replaced nested objects in backward dataflow with access paths, also get a performance increase.