diff options
author | Patrik Nyblom <[email protected]> | 2010-05-04 14:24:50 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-05-17 15:51:50 +0200 |
commit | 0a3305354685b311cfa85b29214b411b24aafcff (patch) | |
tree | 76f041b7bff237dc33ac0d28101cb4452ec99d26 /lib/stdlib/src/erl_internal.erl | |
parent | ccf8728a95af72aa4847e0844d45dcda991ea435 (diff) | |
download | otp-0a3305354685b311cfa85b29214b411b24aafcff.tar.gz otp-0a3305354685b311cfa85b29214b411b24aafcff.tar.bz2 otp-0a3305354685b311cfa85b29214b411b24aafcff.zip |
Add guard BIFs binary_part/2,3
Add the gc_bif's to the VM.
Add infrastructure for gc_bif's (guard bifs that can gc) with two and.
three arguments in VM (loader and VM).
Add compiler support for gc_bif with three arguments.
Add compiler (and interpreter) support for new guard BIFs.
Add testcases for new guard BIFs in compiler and emulator.
Diffstat (limited to 'lib/stdlib/src/erl_internal.erl')
-rw-r--r-- | lib/stdlib/src/erl_internal.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_internal.erl b/lib/stdlib/src/erl_internal.erl index 16173d8210..41a42f7907 100644 --- a/lib/stdlib/src/erl_internal.erl +++ b/lib/stdlib/src/erl_internal.erl @@ -87,6 +87,8 @@ guard_bif(is_reference, 1) -> true; guard_bif(is_tuple, 1) -> true; guard_bif(is_record, 2) -> true; guard_bif(is_record, 3) -> true; +guard_bif(binary_part, 2) -> true; +guard_bif(binary_part, 3) -> true; guard_bif(Name, A) when is_atom(Name), is_integer(A) -> false. %% Erlang type tests. @@ -229,6 +231,8 @@ bif(apply, 2) -> true; bif(apply, 3) -> true; bif(atom_to_binary, 2) -> true; bif(atom_to_list, 1) -> true; +bif(binary_part, 2) -> true; +bif(binary_part, 3) -> true; bif(binary_to_atom, 2) -> true; bif(binary_to_existing_atom, 2) -> true; bif(binary_to_list, 1) -> true; |