BEAM documentation (was Re: Packages in Erlang...)

Erik Stenman Erik.Stenman@REDACTED
Mon Sep 15 10:39:47 CEST 2003


> > The Core Language is quite easy, but Erlang is really all the magic
> > bifs. To reimplement these bif will take a long time and be very
> > error prone. Trying to reuse the bifs from the OTP C-source would
> > tie you to using the same tag-scheme, GC, and process model as
> > the ERTS by OTP. 
> 
> Which BIFs are hard?

I did not mean that any of the BIFs would be particularly hard,
it is the sheer number of BIFs that makes it hard. (See below 
for a list of BIFs in R9) Most of these BIFs are dependent on
the tag scheme, the layout and content of the PCB, and of 
course the calling conventions for BIFs. Many of the BIFs also 
have subtle assumptions on how the GC works and on how process 
scheduling in the BEAM works. This means that you can not take 
the C code for these BIFs and use it in your new Erlang system
if you plan to change any of the above mentioned aspects of
the system.

Hence you are faced with three options:
 1. Reimplement all the BIFs yourself to work with your system.
    It is a major undertaking to get all of them working (If 
    you take a look at other Erlang implementations (e.g., ETOS 
    and Gerl) you will see that it is in the support of all these 
    BIFs that these systems lack. It just takes to much time to 
    reimplement all this and get it bug free.
 2. Try to rewrite the BIFs to work with your system hoping that
    you don't overlook some important assumption in the code 
    that don't hold in your system. This looks quite error prone
    to me, and your system can not be to different from BEAM for
    this to work.
 3. Reuse the BEAM system as it is and implement your system 
    on top of it, then when it works you can start trying to 
    slowly change things in the BEAM system that you don't like.
    This is the approach we took in HiPE, and we are now in a 
    position where we actually can have an influence on the
    ERTS by OTP. (Like a new tagging scheme, a unified heap 
    model, Core Erlang etc things that slowly creep in to 
    the OTP system ;)

> On the other hand it's very practical that we're all using 
> the same Erlang system. How boring it would be if there were 
> ten Erlangs, and Mnesia only worked on one, Yaws on a couple 
> of others, etc.

Well this it what I mean. In order for all application to 
work on all Erlang implementations the set of BIFs and how
they work must be identical. This is the hard part. 

 
> BTW, kudos are due to you HiPE guys both for building your 
> stuff on the standard Erlang from OTP and for writing all the 
> code in Erlang. No doubt you were sorely tempted to start 
> from scratch, but actually getting it integrated into OTP is 
> a great accomplishment.

Thanks. 
>From my view this was the only possible way to do it.
We wanted to be able to benchmark different implementation 
techniques on REAL Erlang applications. These types of 
applications tends to use all the strange BIFs in the system 
and depend on quirks in the current implementation, so we had
to be 100% compatible to OTP. What better way to be
compatible than using the same source?


 
> P.S., it's nice to have these threads about BEAM. I just had 
> a browse of the C code, which I haven't really done before. 
> I've observed that one can have large C programs on the 
> computer (Emacs, Linux, etc) without ever knowing how they 
> work, but after you first actually open the code you're 
> inevitably familiar with it within a year or so :-)

...mmm... I feel like seven years is not enough for grocking the
BEAM and its BIFs ;)

/Erik
------------------------------------------------------------------- 
I'm Happi, you should be happy.
Praeterea censeo "0xCA" scribere Erlang posse.


For your reference, here are some BIFs you would have to implement
to be compatible with R9 (remember that you need to support 
bignum and floating-point arithmetic also):


ubif erlang:abs/1
ubif 'erl.lang.number':abs/1		ebif_abs_1
bif erlang:apply/3
bif 'erl.lang':apply/3			ebif_apply_3
bif erlang:atom_to_list/1
bif 'erl.lang.atom':to_string/1		ebif_atom_to_string_1 atom_to_list_1
bif erlang:binary_to_list/1
bif 'erl.lang.binary':to_list/1		ebif_binary_to_list_1
bif erlang:binary_to_list/3
bif 'erl.lang.binary':to_list/3		ebif_binary_to_list_3
bif erlang:binary_to_term/1	
bif 'erl.lang.binary':to_term/1		ebif_binary_to_term_1
bif erlang:check_process_code/2
bif 'erl.system.code':check_process/2	ebif_check_process_code_2
bif erlang:date/0
bif 'erl.util.date':today/0		ebif_date_0
bif erlang:delete_module/1
bif 'erl.system.code':delete/1		ebif_delete_module_1
bif erlang:display/1
bif 'erl.system.debug':display/1	ebif_display_1
bif erlang:display_string/1
bif 'erl.system.debug':display_string/1	ebif_display_string_1
bif erlang:display_nl/0
bif 'erl.system.debug':display_nl/0	ebif_display_nl_0
ubif erlang:element/2
ubif 'erl.lang.tuple':element/2		ebif_element_2
bif erlang:erase/0
bif 'erl.lang.proc.pdict':erase/0	ebif_erase_0
bif erlang:erase/1
bif 'erl.lang.proc.pdict':erase/1	ebif_erase_1
bif erlang:exit/1
bif 'erl.lang':exit/1			ebif_exit_1
bif erlang:exit/2
bif 'erl.lang.proc':signal/2		ebif_signal_2 exit_2
bif erlang:external_size/1
bif 'erl.lang.term':external_size/1	ebif_external_size_1
ubif erlang:float/1
ubif 'erl.lang.number':float/1		ebif_float_1
bif erlang:float_to_list/1
bif 'erl.lang.float':to_string/1	ebif_float_to_string_1
float_to_list_1
bif erlang:fun_info/2
bif 'erl.lang.function':info/2		ebif_fun_info_2
bif erlang:garbage_collect/0
bif 'erl.system':garbage_collect/0	ebif_garbage_collect_0
bif erlang:garbage_collect/1
bif 'erl.system':garbage_collect/1	ebif_garbage_collect_1
bif erlang:get/0
bif 'erl.lang.proc.pdict':get/0		ebif_get_0
bif erlang:get/1
bif 'erl.lang.proc.pdict':get/1		ebif_get_1
bif erlang:get_keys/1
bif 'erl.lang.proc.pdict':get_keys/1	ebif_get_keys_1
bif erlang:group_leader/0
bif 'erl.lang.proc':group_leader/0	ebif_group_leader_0
bif erlang:group_leader/2
bif 'erl.lang.proc':set_group_leader/2	ebif_group_leader_2
bif erlang:halt/0
bif 'erl.lang.node':halt/0		ebif_halt_0
bif erlang:halt/1
bif 'erl.lang.node':halt/1		ebif_halt_1
bif erlang:phash/2
bif erlang:phash2/1
bif erlang:phash2/2
bif 'erl.lang.term':hash/1		ebif_phash2_1
bif 'erl.lang.term':hash/2		ebif_phash2_2
ubif erlang:hd/1
ubif 'erl.lang.list':hd/1		ebif_hd_1
bif erlang:integer_to_list/1
bif 'erl.lang.integer':to_string/1	ebif_integer_to_string_1
integer_to_list_1
bif erlang:is_alive/0
bif 'erl.lang.node':is_alive/0		ebif_is_alive_0
ubif erlang:length/1
ubif 'erl.lang.list':length/1		ebif_length_1
bif erlang:link/1
bif 'erl.lang.proc':link/1		ebif_link_1
bif erlang:list_to_atom/1
bif 'erl.lang.atom':from_string/1	ebif_string_to_atom_1 list_to_atom_1
bif erlang:list_to_binary/1
bif 'erl.lang.binary':from_list/1	ebif_list_to_binary_1
bif erlang:list_to_float/1
bif 'erl.lang.float':from_string/1	ebif_string_to_float_1
list_to_float_1
bif erlang:list_to_integer/1
bif 'erl.lang.integer':from_string/1	ebif_string_to_integer_1
list_to_integer_1
bif erlang:list_to_pid/1
bif 'erl.lang.proc':string_to_pid/1	ebif_string_to_pid_1 list_to_pid_1
bif erlang:list_to_tuple/1
bif 'erl.lang.tuple':from_list/1	ebif_list_to_tuple_1
bif erlang:load_module/2
bif 'erl.system.code':load/2		ebif_load_module_2
bif erlang:loaded/0
bif 'erl.system.code':loaded/0		ebif_loaded_0
bif erlang:localtime/0
bif 'erl.util.date':local/0		ebif_localtime_0
bif erlang:localtime_to_universaltime/2
bif 'erl.util.date':local_to_utc/2	ebif_localtime_to_universaltime_2
bif erlang:make_ref/0
bif 'erl.lang.ref':make/0		ebif_make_ref_0
bif erlang:md5/1
bif 'erl.util.crypt.md5':digest/1	ebif_md5_1
bif erlang:md5_init/0
bif 'erl.util.crypt.md5':init/0		ebif_md5_init_0
bif erlang:md5_update/2
bif 'erl.util.crypt.md5':update/2	ebif_md5_update_2
bif erlang:md5_final/1
bif 'erl.util.crypt.md5':final/1	ebif_md5_final_1
bif erlang:module_loaded/1
bif 'erl.system.code':is_loaded/1	ebif_module_loaded_1
bif erlang:function_exported/3
bif 'erl.system.code':is_loaded_function/3 ebif_is_loaded_function_3
function_exported_3
bif erlang:monitor_node/2
bif 'erl.lang.node':monitor/2		ebif_monitor_node_2
ubif erlang:node/1
ubif 'erl.lang.node':node/1		ebif_node_1
ubif erlang:node/0
ubif 'erl.lang.node':node/0		ebif_node_0
bif erlang:nodes/1
bif 'erl.lang.node':nodes/1		ebif_nodes_1
bif erlang:now/0
bif 'erl.util.time':now/0		ebif_now_0

bif erlang:open_port/2

bif erlang:pid_to_list/1
bif 'erl.lang.proc':pid_to_string/1	ebif_pid_to_string_1 pid_to_list_1
bif erlang:port_info/1
bif 'erl.lang.port':info/1		ebif_port_info_1
bif erlang:port_info/2
bif 'erl.lang.port':info/2		ebif_port_info_2
bif erlang:ports/0
bif 'erl.lang.node':ports/0		ebif_ports_0
bif erlang:pre_loaded/0
bif 'erl.system.code':preloaded/0	ebif_pre_loaded_0
bif erlang:process_flag/2
bif 'erl.lang.proc':set_flag/2		ebif_process_flag_2
bif erlang:process_flag/3
bif 'erl.lang.proc':set_flag/3		ebif_process_flag_3
bif erlang:process_info/1
bif 'erl.lang.proc':info/1		ebif_process_info_1
bif erlang:process_info/2
bif 'erl.lang.proc':info/2		ebif_process_info_2
bif erlang:processes/0
bif 'erl.lang.node':processes/0		ebif_processes_0
bif erlang:purge_module/1
bif 'erl.system.code':purge/1		ebif_purge_module_1
bif erlang:put/2
bif 'erl.lang.proc.pdict':put/2		ebif_put_2
bif erlang:register/2
bif 'erl.lang.node':register/2		ebif_register_2
bif erlang:registered/0
bif 'erl.lang.node':registered/0	ebif_registered_0
ubif erlang:round/1
ubif 'erl.lang.number':round/1		ebif_round_1
ubif erlang:self/0
ubif 'erl.lang.proc':self/0		ebif_self_0
bif erlang:setelement/3
bif 'erl.lang.tuple':setelement/3	ebif_setelement_3
ubif erlang:size/1
ubif 'erl.lang.term':size/1		ebif_size_1
bif erlang:spawn/3
bif 'erl.lang.proc':spawn/3		ebif_spawn_3
bif erlang:spawn_link/3
bif 'erl.lang.proc':spawn_link/3	ebif_spawn_link_3
bif erlang:split_binary/2
bif 'erl.lang.binary':split/2		ebif_split_binary_2
bif erlang:statistics/1
bif 'erl.system':statistics/1		ebif_statistics_1
bif erlang:term_to_binary/1
bif 'erl.lang.binary':from_term/1	ebif_term_to_binary_1
bif erlang:term_to_binary/2
bif 'erl.lang.binary':from_term/2	ebif_term_to_binary_2
bif erlang:throw/1
bif 'erl.lang':throw/1			ebif_throw_1
bif erlang:time/0
bif 'erl.util.date':time_of_day/0	ebif_time_0
ubif erlang:tl/1
ubif 'erl.lang.list':tl/1		ebif_tl_1
ubif erlang:trunc/1
ubif 'erl.lang.number':trunc/1		ebif_trunc_1
bif erlang:tuple_to_list/1
bif 'erl.lang.tuple':to_list/1		ebif_tuple_to_list_1
bif erlang:universaltime/0
bif 'erl.util.date':utc/0		ebif_universaltime_0
bif erlang:universaltime_to_localtime/1
bif 'erl.util.date':utc_to_local/1	ebif_universaltime_to_localtime_1
bif erlang:unlink/1
bif 'erl.lang.proc':unlink/1		ebif_unlink_1
bif erlang:unregister/1
bif 'erl.lang.node':unregister/1	ebif_unregister_1
bif erlang:whereis/1
bif 'erl.lang.node':whereis/1		ebif_whereis_1
bif erlang:spawn_opt/1
bif 'erl.lang.proc':spawn_opt/1		ebif_spawn_opt_1
bif erlang:setnode/2
bif erlang:setnode/3
bif erlang:dist_exit/3
bif erlang:dist_unlink/2
bif erlang:dist_link/2

bif erlang:port_call/2
bif 'erl.lang.port':call/2		ebif_port_call_2
bif erlang:port_call/3
bif 'erl.lang.port':call/3		ebif_port_call_3
bif erlang:port_command/2
bif 'erl.lang.port':command/2		ebif_port_command_2
bif erlang:port_control/3
bif 'erl.lang.port':control/3		ebif_port_control_3
bif erlang:port_close/1
bif 'erl.lang.port':close/1		ebif_port_close_1
bif erlang:port_connect/2
bif 'erl.lang.port':connect/2		ebif_port_connect_2
bif erlang:port_set_data/2
bif 'erl.lang.port':set_data/2		ebif_port_set_data_2
bif erlang:port_get_data/1
bif 'erl.lang.port':get_data/1		ebif_port_get_data_1

# Tracing & debugging.
bif erlang:trace_pattern/2
bif 'erl.system.debug':trace_pattern/2	ebif_trace_pattern_2
bif erlang:trace_pattern/3
bif 'erl.system.debug':trace_pattern/3	ebif_trace_pattern_3
bif erlang:trace/3
bif 'erl.system.debug':trace/3		ebif_trace_3
bif erlang:trace_info/2
bif 'erl.system.debug':trace_info/2	ebif_trace_info_2
bif erlang:seq_trace/2
bif 'erl.system.debug':seq_trace/2	ebif_seq_trace_2
bif erlang:seq_trace_info/1
bif 'erl.system.debug':seq_trace_info/1		ebif_seq_trace_info_1
bif erlang:seq_trace_print/1
bif 'erl.system.debug':seq_trace_print/1	ebif_seq_trace_print_1
bif erlang:seq_trace_print/2
bif 'erl.system.debug':seq_trace_print/2	ebif_seq_trace_print_2
bif erlang:suspend_process/1
bif 'erl.system.debug':suspend_process/1	ebif_suspend_process_1
bif erlang:resume_process/1
bif 'erl.system.debug':resume_process/1		ebif_resume_process_1
bif erlang:process_display/2
bif 'erl.system.debug':process_display/2	ebif_process_display_2

# Used to implemented in the erlang:info/1 BIF.
bif erlang:bump_reductions/1
bif 'erl.lang.proc':bump_reductions/1	ebif_bump_reductions_1

bif math:cos/1
bif 'erl.lang.math':cos/1		ebif_math_cos_1
bif math:cosh/1
bif 'erl.lang.math':cosh/1		ebif_math_cosh_1
bif math:sin/1
bif 'erl.lang.math':sin/1		ebif_math_sin_1
bif math:sinh/1
bif 'erl.lang.math':sinh/1		ebif_math_sinh_1
bif math:tan/1
bif 'erl.lang.math':tan/1		ebif_math_tan_1
bif math:tanh/1
bif 'erl.lang.math':tanh/1		ebif_math_tanh_1
bif math:acos/1
bif 'erl.lang.math':acos/1		ebif_math_acos_1
bif math:acosh/1
bif 'erl.lang.math':acosh/1		ebif_math_acosh_1
bif math:asin/1
bif 'erl.lang.math':asin/1		ebif_math_asin_1
bif math:asinh/1
bif 'erl.lang.math':asinh/1		ebif_math_asinh_1
bif math:atan/1
bif 'erl.lang.math':atan/1		ebif_math_atan_1
bif math:atanh/1
bif 'erl.lang.math':atanh/1		ebif_math_atanh_1
bif math:erf/1
bif 'erl.lang.math':erf/1		ebif_math_erf_1
bif math:erfc/1
bif 'erl.lang.math':erfc/1		ebif_math_erfc_1
bif math:exp/1
bif 'erl.lang.math':exp/1		ebif_math_exp_1
bif math:log/1
bif 'erl.lang.math':log/1		ebif_math_log_1
bif math:log10/1
bif 'erl.lang.math':log10/1		ebif_math_log10_1
bif math:sqrt/1
bif 'erl.lang.math':sqrt/1		ebif_math_sqrt_1
bif math:atan2/2
bif 'erl.lang.math':atan2/2		ebif_math_atan2_2
bif math:pow/2
bif 'erl.lang.math':pow/2		ebif_math_pow_2

bif erlang:start_timer/3
bif 'erl.lang.timer':start/3		ebif_start_timer_3
bif erlang:send_after/3
bif 'erl.lang.timer':send_after/3	ebif_send_after_3
bif erlang:cancel_timer/1
bif 'erl.lang.timer':cancel/1		ebif_cancel_timer_1
bif erlang:read_timer/1
bif 'erl.lang.timer':read/1		ebif_read_timer_1

bif erlang:make_tuple/2
bif 'erl.lang.tuple':make/2		ebif_make_tuple_2
bif erlang:append_element/2
bif 'erl.lang.tuple':append_element/2	ebif_append_element_2

bif erlang:system_flag/2
bif 'erl.system':set_flag/2	ebif_system_flag_2
bif erlang:system_info/1
bif 'erl.system':info/1		ebif_system_info_1
# New in R9C
bif erlang:system_monitor/0
bif 'erl.system':monitor/0	ebif_system_monitor_0
bif erlang:system_monitor/1
bif 'erl.system':monitor/1	ebif_system_monitor_1
bif erlang:system_monitor/2
bif 'erl.system':monitor/2	ebif_system_monitor_2

bif erlang:ref_to_list/1
bif 'erl.lang.ref':to_string/1		ebif_ref_to_string_1 ref_to_list_1
bif erlang:port_to_list/1
bif 'erl.lang.port':to_string/1		ebif_port_to_string_1 port_to_list_1
bif erlang:fun_to_list/1
bif 'erl.lang.function':to_string/1	ebif_fun_to_string_1 fun_to_list_1

bif erlang:monitor/2
bif 'erl.lang.proc':monitor/2		ebif_monitor_2
bif erlang:demonitor/1
bif 'erl.lang.proc':demonitor/1		ebif_demonitor_1

bif erlang:is_process_alive/1
bif 'erl.lang.proc':is_alive/1		ebif_proc_is_alive_1
is_process_alive_1

bif erlang:fault/1
bif 'erl.lang':error/1		ebif_error_1 fault_1
bif erlang:fault/2
bif 'erl.lang':error/2		ebif_error_2 fault_2

bif erlang:is_builtin/3
bif 'erl.system.code':is_builtin/3	ebif_is_builtin_3

ubif erlang:'and'/2
ubif 'erl.lang.bool':'and'/2		ebif_and_2
ubif erlang:'or'/2
ubif 'erl.lang.bool':'or'/2		ebif_or_2
ubif erlang:'xor'/2
ubif 'erl.lang.bool':'xor'/2		ebif_xor_2
ubif erlang:'not'/1
ubif 'erl.lang.bool':'not'/1		ebif_not_1

ubif erlang:'>'/2			sgt_2
ubif 'erl.lang.term':greater/2		ebif_gt_2 sgt_2
ubif erlang:'>='/2			sge_2
ubif 'erl.lang.term':greater_or_equal/2	ebif_ge_2 sge_2
ubif erlang:'<'/2			slt_2
ubif 'erl.lang.term':less/2		ebif_lt_2 slt_2
ubif erlang:'=<'/2			sle_2
ubif 'erl.lang.term':less_or_equal/2	ebif_le_2 sle_2
ubif erlang:'=:='/2			seq_2
ubif 'erl.lang.term':equal/2		ebif_eq_2 seq_2
ubif erlang:'=='/2			seqeq_2
ubif 'erl.lang.term':arith_equal/2	ebif_areq_2 seqeq_2
ubif erlang:'=/='/2			sneq_2
ubif 'erl.lang.term':not_equal/2	ebif_neq_2 sneq_2
ubif erlang:'/='/2			sneqeq_2
ubif 'erl.lang.term':not_arith_equal/2	ebif_nareq_2 sneqeq_2
ubif erlang:'+'/2			splus_2
ubif 'erl.lang.number':plus/2		ebif_plus_2 splus_2
ubif erlang:'-'/2			sminus_2
ubif 'erl.lang.number':minus/2		ebif_minus_2 sminus_2
ubif erlang:'*'/2			stimes_2
ubif 'erl.lang.number':multiply/2	ebif_multiply_2 stimes_2
ubif erlang:'/'/2			div_2
ubif 'erl.lang.number':divide/2		ebif_divide_2 div_2
ubif erlang:'div'/2			intdiv_2
ubif 'erl.lang.integer':'div'/2		ebif_intdiv_2
ubif erlang:'rem'/2
ubif 'erl.lang.integer':'rem'/2		ebif_rem_2
ubif erlang:'bor'/2
ubif 'erl.lang.integer':'bor'/2		ebif_bor_2
ubif erlang:'band'/2
ubif 'erl.lang.integer':'band'/2	ebif_band_2
ubif erlang:'bxor'/2
ubif 'erl.lang.integer':'bxor'/2	ebif_bxor_2
ubif erlang:'bsl'/2
ubif 'erl.lang.integer':'bsl'/2		ebif_bsl_2
ubif erlang:'bsr'/2
ubif 'erl.lang.integer':'bsr'/2		ebif_bsr_2
ubif erlang:'bnot'/1
ubif 'erl.lang.integer':'bnot'/1	ebif_bnot_1
ubif erlang:'-'/1			sminus_1
ubif 'erl.lang.number':minus/1		ebif_minus_1 sminus_1
ubif erlang:'+'/1			splus_1
ubif 'erl.lang.number':plus/1		ebif_plus_1 splus_1

# New operators in R8. These were the only operators missing.
# erlang:send/2, erlang:append/2 and erlang:subtract/2 are now also
# defined in erlang.erl, and the C names can be removed when all
# internal references have been updated to the new ebif_... entries.

bif erlang:'!'/2		ebif_bang_2
bif 'erl.lang':send/2		ebif_send_2 send_2
bif erlang:send/2
bif 'erl.lang':send/3		ebif_send_3 send_3
bif erlang:send/3
bif erlang:'++'/2		ebif_plusplus_2
bif 'erl.lang.list':append/2	ebif_append_2 ebif_plusplus_2
bif erlang:append/2
bif erlang:'--'/2		ebif_minusminus_2
bif 'erl.lang.list':subtract/2	ebif_list_subtract_2 ebif_minusminus_2
bif erlang:subtract/2

