summaryrefslogtreecommitdiff
path: root/erts/emulator/beam/erl_db_util.c
diff options
context:
space:
mode:
authorDanil Zagoskin <z@gosk.in>2021-07-05 19:35:16 +0300
committerDanil Zagoskin <z@gosk.in>2021-07-06 15:55:54 +0300
commit954fd530e44cf75de718c07be1ab332b1ea27e80 (patch)
tree7c69603d61b44192129b0d5bf309788503d53fee /erts/emulator/beam/erl_db_util.c
parentdd3c4c27f888b63c65b789961a603120f06f2215 (diff)
downloaderlang-954fd530e44cf75de718c07be1ab332b1ea27e80.tar.gz
erts,stdlib: Allow binary bifs in match_spec and trace pattern guards
This commit adds byte_size/2, binary_part/2 and binary_part/3 to a valid guard lists, extending functionality of ets select and tracing.
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r--erts/emulator/beam/erl_db_util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index c799745a6e..952a702a21 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -676,6 +676,24 @@ static DMCGuardBif guard_tab[] =
DBIF_ALL
},
{
+ am_byte_size,
+ &byte_size_1,
+ 1,
+ DBIF_ALL
+ },
+ {
+ am_binary_part,
+ &binary_part_2,
+ 2,
+ DBIF_ALL
+ },
+ {
+ am_binary_part,
+ &binary_part_3,
+ 3,
+ DBIF_ALL
+ },
+ {
am_tl,
&tl_1,
1,