You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now a node returning a null ->get_constant_value() can mean that either a constant value for the node can't be determined, or that something in the expression might have side-effects.
Basically, we should be able to tell that a if ((non_const = 3) + 1) branch will always be taken because the expression will always result in 4, but that the expression can't be folded due to the side-effects of the assignment.
We should also be able to prune a declaration like string foo = non_const + "bar"; because even though we can't determine a constant value for the expression, we know that it doesn't have any side-effects.
The text was updated successfully, but these errors were encountered:
Right now a node returning a null
->get_constant_value()
can mean that either a constant value for the node can't be determined, or that something in the expression might have side-effects.Basically, we should be able to tell that a
if ((non_const = 3) + 1)
branch will always be taken because the expression will always result in4
, but that the expression can't be folded due to the side-effects of the assignment.We should also be able to prune a declaration like
string foo = non_const + "bar";
because even though we can't determine a constant value for the expression, we know that it doesn't have any side-effects.The text was updated successfully, but these errors were encountered: