aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-06-29 14:30:24 +0200
committerErlang/OTP <[email protected]>2018-06-29 14:30:24 +0200
commit7ea24a343e003c74004a6d82e36ffbb50997f60a (patch)
treebba74280f5c4bc69a4ad3f4edda554b90129b74e /lib/compiler/src
parentb2aa37d72997df921e935380a77b0e0226f33401 (diff)
parentc221bb38a80f8c3c4263ebdd609ff8ae6e5d117f (diff)
downloadotp-7ea24a343e003c74004a6d82e36ffbb50997f60a.tar.gz
otp-7ea24a343e003c74004a6d82e36ffbb50997f60a.tar.bz2
otp-7ea24a343e003c74004a6d82e36ffbb50997f60a.zip
Merge branch 'bjorn/compiler/fix-map_get/OTP-15157' into maint-21
* bjorn/compiler/fix-map_get/OTP-15157: Fix internal compiler error for map_get/2
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_validator.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index b03fadb197..a1b71251b7 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -546,6 +546,12 @@ valfun_4({bif,raise,{f,0},Src,_Dst}, Vst) ->
kill_state(Vst);
valfun_4(raw_raise=I, Vst) ->
call(I, 3, Vst);
+valfun_4({bif,map_get,{f,Fail},[_Key,Map]=Src,Dst}, Vst0) ->
+ validate_src(Src, Vst0),
+ Vst1 = branch_state(Fail, Vst0),
+ Vst = set_type(map, Map, Vst1),
+ Type = propagate_fragility(term, Src, Vst),
+ set_type_reg(Type, Dst, Vst);
valfun_4({bif,Op,{f,Fail},Src,Dst}, Vst0) ->
validate_src(Src, Vst0),
Vst = branch_state(Fail, Vst0),