Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add minimal binary pattern support for null checks in DFA#6877

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mavasani merged 1 commit intodotnet:mainfromYoussef1313:dfa-binary-pattern
Aug 29, 2023

Conversation

@Youssef1313
Copy link
Member

@Youssef1313Youssef1313 commentedAug 20, 2023
edited
Loading

Fixes#6755

@mavasani I have added very very minimal handling for binary patterns.

This doesn't handle declaration patterns, etc etc.

I can try to go further with the implementation whenever I get time again :)

I know my implementation might not be good enough. So, feel free if you wanted to close this PR and have a completely different fix.

@Youssef1313Youssef1313 requested a review froma team as acode ownerAugust 20, 2023 16:52
@codecov
Copy link

codecovbot commentedAug 20, 2023
edited
Loading

Codecov Report

Merging#6877 (b1d9dc2) intomain (3587540) willdecrease coverage by0.01%.
Report is 3 commits behind head on main.
The diff coverage is97.95%.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #6877      +/-   ##==========================================- Coverage   96.39%   96.39%   -0.01%==========================================  Files        1403     1403                Lines      330977   331075      +98       Branches    10890    10900      +10     ==========================================+ Hits       319055   319148      +93- Misses       9188     9191       +3- Partials     2734     2736       +2

predicateValueKind=PredicateValueKind.Unknown;

// We special case common null check to reduce false positives. But this implementation for BinaryPattern is very incomplete.
if(FlowBranchConditionKind==ControlFlowConditionKind.WhenFalse)

Choose a reason for hiding this comment

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

This is a nice optimization! Generic flow analysis handling for binary pattern operations is going to be non-trivial as there are sort of conditional branches with theand andor operators. I think this is a good starting point to handle the most important cases.

Copy link

@mavasanimavasani left a comment

Choose a reason for hiding this comment

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

Youssef1313 reacted with heart emoji
@mavasanimavasani merged commitbab9b10 intodotnet:mainAug 29, 2023
@Youssef1313Youssef1313 deleted the dfa-binary-pattern branchAugust 29, 2023 04:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@mavasanimavasanimavasani approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

CA1062 stumbles when pattern-matching with[]

2 participants

@Youssef1313@mavasani

[8]ページ先頭

©2009-2025 Movatter.jp