Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Sep 2, 2024
1 parent a1cf420 commit e88ec74
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions lib/compiler/test/beam_debug_info_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,9 @@ source_variables(Abstr) ->
{function,_,Name,Arity,_}=F <- Abstr].

extract_src_vars(F) ->
case any_executable_line_instrs(F) of
true ->
L1 = extract_src_vars(F, true, #{}),
L2 = [V || V := true <- L1],
lists:sort(L2);
false ->
%% There are no executable_line instructions in this
%% function. This happens if code has been placed in a
%% header filer, or if the `-file()` attribute has been
%% used to change the name of the source file.
[]
end.
L1 = extract_src_vars(F, true, #{}),
L2 = [V || V := true <- L1],
lists:sort(L2).

extract_src_vars({var,_,'_'}, _Lc, Acc) ->
Acc;
Expand Down Expand Up @@ -290,6 +281,10 @@ extract_src_vars({function,_Anno,_,_,Cs}, _Lc, Acc0) ->
true ->
extract_cs(Cs, true, Acc0);
false ->
%% There are no executable_line instructions in this
%% function. This happens if code has been placed in a
%% header filer, or if the `-file()` attribute has been
%% used to change the name of the source file.
Acc0
end;
extract_src_vars({'fun',_Anno,{clauses,Cs}}, _Lc, Acc0) ->
Expand Down

0 comments on commit e88ec74

Please sign in to comment.