diff options
author | John Högberg <[email protected]> | 2018-09-20 09:37:43 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-09-20 14:02:35 +0200 |
commit | 81d34181d391709e9d2c404fa730ee9b5c72b5e3 (patch) | |
tree | 26c044eebee01fb6abfda86ac1f52cb4c491579f /lib/compiler/src/beam_ssa_pp.erl | |
parent | c6c86e7a8594de25268bdd455a2dce8e8b4f6a51 (diff) | |
download | otp-81d34181d391709e9d2c404fa730ee9b5c72b5e3.tar.gz otp-81d34181d391709e9d2c404fa730ee9b5c72b5e3.tar.bz2 otp-81d34181d391709e9d2c404fa730ee9b5c72b5e3.zip |
Consistently use #b_var{} instead of var_name()
We chose to refer to variables through their var_name() because we
anticipated the need to annotate them, but it turned out we didn't
really need that, and many things become a lot cleaner if the
entire #b_var{} is used to represent variables.
Diffstat (limited to 'lib/compiler/src/beam_ssa_pp.erl')
-rw-r--r-- | lib/compiler/src/beam_ssa_pp.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compiler/src/beam_ssa_pp.erl b/lib/compiler/src/beam_ssa_pp.erl index 9daa2c2523..34ac08b32e 100644 --- a/lib/compiler/src/beam_ssa_pp.erl +++ b/lib/compiler/src/beam_ssa_pp.erl @@ -158,7 +158,7 @@ format_op({Prefix,Name}) -> format_op(Name) -> io_lib:format("~p", [Name]). -format_register(#b_var{name=V}, #{registers:=Regs}) -> +format_register(#b_var{}=V, #{registers:=Regs}) -> {Tag,N} = maps:get(V, Regs), io_lib:format("~p~p", [Tag,N]); format_register(_, #{}) -> "". @@ -224,9 +224,9 @@ format_anno_1(Anno) -> [io_lib:format(" %% Anno: ~p\n", [Anno])] end. -format_live_interval(#b_var{name=V}=Dst, #{live_intervals:=Intervals}) -> +format_live_interval(#b_var{}=Dst, #{live_intervals:=Intervals}) -> case Intervals of - #{V:=Rs0} -> + #{Dst:=Rs0} -> Rs1 = [io_lib:format("~p..~p", [Start,End]) || {Start,End} <- Rs0], Rs = lists:join(" ", Rs1), |