aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/ebin/prim_eval.beam
AgeCommit message (Collapse)Author
2017-11-20Merge branch 'lukas/stdlib/maps_iterators/OTP-14012'Lukas Larsson
* lukas/stdlib/maps_iterators/OTP-14012: erts: Limit size of first iterator for hashmaps Update primary bootstrap Update preloaded modules erts: Remove erts_internal:maps_to_list/2 stdlib: Make io_lib and io_lib_pretty use maps iterator erts: Implement batching maps:iterator erts: Implement maps path iterator erts: Implement map iterator using a stack stdlib: Introduce maps iterator API Conflicts: bootstrap/lib/stdlib/ebin/io_lib.beam bootstrap/lib/stdlib/ebin/io_lib_pretty.beam erts/emulator/beam/bif.tab erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/zlib.beam
2017-11-20Update preloaded modulesLukas Larsson
2017-06-20Update preloaded modulesHans Nilsson
2017-06-14Update preloaded modulesRickard Green
2017-05-04Update preloaded modulesBjörn Gustavsson
2017-04-25Update preloaded modulesLukas Larsson
2017-04-10Update preloaded modulesLukas Larsson
2017-02-27Merge branch 'maint'Rickard Green
* maint: Ensure prim_eval:'receive' wont clobber def_arg_reg[0] Conflicts: erts/preloaded/ebin/prim_eval.beam
2017-02-20Ensure prim_eval:'receive' wont clobber def_arg_reg[0]Rickard Green
def_arg_reg[0] is used for storage of timeout instruction when a 'receive after' is executed. When a process was scheduled out inside prim_eval:'receive'/0 due to a function call, def_arg_reg[0] was overwritten due to storage of live registers. prim_eval:'receive'/2 now calls arg_reg_alloc/0 which bumps all reductions and then calls arg_reg_alloc/7 which will cause an allocation of a new arg_reg array since def_arg_reg only can hold 6 values. This ensures that the timeout instruction in def_arg_reg[0] used for the timeout wont be overwritten.
2017-02-17Teach make_preload to handle the new 'AtU8' chunkBjörn Gustavsson
26b59dfe67 introduced the new 'AtU8' chunk to support Unicode atoms. make_preload strips the pre-loaded BEAM files so that they only contain essential chunks. It expects to find the old 'Atom' chunk. Teach make_preload to read the new 'AtU8' chunk instead of the old chunk. Also produce a nice error message if someone by mistake compiles the pre-loaded modules with an OTP 19 compiler.
2016-12-20Update preloaded modulesLukas Larsson
2016-12-07Update preloaded modulesErlang/OTP
2016-06-20Update preloaded modulesHenrik Nord
2016-05-10Update preloaded modulesLukas Larsson
2016-05-03Update preloaded modulesBjörn-Egil Dahlberg
2016-04-15Update preloaded modulesLukas Larsson
2016-02-17Update preloaded modulesHans Bolinder
2016-02-02Update preloaded modulesLukas Larsson
2016-01-26Update preloaded modulesLukas Larsson
2015-12-16Update preloaded modulesBjörn Gustavsson
2015-12-16Update preloaded modulesBjörn Gustavsson
2015-12-08Update preloaded modulesBjörn-Egil Dahlberg
2015-05-12Update preloaded modulesRickard Green
2015-03-26Update preloaded modulesHenrik Nord
2014-04-01Update preloaded modulesBjörn-Egil Dahlberg
2014-02-26Update preloaded and primary bootstrapRickard Green
2013-12-09Update preloaded modulesMagnus Lidén
2013-12-09Update preloaded modulesMagnus Lidén
2013-12-06Update preloaded modulesMagnus Lidén
2013-09-13Update preloaded modulesMagnus Lidén
2013-06-12Update preloaded modulesBjörn-Egil Dahlberg
2013-05-28Added preloaded prim_evalFredrik Gustafsson
2013-05-28Fix receive support in erl_eval with a BEAM moduleAnthony Ramine
Using the low-level BEAM instructions, we can loop over each message in the process queue and removes the first message that matches, without receiving them all to later send them back to itself. The function prim_eval:'receive'/2 is equivalent to the following pseudo-code: 'receive'(F, T) -> RESET MESSAGE QUEUE POINTER, LOOP: case PEEK CURRENT MESSAGE WITH TIMEOUT T of {ok,Msg} -> case F(Msg) of nomatch -> DECREMENT TIMEOUT T, ADVANCE MESSAGE QUEUE POINTER, GOTO LOOP; Result -> RESET MESSAGE QUEUE POINTER, Result end; timeout -> RESET MESSAGE QUEUE POINTER, timeout end. To not break Dialyzer and other tools, we use a stub Erlang module which abstract code is forcefully inserted into prim_inet.erl afterwards compilation.