aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_plt.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-03-14 10:46:38 +0100
committerHans Bolinder <[email protected]>2017-06-13 13:40:26 +0200
commitce6fe3c77b31e6c0fcb13d347c3fcbbedfd544e7 (patch)
tree6b9c0adcc868f2b804129ae97f3fe85b1af693fe /lib/dialyzer/src/dialyzer_plt.erl
parent020a8817caca2684f8241dc5f9c84a37d53b4ff7 (diff)
downloadotp-ce6fe3c77b31e6c0fcb13d347c3fcbbedfd544e7.tar.gz
otp-ce6fe3c77b31e6c0fcb13d347c3fcbbedfd544e7.tar.bz2
otp-ce6fe3c77b31e6c0fcb13d347c3fcbbedfd544e7.zip
dialyzer: Improve compression of an ETS table
Diffstat (limited to 'lib/dialyzer/src/dialyzer_plt.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_plt.erl14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl
index fa242555c2..1c1814e49c 100644
--- a/lib/dialyzer/src/dialyzer_plt.erl
+++ b/lib/dialyzer/src/dialyzer_plt.erl
@@ -604,20 +604,8 @@ give_away(#mini_plt{info = ETSInfo,
true = ets:give_away(ETSExpTypes, Pid, any),
ok.
-%% Somewhat slower than ets:tab2list(), but uses less memory.
tab2list(T) ->
- tab2list(ets:first(T), T, []).
-
-tab2list('$end_of_table', T, A) ->
- case ets:first(T) of % no safe_fixtable()...
- '$end_of_table' -> A;
- Key -> tab2list(Key, T, A)
- end;
-tab2list(Key, T, A) ->
- Vs = ets:lookup(T, Key),
- Key1 = ets:next(T, Key),
- ets:delete(T, Key),
- tab2list(Key1, T, Vs ++ A).
+ dialyzer_utils:ets_tab2list(T).
%%---------------------------------------------------------------------------
%% Edoc