Do not DBG_DEF vars with % prefix

This commit is contained in:
Gaith Hallak 2022-12-23 21:14:02 +03:00
parent 9619bb6071
commit 04aed6670a

View File

@ -786,9 +786,9 @@ dbg_scoped_var(Env = #env{saved_fresh_names = SavedFreshNames}, Var, SCode) ->
true ->
Register = lookup_var(Env, Var),
case maps:get(Var, SavedFreshNames, Var) of
["%" | _] -> SCode;
"_" -> SCode;
VarName ->
"%" ++ _ -> SCode;
"_" -> SCode;
VarName ->
Def = [{'DBG_DEF', {immediate, VarName}, Register}],
Undef = [{'DBG_UNDEF', {immediate, VarName}, Register}],
Def ++ SCode ++ Undef