aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_binary.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-04-28 23:55:12 +0200
committerRickard Green <[email protected]>2014-05-22 22:32:21 +0200
commitc15cc0737b70ff5d4d1b79e8171106fcafcb1dda (patch)
tree3d15ca61cefee4c4e462aa46853481c2347882ba /erts/emulator/beam/erl_bif_binary.c
parente291c1776cff0446435b392285b7ec6abe5373bd (diff)
downloadotp-c15cc0737b70ff5d4d1b79e8171106fcafcb1dda.tar.gz
otp-c15cc0737b70ff5d4d1b79e8171106fcafcb1dda.tar.bz2
otp-c15cc0737b70ff5d4d1b79e8171106fcafcb1dda.zip
Make binary BIFs converting from lists yield on large input
- erlang:list_to_binary/1 - erlang:iolist_to_binary/1 - erlang:list_to_bitstring/1 - binary:list_to_bin/1
Diffstat (limited to 'erts/emulator/beam/erl_bif_binary.c')
-rw-r--r--erts/emulator/beam/erl_bif_binary.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c
index ff775691b3..7e0e825a0d 100644
--- a/erts/emulator/beam/erl_bif_binary.c
+++ b/erts/emulator/beam/erl_bif_binary.c
@@ -2294,18 +2294,11 @@ BIF_RETTYPE binary_bin_to_list_1(BIF_ALIST_1)
BIF_ERROR(BIF_P,BADARG);
}
-/*
- * Ok, erlang:list_to_binary does not interrupt, and we really don't want
- * an alternative implementation for the exact same thing, why we
- * have descided to use the old non-restarting implementation for now.
- * In reality, there are seldom many iterations involved in doing this, so the
- * problem of long-running bifs is not really that big in this case.
- * So, for now we use the old implementation also in the module binary.
- */
+HIPE_WRAPPER_BIF_DISABLE_GC(binary_list_to_bin, 1)
BIF_RETTYPE binary_list_to_bin_1(BIF_ALIST_1)
{
- return erts_list_to_binary_bif(BIF_P, BIF_ARG_1);
+ return erts_list_to_binary_bif(BIF_P, BIF_ARG_1, bif_export[BIF_binary_list_to_bin_1]);
}
typedef struct {