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
The idea is that only names that contain :: are eligible for dependency tracking, which is why we check for it here. For instance if we see {"name": "foo::bar"} in one place and {"kind": "call", "fn": "foo::bar"} in another, then the second depends on the first. This check also filters out names like "call" in that example, which we do not want to track.
The downside, of course, is that you have to ensure that all names that you care about actually do contain ::, or else unexpected things will happen. In my case, it caused the name alloc$0 to not appear at all in a key part of the JSON!
We should reimplement dependency tracking in a way that avoids the need for this hack.
The text was updated successfully, but these errors were encountered:
Currently, dependency tracking for
mir-json-dce
's dead code elimination is implemented in a very hacky way. One of the more obvious symptoms is here:mir-json/src/lib_util.rs
Lines 190 to 195 in 5d697d5
The idea is that only names that contain
::
are eligible for dependency tracking, which is why we check for it here. For instance if we see{"name": "foo::bar"}
in one place and{"kind": "call", "fn": "foo::bar"}
in another, then the second depends on the first. This check also filters out names like"call"
in that example, which we do not want to track.The downside, of course, is that you have to ensure that all names that you care about actually do contain
::
, or else unexpected things will happen. In my case, it caused the namealloc$0
to not appear at all in a key part of the JSON!We should reimplement dependency tracking in a way that avoids the need for this hack.
The text was updated successfully, but these errors were encountered: