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

avoid dead code insertion during insertOnEdge #1742

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

benSepanski
Copy link

if originalPred does not fall through, but is not a gotoStmt, then dead code can be inserted. For example, if inserting on the edge (point_src, point_tgt) here:

    if [some condition] goto label1    // point_src
    throw exception                    // originalPred
label1:
    return                             // point_tgt

This can be generating using a function such as

class Example
{
    public void example(int x)
    {
        if(x == 0)
        {
            throw new IllegalArgumentException("x should not be zero!");
        }
        return;
    }
}

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