Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
2932-beam_ssa_lint-Slightly-optimize-a-list-com...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2932-beam_ssa_lint-Slightly-optimize-a-list-comprehension.patch of Package erlang
From e6d2665b7b19c655764eac5ec43dc6e30ca2b6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Sat, 20 Feb 2021 08:12:02 +0100 Subject: [PATCH 2/6] beam_ssa_lint: Slightly optimize a list comprehension Move the extraction of an element from a record out of the list comprehension. --- lib/compiler/src/beam_ssa_lint.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compiler/src/beam_ssa_lint.erl b/lib/compiler/src/beam_ssa_lint.erl index b518cb823f..2b4b5af1e5 100644 --- a/lib/compiler/src/beam_ssa_lint.erl +++ b/lib/compiler/src/beam_ssa_lint.erl @@ -326,11 +326,11 @@ vvars_terminator(#b_br{ bool = Arg, succ = Succ, fail = Fail }=I, From, State) - Labels :: list(beam_ssa:label()), From :: beam_ssa:label(), State :: #vvars{}. -vvars_terminator_1(Labels0, From, State0) -> +vvars_terminator_1(Labels0, From, #vvars{branches=Branches}=State0) -> %% Filter out all branches that have already been taken. This should result %% in either all of Labels0 or an empty list. Labels = [To || To <- Labels0, - not maps:is_key({From, To}, State0#vvars.branches)], + not maps:is_key({From, To}, Branches)], true = Labels =:= Labels0 orelse Labels =:= [], %Assertion State1 = foldl(fun(To, State) -> vvars_save_branch(From, To, State) -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor