1#
2# %CopyrightBegin%
3#
4# Copyright Ericsson AB 1996-2020. All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# %CopyrightEnd%
19#
20
21#
22# File format:
23#
24# Lines starting with '#' are ignored.
25#
26# <bif-decl> ::= "bif" <bif> <C-name>* |
27#                "ubif" <bif> <C-name>* |
28#                "hbif" <bif> <C-name>*
29# <bif> ::= <module> ":" <name> "/" <arity>
30#
31# ubif:   Use for operators and guard BIFs.
32#
33# hbif:   Use for BIFs that perform garbage collection or need up-to-date
34#         information on where they were called from. These must be called
35#         through the export entry.
36#
37# bif:    Use for all other BIFs.
38#
39# Add new BIFs to the end of the file.
40#
41# Note: Guards BIFs usually require special support in the compiler.
42#
43
44
45ubif erlang:abs/1
46bif erlang:adler32/1
47bif erlang:adler32/2
48bif erlang:adler32_combine/3
49bif erlang:atom_to_list/1
50bif erlang:binary_to_list/1
51bif erlang:binary_to_list/3
52bif erlang:binary_to_term/1
53bif erlang:crc32/1
54bif erlang:crc32/2
55bif erlang:crc32_combine/3
56bif erlang:date/0
57bif erlang:delete_module/1
58bif erlang:display/1
59bif erlang:display_string/1
60bif erlang:display_nl/0
61ubif erlang:element/2
62bif erlang:erase/0
63hbif erlang:erase/1
64bif erlang:exit/1
65bif erlang:exit/2
66bif erlang:exit_signal/2
67bif erlang:external_size/1
68bif erlang:external_size/2
69ubif erlang:float/1
70bif erlang:float_to_list/1
71bif erlang:float_to_list/2
72bif erlang:fun_info/2
73hbif erts_internal:garbage_collect/1
74bif erlang:get/0
75bif erlang:get/1
76bif erlang:get_keys/1
77bif erlang:group_leader/0
78bif erts_internal:group_leader/2
79bif erts_internal:group_leader/3
80bif erlang:halt/2
81bif erlang:phash/2
82bif erlang:phash2/1
83bif erlang:phash2/2
84ubif erlang:hd/1
85bif erlang:integer_to_list/1
86bif erlang:is_alive/0
87ubif erlang:length/1
88bif erlang:link/1
89bif erlang:list_to_atom/1
90bif erlang:list_to_binary/1
91bif erlang:list_to_float/1
92bif erlang:list_to_integer/1
93bif erlang:list_to_pid/1
94bif erlang:list_to_port/1
95bif erlang:list_to_ref/1
96bif erlang:list_to_tuple/1
97bif erlang:loaded/0
98bif erlang:localtime/0
99bif erlang:localtime_to_universaltime/2
100bif erlang:make_ref/0
101bif erlang:unique_integer/0
102bif erlang:unique_integer/1
103bif erlang:md5/1
104bif erlang:md5_init/0
105bif erlang:md5_update/2
106bif erlang:md5_final/1
107bif erlang:module_loaded/1
108bif erlang:function_exported/3
109bif erlang:monitor_node/2
110bif erlang:monitor_node/3
111ubif erlang:node/1
112ubif erlang:node/0
113bif erlang:nodes/1
114bif erlang:now/0
115bif erlang:monotonic_time/0
116bif erlang:monotonic_time/1
117bif erlang:system_time/0
118bif erlang:system_time/1
119bif erlang:time_offset/0
120bif erlang:time_offset/1
121bif erlang:timestamp/0
122
123bif erts_internal:open_port/2
124
125bif erlang:pid_to_list/1
126bif erlang:ports/0
127bif erlang:pre_loaded/0
128bif erlang:process_flag/2
129bif erts_internal:process_flag/3
130hbif erlang:process_info/1
131hbif erlang:process_info/2
132bif erlang:processes/0
133hbif erlang:put/2
134bif erlang:register/2
135bif erlang:registered/0
136ubif erlang:round/1
137ubif erlang:self/0
138bif erlang:setelement/3
139ubif erlang:size/1
140bif erlang:spawn/3
141bif erlang:spawn_link/3
142bif erlang:split_binary/2
143bif erlang:statistics/1
144bif erlang:term_to_binary/1
145bif erlang:term_to_binary/2
146bif erlang:term_to_iovec/1
147bif erlang:term_to_iovec/2
148bif erlang:throw/1
149bif erlang:time/0
150ubif erlang:tl/1
151ubif erlang:trunc/1
152bif erlang:tuple_to_list/1
153bif erlang:universaltime/0
154bif erlang:universaltime_to_localtime/1
155bif erlang:unlink/1
156bif erlang:unregister/1
157bif erlang:whereis/1
158bif erlang:spawn_opt/4
159bif erlang:setnode/2
160bif erlang:dist_get_stat/1
161bif erlang:dist_ctrl_input_handler/2
162bif erlang:dist_ctrl_put_data/2
163bif erlang:dist_ctrl_get_data/1
164bif erlang:dist_ctrl_get_data_notification/1
165bif erlang:dist_ctrl_get_opt/2
166bif erlang:dist_ctrl_set_opt/3
167
168# Static native functions in erts_internal
169bif erts_internal:port_info/1
170bif erts_internal:port_info/2
171bif erts_internal:port_call/3
172bif erts_internal:port_command/3
173bif erts_internal:port_control/3
174bif erts_internal:port_close/1
175bif erts_internal:port_connect/2
176
177bif erts_internal:request_system_task/3
178bif erts_internal:request_system_task/4
179hbif erts_internal:check_process_code/1
180
181bif erts_internal:map_to_tuple_keys/1
182bif erts_internal:term_type/1
183bif erts_internal:map_hashmap_children/1
184
185bif erts_internal:time_unit/0
186bif erts_internal:perf_counter_unit/0
187
188bif erts_internal:is_system_process/1
189
190bif erts_internal:system_check/1
191
192bif erts_internal:scheduler_wall_time/1
193
194bif erts_internal:dirty_process_handle_signals/1
195
196bif erts_internal:create_dist_channel/3
197
198bif erts_internal:ets_super_user/1
199
200bif erts_internal:spawn_request/4
201bif erts_internal:dist_spawn_request/4
202bif erlang:spawn_request_abandon/1
203
204# Static native functions in erts_literal_area_collector
205bif erts_literal_area_collector:release_area_switch/0
206bif erts_literal_area_collector:send_copy_request/3
207
208# inet_db support
209bif erlang:port_set_data/2
210bif erlang:port_get_data/1
211
212# Tracing & debugging.
213bif erts_internal:trace_pattern/3
214bif erts_internal:trace/3
215bif erlang:trace_info/2
216bif erlang:trace_delivered/1
217bif erlang:seq_trace/2
218bif erlang:seq_trace_info/1
219bif erlang:seq_trace_print/1
220bif erlang:seq_trace_print/2
221bif erts_internal:suspend_process/2
222bif erlang:resume_process/1
223bif erts_internal:process_display/2
224
225bif erlang:bump_reductions/1
226
227bif math:cos/1
228bif math:cosh/1
229bif math:sin/1
230bif math:sinh/1
231bif math:tan/1
232bif math:tanh/1
233bif math:acos/1
234bif math:acosh/1
235bif math:asin/1
236bif math:asinh/1
237bif math:atan/1
238bif math:atanh/1
239bif math:erf/1
240bif math:erfc/1
241bif math:exp/1
242bif math:log/1
243bif math:log2/1
244bif math:log10/1
245bif math:sqrt/1
246bif math:atan2/2
247bif math:pow/2
248
249bif erlang:start_timer/3
250bif erlang:start_timer/4
251bif erlang:send_after/3
252bif erlang:send_after/4
253bif erlang:cancel_timer/1
254bif erlang:cancel_timer/2
255bif erlang:read_timer/1
256bif erlang:read_timer/2
257
258bif erlang:make_tuple/2
259bif erlang:append_element/2
260bif erlang:make_tuple/3
261
262bif erlang:system_flag/2
263bif erlang:system_info/1
264# New in R9C
265bif erlang:system_monitor/0
266bif erlang:system_monitor/1
267bif erlang:system_monitor/2
268# Added 2006-11-07
269bif erlang:system_profile/2
270# End Added 2006-11-07
271# Added 2007-01-17
272bif erlang:system_profile/0
273# End Added 2007-01-17
274bif erlang:ref_to_list/1
275bif erlang:port_to_list/1
276bif erlang:fun_to_list/1
277
278bif erlang:monitor/2
279bif erlang:demonitor/1
280bif erlang:demonitor/2
281
282bif erlang:is_process_alive/1
283bif erts_internal:is_process_alive/2
284
285bif erlang:error/1		error_1
286bif erlang:error/2		error_2
287bif erlang:raise/3		raise_3
288
289bif erlang:is_builtin/3
290
291ubif erlang:'and'/2
292ubif erlang:'or'/2
293ubif erlang:'xor'/2
294ubif erlang:'not'/1
295
296ubif erlang:'>'/2			sgt_2
297ubif erlang:'>='/2			sge_2
298ubif erlang:'<'/2			slt_2
299ubif erlang:'=<'/2			sle_2
300ubif erlang:'=:='/2			seq_2
301ubif erlang:'=='/2			seqeq_2
302ubif erlang:'=/='/2			sneq_2
303ubif erlang:'/='/2			sneqeq_2
304ubif erlang:'+'/2			splus_2
305ubif erlang:'-'/2			sminus_2
306ubif erlang:'*'/2			stimes_2
307ubif erlang:'/'/2			div_2
308ubif erlang:'div'/2			intdiv_2
309ubif erlang:'rem'/2
310ubif erlang:'bor'/2
311ubif erlang:'band'/2
312ubif erlang:'bxor'/2
313ubif erlang:'bsl'/2
314ubif erlang:'bsr'/2
315ubif erlang:'bnot'/1
316ubif erlang:'-'/1			sminus_1
317ubif erlang:'+'/1			splus_1
318
319# New operators in R8. These were the only operators missing.
320# erlang:send/2, erlang:append/2 and erlang:subtract/2 are now also
321# defined in erlang.erl, and the C names can be removed when all
322# internal references have been updated to the new ebif_... entries.
323
324bif erlang:'!'/2		ebif_bang_2
325bif erlang:send/2
326bif erlang:send/3
327bif erlang:'++'/2		ebif_plusplus_2
328bif erlang:append/2
329bif erlang:'--'/2		ebif_minusminus_2
330bif erlang:subtract/2
331
332ubif erlang:is_atom/1
333ubif erlang:is_list/1
334ubif erlang:is_tuple/1
335ubif erlang:is_float/1
336ubif erlang:is_integer/1
337ubif erlang:is_number/1
338ubif erlang:is_pid/1
339ubif erlang:is_port/1
340ubif erlang:is_reference/1
341ubif erlang:is_binary/1
342ubif erlang:is_function/1
343ubif erlang:is_function/2
344ubif erlang:is_record/2
345ubif erlang:is_record/3
346
347bif erlang:match_spec_test/3
348
349#
350# Bifs in ets module.
351#
352
353bif ets:internal_request_all/0
354bif ets:new/2
355bif ets:delete/1
356bif ets:delete/2
357bif ets:delete_object/2
358bif ets:first/1
359bif ets:is_compiled_ms/1
360bif ets:lookup/2
361bif ets:lookup_element/3
362bif ets:info/1
363bif ets:info/2
364bif ets:last/1
365bif ets:match/1
366bif ets:match/2
367bif ets:match/3
368bif ets:match_object/1
369bif ets:match_object/2
370bif ets:match_object/3
371bif ets:member/2
372bif ets:next/2
373bif ets:prev/2
374bif ets:insert/2
375bif ets:insert_new/2
376bif ets:rename/2
377bif ets:safe_fixtable/2
378bif ets:slot/2
379bif ets:update_counter/3
380bif ets:select/1
381bif ets:select/2
382bif ets:select/3
383bif ets:select_count/2
384bif ets:select_reverse/1
385bif ets:select_reverse/2
386bif ets:select_reverse/3
387bif ets:select_replace/2
388bif ets:match_spec_compile/1
389bif ets:match_spec_run_r/3
390
391#
392# Bifs in os module.
393#
394
395bif os:getenv/1
396bif os:putenv/2
397bif os:unsetenv/1
398bif os:getpid/0
399bif os:timestamp/0
400bif os:system_time/0
401bif os:system_time/1
402bif os:perf_counter/0
403
404#
405# Bifs in the erl_ddll module (the module actually does not exist)
406#
407
408bif erl_ddll:try_load/3
409bif erl_ddll:try_unload/2
410bif erl_ddll:loaded_drivers/0
411bif erl_ddll:info/2
412bif erl_ddll:format_error_int/1
413bif erl_ddll:monitor/2
414bif erl_ddll:demonitor/1
415
416#
417# Bifs in the re module
418#
419bif re:version/0
420bif re:compile/1
421bif re:compile/2
422bif re:run/2
423bif re:run/3
424bif re:internal_run/4
425
426#
427# Bifs in lists module.
428#
429
430bif lists:member/2
431bif lists:reverse/2
432bif lists:keymember/3
433bif lists:keysearch/3
434bif lists:keyfind/3
435
436#
437# Bifs for debugging.
438#
439
440bif erts_debug:disassemble/1
441bif erts_debug:breakpoint/2
442bif erts_debug:same/2
443bif erts_debug:flat_size/1
444bif erts_debug:get_internal_state/1
445bif erts_debug:set_internal_state/2
446bif erts_debug:display/1
447bif erts_debug:dist_ext_to_term/2
448bif erts_debug:instructions/0
449bif erts_debug:interpreter_size/0
450bif erts_debug:dirty_cpu/2
451bif erts_debug:dirty_io/2
452bif erts_debug:dirty/3
453
454#
455# Lock counter bif's
456#
457bif erts_debug:lcnt_control/2
458bif erts_debug:lcnt_control/1
459bif erts_debug:lcnt_collect/0
460bif erts_debug:lcnt_clear/0
461
462
463#
464# New Bifs in R9C.
465#
466
467hbif erlang:hibernate/3
468bif error_logger:warning_map/0
469
470#
471# New Bifs in R10B.
472#
473bif erlang:get_module_info/1
474bif erlang:get_module_info/2
475ubif erlang:is_boolean/1
476bif string:list_to_integer/1
477bif string:list_to_float/1
478bif erlang:make_fun/3
479bif erlang:iolist_size/1
480bif erlang:iolist_to_binary/1
481bif erlang:list_to_existing_atom/1
482
483#
484# New Bifs in R12B-0
485#
486ubif erlang:is_bitstring/1
487ubif erlang:tuple_size/1
488ubif erlang:byte_size/1
489ubif erlang:bit_size/1
490bif erlang:list_to_bitstring/1
491bif erlang:bitstring_to_list/1
492
493#
494# New Bifs in R12B-2
495#
496bif ets:update_element/3
497
498#
499# New Bifs in R12B-4
500#
501bif erlang:decode_packet/3
502
503#
504# New Bifs in R12B-5
505#
506bif unicode:characters_to_binary/2
507bif unicode:characters_to_list/2
508bif unicode:bin_is_7bit/1
509#
510# New Bifs in R13A.
511#
512bif erlang:atom_to_binary/2
513bif erlang:binary_to_atom/2
514bif erlang:binary_to_existing_atom/2
515bif net_kernel:dflag_unicode_io/1
516#
517# New Bifs in R13B-1
518#
519bif ets:give_away/3
520bif ets:setopts/2
521
522#
523# New Bifs in R13B3
524#
525bif erlang:load_nif/2
526bif erlang:call_on_load_function/1
527bif erlang:finish_after_on_load/2
528
529#
530# New Bifs in R13B04
531#
532bif erlang:binary_to_term/2
533
534#
535# The binary match bifs (New in R14A - EEP9)
536#
537
538#
539# The searching/splitting/substituting thingies
540#
541ubif erlang:binary_part/2
542ubif erlang:binary_part/3
543
544bif binary:compile_pattern/1
545bif binary:match/2
546bif binary:match/3
547bif binary:matches/2
548bif binary:matches/3
549bif binary:longest_common_prefix/1
550bif binary:longest_common_suffix/1
551bif binary:first/1
552bif binary:last/1
553bif binary:at/2
554bif binary:part/2 binary_binary_part_2
555bif binary:part/3 binary_binary_part_3
556bif binary:list_to_bin/1
557bif binary:copy/1
558bif binary:copy/2
559bif binary:referenced_byte_size/1
560bif binary:encode_unsigned/1
561bif binary:encode_unsigned/2
562bif binary:decode_unsigned/1
563bif binary:decode_unsigned/2
564
565bif erlang:nif_error/1
566bif erlang:nif_error/2
567
568#
569# Helpers for unicode filenames
570#
571bif prim_file:internal_name2native/1
572bif prim_file:internal_native2name/1
573bif prim_file:internal_normalize_utf8/1
574bif prim_file:is_translatable/1
575bif file:native_name_encoding/0
576
577#
578# New in R14B04.
579#
580bif erlang:check_old_code/1
581
582
583#
584# New in R15B
585#
586bif erlang:universaltime_to_posixtime/1
587bif erlang:posixtime_to_universaltime/1
588
589#
590# New in R15B01
591#
592
593# The dtrace BIF's are always present, but give dummy results if dynamic trace is not enabled in the build
594bif erlang:dt_put_tag/1
595bif erlang:dt_get_tag/0
596bif erlang:dt_get_tag_data/0
597bif erlang:dt_spread_tag/1
598bif erlang:dt_restore_tag/1
599
600# These are dummies even with enabled dynamic trace unless vm probes are enabled.
601# They are also internal, for dtrace tags sent to the VM's own drivers (efile)
602bif erlang:dt_prepend_vm_tag_data/1
603bif erlang:dt_append_vm_tag_data/1
604
605
606#
607# New in R16B.
608#
609bif erlang:finish_loading/1
610bif erlang:insert_element/3
611bif erlang:delete_element/2
612bif erlang:binary_to_integer/1
613bif erlang:binary_to_integer/2
614bif erlang:integer_to_binary/1
615bif erlang:list_to_integer/2
616bif erlang:float_to_binary/1
617bif erlang:float_to_binary/2
618bif erlang:binary_to_float/1
619
620bif io:printable_range/0
621
622#
623# New in 17.0
624#
625
626bif re:inspect/2
627
628ubif erlang:is_map/1
629ubif erlang:map_size/1
630bif maps:find/2
631bif maps:get/2
632bif maps:from_list/1
633bif maps:is_key/2
634bif maps:keys/1
635bif maps:merge/2
636bif maps:put/3
637bif maps:remove/2
638bif maps:update/3
639bif maps:values/1
640
641bif erts_internal:cmp_term/2
642
643bif ets:take/2
644
645#
646# New in 17.1
647#
648
649bif erlang:fun_info_mfa/1
650
651# New in 18.0
652#
653
654bif erlang:get_keys/0
655bif ets:update_counter/4
656bif erts_debug:map_info/1
657
658#
659# New in 19.0
660#
661
662bif erts_internal:is_process_executing_dirty/1
663bif erts_internal:check_dirty_process_code/2
664bif erts_internal:purge_module/2
665bif binary:split/2
666bif binary:split/3
667bif erts_debug:size_shared/1
668bif erts_debug:copy_shared/1
669bif erlang:has_prepared_code_on_load/1
670
671bif maps:take/2
672
673#
674# New in 20.0
675#
676
677ubif erlang:floor/1
678ubif erlang:ceil/1
679bif math:floor/1
680bif math:ceil/1
681bif math:fmod/2
682bif os:set_signal/2
683
684#
685# New in 20.1
686#
687bif erlang:iolist_to_iovec/1
688
689#
690# New in 21.0
691#
692
693bif erts_internal:get_dflags/0
694bif erts_internal:new_connection/1
695bif erts_internal:map_next/3
696bif ets:whereis/1
697bif erts_internal:gather_alloc_histograms/1
698bif erts_internal:gather_carrier_info/1
699ubif erlang:map_get/2
700ubif erlang:is_map_key/2
701bif ets:internal_delete_all/2
702bif ets:internal_select_delete/2
703
704#
705# New in 21.2
706#
707
708bif persistent_term:put/2
709bif persistent_term:get/1
710bif persistent_term:get/0
711bif persistent_term:erase/1
712bif persistent_term:info/0
713bif erts_internal:erase_persistent_terms/0
714
715bif erts_internal:atomics_new/2
716bif atomics:get/2
717bif atomics:put/3
718bif atomics:add/3
719bif atomics:add_get/3
720bif atomics:exchange/3
721bif atomics:compare_exchange/4
722bif atomics:info/1
723
724bif erts_internal:counters_new/1
725bif erts_internal:counters_get/2
726bif erts_internal:counters_add/3
727bif erts_internal:counters_put/3
728bif erts_internal:counters_info/1
729
730#
731# New in 21.2.3
732#
733
734bif erts_internal:spawn_system_process/3
735
736#
737# New in 21.3
738#
739
740bif erlang:integer_to_list/2
741bif erlang:integer_to_binary/2
742bif persistent_term:get/2
743
744#
745# New in 22.1
746#
747
748bif erts_internal:ets_lookup_binary_info/2
749bif erts_internal:ets_raw_first/1
750bif erts_internal:ets_raw_next/2
751
752#
753# New in 22.2
754#
755
756bif erts_internal:abort_pending_connection/2
757
758
759#
760# New in 23
761#
762
763bif erts_internal:get_creation/0
764
765#
766# New in 24
767#
768
769bif erts_internal:prepare_loading/2
770bif erts_internal:beamfile_chunk/2
771bif erts_internal:beamfile_module_md5/1
772bif os:env/0
773bif erlang:alias/1
774bif erlang:unalias/1
775bif erlang:monitor/3
776bif erlang:error/3
777bif maps:from_keys/2
778