Closed KuechA closed 1 year ago
No, actually, the respective edges from the DFGPass
would probably be removed anyway... I tried an alternative approach by setting the initializer of the variable in the normal DFG Pass with the iterable but I didn't like the solution (even if it would have worked).
No, actually, the respective edges from the
DFGPass
would probably be removed anyway... I tried an alternative approach by setting the initializer of the variable in the normal DFG Pass with the iterable but I didn't like the solution (even if it would have worked).
I just meant, if the user is missing out on this "feature", if he is only using the "normal" DFG pass?
No, actually, the respective edges from the
DFGPass
would probably be removed anyway... I tried an alternative approach by setting the initializer of the variable in the normal DFG Pass with the iterable but I didn't like the solution (even if it would have worked).I just meant, if the user is missing out on this "feature", if he is only using the "normal" DFG pass?
Good point. Since the variable declaration is wrapped in a DeclarationStatement, the DFG edge was indeed not added only with the normal DFG pass. Btw. the DeclarationStatement
has a DFG edge to the ForEachStatement
. Do you have any idea why this is the case? We do not add this edge in our passes
No, actually, the respective edges from the
DFGPass
would probably be removed anyway... I tried an alternative approach by setting the initializer of the variable in the normal DFG Pass with the iterable but I didn't like the solution (even if it would have worked).I just meant, if the user is missing out on this "feature", if he is only using the "normal" DFG pass?
Good point. Since the variable declaration is wrapped in a DeclarationStatement, the DFG edge was indeed not added only with the normal DFG pass. Btw. the
DeclarationStatement
has a DFG edge to theForEachStatement
. Do you have any idea why this is the case? We do not add this edge in our passes
uhm no idea :D @konradweiss ?
I'm generally in favor of this PR. The only thing I dislike is the heavy use of
!!
in the pass.
Agree. Can you change it to a local variable assignment + smart card instead? We should really avoid !!
Kudos, SonarCloud Quality Gate passed!
The variable declaration in a
ForEachStatement
does not have an initializer and is therefore not really considered by theControlFlowSensitiveDFGPass
. We have to handle this case separately.Closes #1006