ubif erlang:is_atom/1
ubif 'erl.lang.term':is_atom/1		ebif_is_atom_1
ubif erlang:is_list/1
ubif 'erl.lang.term':is_list/1		ebif_is_list_1
ubif erlang:is_tuple/1
ubif 'erl.lang.term':is_tuple/1		ebif_is_tuple_1
ubif erlang:is_constant/1
ubif 'erl.lang.term':is_constant/1	ebif_is_constant_1
ubif erlang:is_float/1
ubif 'erl.lang.term':is_float/1		ebif_is_float_1
ubif erlang:is_integer/1
ubif 'erl.lang.term':is_integer/1	ebif_is_integer_1
ubif erlang:is_number/1
ubif 'erl.lang.term':is_number/1	ebif_is_number_1
ubif erlang:is_pid/1
ubif 'erl.lang.term':is_pid/1		ebif_is_pid_1
ubif erlang:is_port/1
ubif 'erl.lang.term':is_port/1		ebif_is_port_1
ubif erlang:is_reference/1
ubif 'erl.lang.term':is_reference/1	ebif_is_reference_1
ubif erlang:is_binary/1
ubif 'erl.lang.term':is_binary/1	ebif_is_binary_1
ubif erlang:is_function/1
ubif 'erl.lang.term':is_function/1	ebif_is_function_1
ubif erlang:is_record/3
ubif 'erl.lang.term':is_record/3	ebif_is_record_3

bif erlang:match_spec_test/3

bif erlang:'$put'/2	dollar_put_2
bif erlang:'$get'/0	dollar_get_0
bif erlang:'$get'/1	dollar_get_1
bif erlang:'$get_keys'/1	dollar_get_keys_1
bif erlang:'$erase'/0	dollar_erase_0
bif erlang:'$erase'/1	dollar_erase_1

#
# Bifs in ets module.
#

bif ets:all/0
bif 'erl.lang.ets':all/0		ebif_ets_all_0
bif ets:new/2
bif 'erl.lang.ets':new/2		ebif_ets_new_2
bif ets:db_delete/1
bif 'erl.lang.ets':db_delete/1		ebif_ets_db_delete_1
bif ets:delete/2
bif 'erl.lang.ets':delete/2		ebif_ets_delete_2
bif ets:delete_all_objects/1
bif 'erl.lang.ets':delete_all_objects/1	ebif_ets_delete_all_objects_1
bif ets:delete_object/2
bif 'erl.lang.ets':delete_object/2	ebif_ets_delete_object_2
bif ets:first/1
bif 'erl.lang.ets':first/1		ebif_ets_first_1
bif ets:fixtable/2
bif 'erl.lang.ets':fixtable/2		ebif_ets_fixtable_2
bif ets:lookup/2
bif 'erl.lang.ets':lookup/2		ebif_ets_lookup_2
bif ets:lookup_element/3
bif 'erl.lang.ets':lookup_element/3	ebif_ets_lookup_element_3
bif ets:db_info/2
bif 'erl.lang.ets':db_info/2		ebif_ets_db_info_2
bif ets:last/1
bif 'erl.lang.ets':last/1		ebif_ets_last_1
bif ets:match/1
bif 'erl.lang.ets':match/1		ebif_ets_match_1
bif ets:match/2
bif 'erl.lang.ets':match/2		ebif_ets_match_2
bif ets:match/3
bif 'erl.lang.ets':match/3		ebif_ets_match_3
bif ets:match_object/1
bif 'erl.lang.ets':match_object/1	ebif_ets_match_object_1
bif ets:match_object/2
bif 'erl.lang.ets':match_object/2	ebif_ets_match_object_2
bif ets:match_object/3
bif 'erl.lang.ets':match_object/3	ebif_ets_match_object_3
bif ets:member/2
bif 'erl.lang.ets':member/2		ebif_ets_member_2
bif ets:next/2
bif 'erl.lang.ets':next/2		ebif_ets_next_2
bif ets:prev/2
bif 'erl.lang.ets':prev/2		ebif_ets_prev_2
bif ets:insert/2
bif 'erl.lang.ets':insert/2		ebif_ets_insert_2
bif ets:rename/2
bif 'erl.lang.ets':rename/2		ebif_ets_rename_2
bif ets:safe_fixtable/2
bif 'erl.lang.ets':safe_fixtable/2	ebif_ets_safe_fixtable_2
bif ets:slot/2
bif 'erl.lang.ets':slot/2		ebif_ets_slot_2
bif ets:update_counter/3
bif 'erl.lang.ets':update_counter/3	ebif_ets_update_counter_3
bif ets:select/1
bif 'erl.lang.ets':select/1		ebif_ets_select_1
bif ets:select/2
bif 'erl.lang.ets':select/2		ebif_ets_select_2
bif ets:select/3
bif 'erl.lang.ets':select/3		ebif_ets_select_3
bif ets:select_count/2
bif 'erl.lang.ets':select/2		ebif_ets_select_count_2
bif ets:select_reverse/1
bif 'erl.lang.ets':select_reverse/1	ebif_ets_select_reverse_1
bif ets:select_reverse/2
bif 'erl.lang.ets':select_reverse/2	ebif_ets_select_reverse_2
bif ets:select_reverse/3
bif 'erl.lang.ets':select_reverse/3	ebif_ets_select_reverse_3
bif ets:select_delete/2
bif 'erl.lang.ets':select_delete/2	ebif_ets_select_delete_2
bif ets:match_spec_compile/1
bif 'erl.lang.ets':match_spec_compile/1	ebif_ets_match_spec_compile_1
bif ets:match_spec_run/2
bif 'erl.lang.ets':match_spec_run/2	ebif_ets_match_spec_run_2
bif ets:match_spec_run/3
bif 'erl.lang.ets':match_spec_run/3	ebif_ets_match_spec_run_3

