aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_native_bif.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-03 16:11:00 +0100
committerSverker Eriksson <[email protected]>2017-11-03 16:11:00 +0100
commit5369e34a892bfd8ab5aa98df330e3bbf19497b71 (patch)
tree3318db2776a9d32f77bdafdee0c5268e760c6607 /erts/emulator/hipe/hipe_native_bif.h
parent31e6c79f956f71e80d8f6be48e5ab8df87f2b85c (diff)
downloadotp-5369e34a892bfd8ab5aa98df330e3bbf19497b71.tar.gz
otp-5369e34a892bfd8ab5aa98df330e3bbf19497b71.tar.bz2
otp-5369e34a892bfd8ab5aa98df330e3bbf19497b71.zip
Fix bug in hipe for <<X/utf32>>
by introducing new primop 'is_unicode' with no exception (ab)use and no GC. Replaces bs_validate_unicode which is kept for backward compat for now.
Diffstat (limited to 'erts/emulator/hipe/hipe_native_bif.h')
-rw-r--r--erts/emulator/hipe/hipe_native_bif.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_native_bif.h b/erts/emulator/hipe/hipe_native_bif.h
index 38f874888b..1127d4ac56 100644
--- a/erts/emulator/hipe/hipe_native_bif.h
+++ b/erts/emulator/hipe/hipe_native_bif.h
@@ -67,6 +67,7 @@ AEXTERN(Eterm,nbif_bs_put_utf16be,(Process*,Eterm,byte*,unsigned int));
AEXTERN(Eterm,nbif_bs_put_utf16le,(Process*,Eterm,byte*,unsigned int));
AEXTERN(Eterm,nbif_bs_get_utf16,(void));
AEXTERN(Eterm,nbif_bs_validate_unicode,(Process*,Eterm));
+AEXTERN(Uint,nbif_is_unicode,(Eterm));
AEXTERN(Eterm,nbif_bs_validate_unicode_retract,(void));
AEXTERN(void,nbif_is_divisible,(Process*,Uint,Uint));
@@ -92,6 +93,7 @@ Eterm hipe_bs_utf16_size(Eterm);
BIF_RETTYPE nbif_impl_hipe_bs_put_utf16be(NBIF_ALIST_3);
BIF_RETTYPE nbif_impl_hipe_bs_put_utf16le(NBIF_ALIST_3);
BIF_RETTYPE nbif_impl_hipe_bs_validate_unicode(NBIF_ALIST_1);
+Uint hipe_is_unicode(Eterm);
struct erl_bin_match_buffer;
int hipe_bs_validate_unicode_retract(struct erl_bin_match_buffer*, Eterm);
BIF_RETTYPE nbif_impl_hipe_is_divisible(NBIF_ALIST_2);