aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/instrs.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-03-07 07:25:32 +0100
committerBjörn Gustavsson <[email protected]>2019-03-19 16:01:59 +0100
commit96730efed3b16bf20149d8716d17486217e51e6e (patch)
treead57f89b3ecf4e8905188a9b91ee3dc226a618b1 /erts/emulator/beam/instrs.tab
parent58d0fdd849da6e4f6a13d26ea32291c21e125055 (diff)
downloadotp-96730efed3b16bf20149d8716d17486217e51e6e.tar.gz
otp-96730efed3b16bf20149d8716d17486217e51e6e.tar.bz2
otp-96730efed3b16bf20149d8716d17486217e51e6e.zip
Combine is_tuple with is_tagged_tuple
Diffstat (limited to 'erts/emulator/beam/instrs.tab')
-rw-r--r--erts/emulator/beam/instrs.tab10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/instrs.tab b/erts/emulator/beam/instrs.tab
index 1eb83b61f2..aeb47c3b0f 100644
--- a/erts/emulator/beam/instrs.tab
+++ b/erts/emulator/beam/instrs.tab
@@ -817,6 +817,16 @@ is_tagged_tuple(Fail, Src, Arityval, Tag) {
}
}
+is_tagged_tuple_ff(NotTupleFail, WrongRecordFail, Src, Arityval, Tag) {
+ Eterm term = $Src;
+ if (is_not_tuple(term)) {
+ $FAIL($NotTupleFail);
+ } else if (ERTS_UNLIKELY((tuple_val(term))[0] != $Arityval ||
+ (tuple_val(term))[1] != $Tag)) {
+ $FAIL($WrongRecordFail);
+ }
+}
+
is_tuple(Fail, Src) {
if (is_not_tuple($Src)) {
$FAIL($Fail);