diff options
author | Björn Gustavsson <[email protected]> | 2015-04-26 11:26:09 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-29 12:25:06 +0200 |
commit | cc322a3749218d1e704a351f8c815d653e8c24a4 (patch) | |
tree | 12a32a40ac930266bc50555a694e97e6538f0222 | |
parent | c64199f4fce6c47323014b29623f78d0b3aad24f (diff) | |
download | otp-cc322a3749218d1e704a351f8c815d653e8c24a4.tar.gz otp-cc322a3749218d1e704a351f8c815d653e8c24a4.tar.bz2 otp-cc322a3749218d1e704a351f8c815d653e8c24a4.zip |
beam_utils: Re-use the local helper function drop_labels/1
In 8470558, the drop_labels/1 function was added to beam_utils
as a minor optimization. Since the function is already available,
we might as well use it in index_label/3 too.
-rw-r--r-- | lib/compiler/src/beam_utils.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl index a0132b99e3..b82bcd0e95 100644 --- a/lib/compiler/src/beam_utils.erl +++ b/lib/compiler/src/beam_utils.erl @@ -128,8 +128,7 @@ empty_label_index() -> %% Add an index for a label. index_label(Lbl, Is0, Acc) -> - Is = lists:dropwhile(fun({label,_}) -> true; - (_) -> false end, Is0), + Is = drop_labels(Is0), gb_trees:enter(Lbl, Is, Acc). |