diff options
author | Björn Gustavsson <[email protected]> | 2018-04-26 10:35:40 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-04-26 10:35:40 +0200 |
commit | a36e197b53e7f4e67c2e47f3a4410e7e07af3900 (patch) | |
tree | 93cbba3e6b7489c0f7f9e71599b4580d26ac379e /lib/compiler/src | |
parent | ed4a3e682c28b6bfda7008f627f1bf3e748ba211 (diff) | |
parent | 88faa3b4082485ccf7e2c1be9e351be355818fe7 (diff) | |
download | otp-a36e197b53e7f4e67c2e47f3a4410e7e07af3900.tar.gz otp-a36e197b53e7f4e67c2e47f3a4410e7e07af3900.tar.bz2 otp-a36e197b53e7f4e67c2e47f3a4410e7e07af3900.zip |
Merge branch 'bjorn/compiler/misc'
* bjorn/compiler/misc:
beam_validator: Clear X registers in wait_timeout
sys_core_fold: Eliminate crash for map update in guard
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_validator.erl | 2 | ||||
-rw-r--r-- | lib/compiler/src/sys_core_fold.erl | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl index d5aef51dfa..962f17d83c 100644 --- a/lib/compiler/src/beam_validator.erl +++ b/lib/compiler/src/beam_validator.erl @@ -576,7 +576,7 @@ valfun_4({wait,_}, Vst) -> valfun_4({wait_timeout,_,Src}, Vst) -> assert_term(Src, Vst), verify_y_init(Vst), - Vst; + prune_x_regs(0, Vst); valfun_4({loop_rec_end,_}, Vst) -> verify_y_init(Vst), kill_state(Vst); diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl index bb3a9c7628..167383a202 100644 --- a/lib/compiler/src/sys_core_fold.erl +++ b/lib/compiler/src/sys_core_fold.erl @@ -214,6 +214,8 @@ opt_guard_try(#c_case{clauses=Cs}=Term) -> Term#c_case{clauses=opt_guard_try_list(Cs)}; opt_guard_try(#c_clause{body=B0}=Term) -> Term#c_clause{body=opt_guard_try(B0)}; +opt_guard_try(#c_let{vars=[],arg=#c_values{es=[]},body=B}) -> + B; opt_guard_try(#c_let{arg=Arg,body=B0}=Term) -> case opt_guard_try(B0) of #c_literal{}=B -> |