diff options
author | Björn Gustavsson <[email protected]> | 2018-04-25 10:34:26 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-04-25 10:34:26 +0200 |
commit | 3682b7dab5a67843e54f0a93cc00a08b235c20c7 (patch) | |
tree | ba8c5d7d660c3ab387e2d250cf520e1b784cf3d9 /lib/stdlib | |
parent | 0e669ed13e20d5d68aa617aacd807eca7268d070 (diff) | |
parent | ad72c0d37ffb214cac874f51ac29fe2cdb47a2a4 (diff) | |
download | otp-3682b7dab5a67843e54f0a93cc00a08b235c20c7.tar.gz otp-3682b7dab5a67843e54f0a93cc00a08b235c20c7.tar.bz2 otp-3682b7dab5a67843e54f0a93cc00a08b235c20c7.zip |
Merge branch 'map-get-bif' of git://github.com/michalmuskala/otp
* 'map-get-bif' of git://github.com/michalmuskala/otp:
Introduce map_get guard-safe function
OTP-15037
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/erl_internal.erl | 2 | ||||
-rw-r--r-- | lib/stdlib/src/ms_transform.erl | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/stdlib/src/erl_internal.erl b/lib/stdlib/src/erl_internal.erl index 89b97b901e..6d3d5baa23 100644 --- a/lib/stdlib/src/erl_internal.erl +++ b/lib/stdlib/src/erl_internal.erl @@ -76,6 +76,7 @@ guard_bif(floor, 1) -> true; guard_bif(hd, 1) -> true; guard_bif(length, 1) -> true; guard_bif(map_size, 1) -> true; +guard_bif(map_get, 2) -> true; guard_bif(node, 0) -> true; guard_bif(node, 1) -> true; guard_bif(round, 1) -> true; @@ -337,6 +338,7 @@ bif(list_to_tuple, 1) -> true; bif(load_module, 2) -> true; bif(make_ref, 0) -> true; bif(map_size,1) -> true; +bif(map_get,2) -> true; bif(max,2) -> true; bif(min,2) -> true; bif(module_loaded, 1) -> true; diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl index 6616e957c0..ec8cfd56c2 100644 --- a/lib/stdlib/src/ms_transform.erl +++ b/lib/stdlib/src/ms_transform.erl @@ -944,6 +944,7 @@ real_guard_function(node,1) -> true; real_guard_function(round,1) -> true; real_guard_function(size,1) -> true; real_guard_function(map_size,1) -> true; +real_guard_function(map_get,2) -> true; real_guard_function(tl,1) -> true; real_guard_function(trunc,1) -> true; real_guard_function(self,0) -> true; @@ -1115,5 +1116,3 @@ normalise_list([H|T]) -> [normalise(H)|normalise_list(T)]; normalise_list([]) -> []. - - |