#
# Bifs in os module.
#

bif os:putenv/2
bif 'erl.system.os':putenv/2	ebif_os_putenv_2
bif os:getenv/0
bif 'erl.system.os':getenv/0	ebif_os_getenv_0
bif os:getenv/1
bif 'erl.system.os':getenv/1	ebif_os_getenv_1
bif os:getpid/0
bif 'erl.system.os':getpid/0	ebif_os_getpid_0


#
# Bifs in lists module.
#

bif lists:member/2
bif 'erl.lang.list':is_element/2	ebif_list_is_element_2
lists_member_2
bif lists:reverse/2
bif 'erl.lang.list':reverse/2		ebif_list_reverse_2 lists_reverse_2
bif lists:keymember/3
bif 'erl.lang.list.keylist':is_element/3 ebif_keylist_is_element_3
lists_keymember_3
bif lists:keysearch/3
bif 'erl.lang.list.keylist':search/3	ebif_keylist_search_3
lists_keysearch_3

#
# Vector bifs.
#

bif vector:new/2
bif 'erl.lang.vector':new/2		ebif_vector_new_2
bif vector:from_list/1
bif 'erl.lang.vector':from_list/1	ebif_vector_from_list_1
bif vector:to_list/2
bif 'erl.lang.vector':to_list/2		ebif_vector_to_list_2
bif vector:get/2
bif 'erl.lang.vector':get/2		ebif_vector_get_2
bif vector:set/3
bif 'erl.lang.vector':set/3		ebif_vector_set_3

#
# Bifs for debugging.
#

bif erts_debug:disassemble/1
bif 'erl.system.debug':disassemble/1	ebif_erts_debug_disassemble_1
bif erts_debug:make_fun/1
bif 'erl.system.debug':make_fun/1	ebif_erts_debug_make_fun_1
bif erts_debug:breakpoint/2
bif 'erl.system.debug':breakpoint/2	ebif_erts_debug_breakpoint_2
bif erts_debug:same/2
bif 'erl.system.debug':same/2		ebif_erts_debug_same_2
bif erts_debug:flat_size/1
bif 'erl.system.debug':flat_size/1	ebif_erts_debug_flat_size_1
# There is also a pseudo-BIF named erts_debug:apply/4.

#
# New Bifs in R8.
#

bif code:get_chunk/2
bif 'erl.lang.code':get_chunk/2		ebif_code_get_chunk_2
bif code:module_md5/1
bif 'erl.lang.code':module_md5/1	ebif_code_module_md5_1
bif code:make_stub_module/3
bif 'erl.lang.code':make_stub_module/3	ebif_code_make_stub_module_3
bif code:is_module_native/1
bif 'erl.lang.code':is_native_module/1	ebif_code_is_native_module_1
code_is_module_native_1

bif erlang:blocking_read_file/1

#
# New Bifs in R9C.
#

bif erlang:hibernate/3
bif error_logger:warning_map/0




More information about the erlang-questions mailing list