Skip to content
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

Add live variables analysis before type inference #267

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

MForest7
Copy link
Collaborator

@MForest7 MForest7 commented Mar 3, 2025

  • Add liveness analysis before type inference
    • ForwardAnalyzer stores facts about the variable immediately after the last instruction where the variable was used and ForwardFlowFunction drops facts about dead variables. This pre-analysis slightly increases the total performance without loss of precision.
  • Fixed tests: now we doesn't take into account time spent to compute statistics
  • Add flags for ForwardAnalyzer and ForwardFlowFunctions to enable/disable pre-analysis (alias and/or liveness)
  • Add index to speed up callee resolver

Copy link

@github-advanced-security github-advanced-security bot left a 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.

@MForest7 MForest7 force-pushed the mforest/ts-ti-liveness branch 2 times, most recently from d5d9536 to 878dd37 Compare March 3, 2025 12:26
@MForest7 MForest7 force-pushed the mforest/ts-ti-liveness branch from 981b4ed to 71892b4 Compare March 7, 2025 08:34
Copy link
Member

@Lipen Lipen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@MForest7 MForest7 force-pushed the mforest/ts-ti-liveness branch from d205ad5 to a04e483 Compare March 19, 2025 11:57
@MForest7 MForest7 requested a review from Lipen March 19, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants