diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-02-12 17:04:26 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-02-19 15:32:17 +0100 |
commit | 3e206565c2032a24b03ca13c313d1879d74dfec6 (patch) | |
tree | 74d358a03755d40763e3a594509b3ed1530a30ac /erts/emulator/beam/ops.tab | |
parent | 210dbf68a62794b51b74337381cd87424a46b2a5 (diff) | |
download | otp-3e206565c2032a24b03ca13c313d1879d74dfec6.tar.gz otp-3e206565c2032a24b03ca13c313d1879d74dfec6.tar.bz2 otp-3e206565c2032a24b03ca13c313d1879d74dfec6.zip |
erts: Introduce new instructions for combined key fetches
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r-- | erts/emulator/beam/ops.tab | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 9ea3a3a8ea..8406f5344a 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -1469,11 +1469,6 @@ apply_last I P # Map instructions in R17. # -# put_map Fail Src Dst Live Size Rest=* => jump Fail -# is_map Fail Src => jump Fail -# has_map_field Fail Src Key => jump Fail -# get_map_element Fail Src Key Dst => jump Fail - put_map_assoc F n Dst Live Size Rest=* => new_map F Dst Live Size Rest put_map_exact F n Dst Live Size Rest=* => new_map F Dst Live Size Rest put_map_assoc F Src Dst Live Size Rest=* => \ @@ -1492,6 +1487,15 @@ is_map f r is_map f x is_map f y +## Transform has_map_field(s) #{ K1 := _, K2 := _ } + +has_map_field/3 + +has_map_fields Fail Src Size=u==1 Rest=* => gen_has_map_field(Fail,Src,Size,Rest) +has_map_fields Fail Src Size Rest=* => i_has_map_fields Fail Src Size Rest + +i_has_map_fields f s I + has_map_field Fail Src=rxy Key=arxy => i_has_map_field Fail Src Key has_map_field Fail Src Key => move Key x | i_has_map_field Fail Src x @@ -1509,6 +1513,15 @@ i_has_map_field f r y i_has_map_field f x y i_has_map_field f y y +## Transform get_map_elements(s) #{ K1 := V1, K2 := V2 } + +get_map_element/4 + +get_map_elements Fail Src=rxy Size=u==2 Rest=* => gen_get_map_element(Fail,Src,Size,Rest) +get_map_elements Fail Src Size Rest=* => i_get_map_elements Fail Src Size Rest + +i_get_map_elements f s I + get_map_element Fail Src=rxy Key=ax Dst => i_get_map_element Fail Src Key Dst get_map_element Fail Src=rxy Key=rycq Dst => \ move Key x | i_get_map_element Fail Src x Dst |