aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_native_bif.c
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.c
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.c')
-rw-r--r--erts/emulator/hipe/hipe_native_bif.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_native_bif.c b/erts/emulator/hipe/hipe_native_bif.c
index d8044fe6da..e1c22701d0 100644
--- a/erts/emulator/hipe/hipe_native_bif.c
+++ b/erts/emulator/hipe/hipe_native_bif.c
@@ -495,6 +495,12 @@ BIF_RETTYPE nbif_impl_hipe_bs_validate_unicode(NBIF_ALIST_1)
return NIL;
}
+Uint hipe_is_unicode(Eterm arg)
+{
+ return (Uint) validate_unicode(arg);
+}
+
+
int hipe_bs_validate_unicode_retract(ErlBinMatchBuffer* mb, Eterm arg)
{
if (!validate_unicode(arg)) {