aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erlang.xml
AgeCommit message (Collapse)Author
2019-07-29Fix documentation for erlang:is_map_key/2Maxim Fedorov
This function is allowed to be used in guards.
2019-06-16Document extra message element also where trace message format is describedPéter Gömöri
2019-05-22Merge branch 'sverker/erts/system_monitor-doc/ERL-936' into maintSverker Eriksson
* sverker/erts/system_monitor-doc: erts: Add some erl_nif doc clarifications erts: Clarify erlang:system_monitor/2 semantics
2019-05-22erts: Clarify erlang:system_monitor/2 semanticsSverker Eriksson
2019-05-15Merge pull request #2225 from juise/patch-1Lukas Larsson
Update erlang.xml / map_get in guard tests
2019-05-10Prepare releaseErlang/OTP
2019-05-08Update erlang.xmlAlexander Petrovsky
2019-04-24Revert "Prepare release"Rickard Green
This reverts commit 425889ba69b69a9b6fb14bfbef121d51b78e853a.
2019-04-23Prepare releaseErlang/OTP
2019-04-04Fix broken linksBjörn Gustavsson
A multitude of broken links were found when a bug was fixed in the link checker.
2019-03-26Revert "Prepare release"Henrik Nord
This reverts commit 0118046f9bda8dcf3594184fa439b79267db8017.
2019-03-25Prepare releaseErlang/OTP
2019-03-19Add possibility to also get size of data from erlang:dist_ctrl_get_data()Rickard Green
2019-02-04Merge branch 'maint'Péter Dimitrov
* maint: Fix typo in erlang.xml inets: Ignore bracket option in format_address Change-Id: I8a215d3872ae74e08d7a17b70ba53535947c032f
2019-02-04Fix typo in erlang.xmlTobiasz
2019-01-31Merge branch 'maint'Sverker Eriksson
2019-01-28erts: Add doc warnings for erlang:port_command|call|controlSverker Eriksson
done on unknown ports.
2019-01-22Merge pull request #2089 from richcarl/document-undefined-current_functionRickard Green
Document that current_function can be undefined OTP-15543
2019-01-22Merge branch 'maint'Sverker Eriksson
2019-01-15Fix "since" for all multi clause functionsSverker Eriksson
This is the result of going through all .xml files with "clause_i" attributes and make sure their "since" versions are correct.
2019-01-15Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/beam/bif.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/prim_file.beam
2019-01-14Document that current_function can be undefinedRichard Carlsson
If a process is executing in native-compiled code, process_info(Pid, current_function) may return the atom undefined instead of an MFA.
2019-01-10erts: Add erlang:system_flag(system_logger,_)Lukas Larsson
This flag allows logger and other components to set the process which log messages from ERTS are to be sent.
2018-12-13Merge branch 'maint'Sverker Eriksson
2018-12-13Fill in since for multi-clause functions in erlang.erlSverker Eriksson
The ones marked since="?" are unknown (but newer than R13B03) monitor/2 port_info/2 process_flag/2 statistics/1 system_flag/2 system_info/1 trace_pattern/3
2018-12-12Add empty 'since' attribute for old modules and functionsSverker Eriksson
2018-12-11Add "since" attributes in xml for new functions and modulesSverker Eriksson
introduced after OTP_R13B03.
2018-07-18Merge pull request #1812 from michalmuskala/mm/make-fun-loaderJohn Högberg
Optimise creation of anonymous functions
2018-07-17Optimise creation of anonymous functionsMichał Muskała
This introduces a similar optimisation for normal funs to what was introduced for external funs in #1725. It is possible to allocate the fun as a literal, if it does not capture the environment (i.e. it does not close over any variables). Unfortunately it's not possible to do this in the compiler due to problems with representation of such functions in the `.beam` files. Fortunately, we can do this in the loader. Simple evaluation shows that functions that don't capture the enviornment consistute over 60% of all funs in the source code of Erlang/OTP itself. The only downside is that we lose a meningful value in the `pid` field of the fun. The goal of this field, beyond debugging, was to be able to identify the original node of a function. To be able to still do this, the functions that are created in the loader are assigned the init pid as the creator. To solve issues with staryp, initially set the `erts_init_process_id` to `ERTS_INVALID_PID` and skip the described optimisation if the value is still uninitialised.
2018-07-09erts: Fix spec and docs for process_info 'monitored_by'Sverker Eriksson
to include ports and NIF resources. Added new opaque type 'nif_resource'.
2018-07-02erts: Remove obsolete paragraph about ERL_NO_VFORKSverker Eriksson
from erlang:open_port/2 docs.
2018-06-28Merge PR-1844 from arcz/ets_count OTP-15163Sverker Eriksson
Use erlang:system_info(ets_count) and improve docs
2018-06-24Add missing bracket to erlang:spawn_opt/4 priority option docsChristopher Keele
2018-06-20Update system_info doc to include ets_countArtur Cygan
2018-06-18Update copyright yearHenrik Nord
2018-06-13Explain why the AM becomes group leaderXavier Noria
2018-06-11[logger] Update documentationSiri Hansen
2018-06-04Merge branch 'sverker/ets-count/OTP-14987'Sverker Eriksson
* sverker/ets-count/OTP-14987: erts,stdlib: Improve docs about obsolete ets_limit erts: Reduce test log noise from ets_SUITE erts: Increase scalability of ets name lookup erts: Rename one of delete_trap to select_delete_trap erts: Refactor usage of am_atom_put to ERTS_MAKE_AM erts: Add system_info(ets_count) erts: Fix narrow race between ets:new and ets:delete
2018-06-04erts,stdlib: Improve docs about obsolete ets_limitSverker Eriksson
2018-06-04erts: Add system_info(ets_count)Sverker Eriksson
2018-06-04Merge pull request #1806 from bitnitdit/erlang-xml-typosLukas Larsson
Fix typos in erlang.xml
2018-05-16New process suspend implementation based on async signalingRickard Green
2018-05-06Fix typos in erlang.xmlbitnitdit
2018-04-29Introduce is_map_key/2 guard BIFMichał Muskała
This complements the `map_get/2` guard BIF introduced in #1784. Rationale. `map_get/2` allows accessing map fields in guards, but it might be problematic in more complex guard expressions, for example: foo(X) when map_get(a, X) =:= 1 or is_list(X) -> ... The `is_list/1` part of the guard could never succeed since the `map_get/2` guard would fail the whole guard expression. In this situation, this could be solved by using `;` instead of `or` to separate the guards, but it is not possible in every case. To solve this situation, this PR proposes a `is_map_key/2` guard that allows to check if a map has key inside a guard before trying to access that key. When combined with `is_map/1` this allows to construct a purely boolean guard expression testing a value of a key in a map. Implementation. Given the use case motivating the introduction of this function, the PR contains compiler optimisations that produce optimial code for the following guard expression: foo(X) when is_map(X) and is_map_key(a, X) and map_get(a, X) =:= 1 -> ok; foo(_) -> error. Given all three tests share the failure label, the `is_map_key/2` and `is_map/2` tests are optimised away. As with `map_get/2` the `is_map_key/2` BIF is allowed in match specs.
2018-04-25Merge branch 'map-get-bif' of git://github.com/michalmuskala/otpBjörn Gustavsson
* 'map-get-bif' of git://github.com/michalmuskala/otp: Introduce map_get guard-safe function OTP-15037
2018-04-24Introduce map_get guard-safe functionMichał Muskała
Rationale Today all compound data types except for maps can be deconstructed in guards. For tuples we have `element/2` and for lists `hd/1` and `tl/1`. Maps are completely opaque to guards. This means matching on maps can't be abstracted into macros, which is often done with repetitive guards. It also means that maps have to be always selected whole from ETS tables, even when only one field would be enough, which creates a potential efficiency issue. This PR introduces an `erlang:map_get/2` guard-safe function that allows extracting a map field in guard. An alternative to this function would be to introduce the syntax for extracting a value from a map that was planned in the original EEP: `Map#{Key}`. Even outside of guards, since this function is a guard-BIF it is more efficient than using `maps:get/2` (since it does not need to set up the stack), and more convenient from pattern matching on the map (compare: `#{key := Value} = Map, Value` to `map_get(key, Map)`). Performance considerations A common concern against adding this function is the notion that "guards have to be fast" and ideally execute in constant time. While there are some counterexamples (`length/1`), what is more important is the fact that adding those functions does not change in any way the time complexity of pattern matching - it's already possible to match on map fields today directly in patterns - adding this ability to guards will niether slow down or speed up the execution, it will only make certain programs more convenient to write. This first version is very naive and does not perform any optimizations.
2018-04-10erl_docgen: Add hover links for ghlinkLukas Larsson
All functions, datatype and h3 headings have gotten a hover attribute that shows a link directly to the edit page on github for easy editing of documentation. The github link links to the maint branch. An early attempt was done to use the SHA of the current branch, but that did not work well as github can only take pull requests from branches.
2018-04-09Fix erlang:abs/2 type docsLukas Larsson
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-13Merge branch 'sverker/dist-flags-consolidate'Sverker Eriksson