Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
2924-beam_ssa_type-Remove-unreachable-code.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2924-beam_ssa_type-Remove-unreachable-code.patch of Package erlang
From 5789206390cfffe63a47077647ac20084a42ba39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Fri, 5 Feb 2021 13:46:17 +0100 Subject: [PATCH 14/18] beam_ssa_type: Remove unreachable code Remove code accidentally left during refatoring in ccbfba252aae. --- lib/compiler/src/beam_ssa_type.erl | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/compiler/src/beam_ssa_type.erl b/lib/compiler/src/beam_ssa_type.erl index 5801bbbc08..0132ad40f7 100644 --- a/lib/compiler/src/beam_ssa_type.erl +++ b/lib/compiler/src/beam_ssa_type.erl @@ -979,6 +979,9 @@ will_succeed(#b_set{args=[Src]}, Ts, Ds, Sub) -> %% Checked operation never returns. no; {#{ Src := I }, #{}} -> + %% There can't be any substitution because the instruction + %% is still there. + false = is_map_key(Src, Sub), %Assertion. will_succeed_1(I, Src, Ts, Sub); {#{}, #{}} -> %% The checked instruction has been removed and substituted, so we @@ -1082,15 +1085,9 @@ will_succeed_1(#b_set{op=wait_timeout}, _Src, _Ts, _Sub) -> will_succeed_1(#b_set{op=wait}, _Src, _Ts, _Sub) -> no; -will_succeed_1(#b_set{}, Src, Ts, Sub) -> - case simplify_arg(Src, Ts, Sub) of - #b_var{}=Src -> - %% No substitution; might fail at runtime. - maybe; - _ -> - %% Substituted with literal or other variable; always succeeds. - yes - end. + +will_succeed_1(#b_set{}, _Src, _Ts, _Sub) -> + maybe. simplify_is_record(I, #t_tuple{exact=Exact, size=Size, -- 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