aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
AgeCommit message (Collapse)Author
2019-01-21Merge branch 'raimo/stdlib/gen_statem-optimization/OTP-15452'Raimo Niskanen
* raimo/stdlib/gen_statem-optimization/OTP-15452: correct: Work around a compiler mis-optimization
2019-01-21correct: Work around a compiler mis-optimizationRaimo Niskanen
This was not a compiler optimization that misfired, rather that the code neede separate case clauses for when the timer was running and not, so to not call erlang:cancel_timer/1 nor maps:remove/2 in the case clause where only a map update was needed before recursion. See the comment in loop_timouts_cancel/13
2019-01-18Merge branch 'raimo/stdlib/gen_statem-optimization/OTP-15452'Raimo Niskanen
* raimo/stdlib/gen_statem-optimization/OTP-15452: Write some more comments in the engine loop Work around a compiler mis-optimization Move out helper functions to engine loop Handle #trans_opts{} fields in parse_actions() arguments Optimize gen_statem engine loop Modify generic_statem_transit benchmark
2019-01-17Write some more comments in the engine loopRaimo Niskanen
2019-01-17Work around a compiler mis-optimizationRaimo Niskanen
The common subexpression optimization accidentally caused unnecessary spilling of live registers. A rather ugly workaround can be found in loop_timeouts_cancel.
2019-01-17Move out helper functions to engine loopRaimo Niskanen
This strategy improves speed benchmarks and reduces the amount of garbage that is produced. More: * Handle transition options as loop function arguments instead of in a record. * Shorten the state_enter loop and make it more efficient by making it more part of the loop and less a loop restart. * Simplify the internal timeout action handling somewhat.
2019-01-16Merge branch 'maint'Hans Bolinder
* maint: Fix erl_parse:af_constraint() Fix erl_parse:af_fun_type() Add literal character to erl_parse:abstract_type/0 type
2019-01-16Merge pull request #2074 from gomoripeti/singleton_char_typeHans Bolinder
Fixes in erl_parse:abstract_type/0 type
2019-01-15Merge pull request #2069 from zuiderkwast/erl_parse_typesHans Bolinder
Correction of type abstract_expr -> abstract_expr() in erl_parse
2019-01-15Handle #trans_opts{} fields in parse_actions() argumentsRaimo Niskanen
2019-01-14Optimize gen_statem engine loopRaimo Niskanen
* Use synchronolus cancel_timer since that is more efficient than asynchronous when a process cancels its own timer * Restructure the state to have fewer fields by breaking out practically constant fields into a separate loop argument record #params{}, group state and data into one field and dito for timer fields * Optimize engine loop arguments for staying in the loop so the detour to sys:handle_system_message/6 will require packing/unpacking of the sys: state, and of the argument Parent * Avoid double reverse of event queue in many cases * Restructure the state transition to not have duplicate tracks for sys_debug and non-sys_debug cases * Shortcut the empty list case where possible * Loop unroll reversal of up to 2-element lists to avoid calling lists:reverse/2 since an external call spills all live registers to the stack * Bring out the callback mode check to the engine loop
2019-01-08Merge branch 'maint'Lars Thorsen
* maint: [xmerl] Fix detect charset crash [cdv] Check only own persistent terms in crashdump_viewer test Fix remote-call error in ms_transform Conflicts: lib/observer/test/crashdump_helper.erl
2019-01-08Merge pull request #2022 from gomoripeti/ms_remote_call_errorSiri Hansen
Fix remote-call error in ms_transform
2018-12-28Fix erl_parse:af_constraint()Péter Gömöri
Add missing list wrapper.
2018-12-28Fix erl_parse:af_fun_type()Péter Gömöri
`af_function_type()` already contains the `{'type', anno(), 'fun', ...}` tuple so it does not have to be wrapped again.
2018-12-27Add literal character to erl_parse:abstract_type/0 typePéter Gömöri
This is allowed since 19.3 (commit 6d238032) and documented since commit 744fb920.
2018-12-22Correction of type abstract_expr -> abstract_expr() in erl_parseViktor Söderqvist
2018-12-18Make all compiler options work in the option listBjörn Gustavsson
Before OTP 22, the option `{nowarn_deprecated_function,MFAs}` was only recognized when given in the file with the attribute `-compile()`. (The option `{nowarn_unused_function,FAs}` was incorrectly documented to only work in a file, but it also worked when given in the option list.) Starting from OTP 22, all options that can be given in the file can also be given in the option list.
2018-12-17Merge branch 'raimo/stdlib/sys-log-of-gen-in-terminate-report/OTP-15381'Raimo Niskanen
* raimo/stdlib/sys-log-of-gen-in-terminate-report/OTP-15381: sys:log timeout 0 events Filter gen_server State in crash sys:log Fix statement duplication Document system_events better Adjust sys:log(N, get) to documentation Unify system_events in gen_* Log code change Use from/1 type check Limit more error_logger terms Add client stacktrace Print sys:log in error report Optimize sys:handle_debug/4 Optimize sys:log Fix sys:log functionality Conflicts: lib/stdlib/doc/src/sys.xml
2018-12-11Merge branch 'maint'Henrik Nord
* maint: Updated OTP version Prepare release
2018-12-10Prepare releaseErlang/OTP
2018-12-03Merge branch 'maint'Hans Bolinder
* maint: stdlib: Let calendar:system_time_to_rfc3339() keep fractions
2018-11-30sys:log timeout 0 eventsRaimo Niskanen
2018-11-30Filter gen_server State in crash sys:logRaimo Niskanen
2018-11-30Fix statement duplicationRaimo Niskanen
2018-11-30Document system_events betterRaimo Niskanen
2018-11-30Adjust sys:log(N, get) to documentationRaimo Niskanen
2018-11-30Unify system_events in gen_*Raimo Niskanen
2018-11-30Log code changeRaimo Niskanen
2018-11-30Use from/1 type checkRaimo Niskanen
2018-11-29stdlib: Let calendar:system_time_to_rfc3339() keep fractionsHans Bolinder
RFC3339 mentions in paragraph 5.1 that if certain conditions are fulfilled, then sorting date and time strings results in a time-ordered sequence. One of the conditions is that the strings must have the same number of fractional second digits. This commits makes sure this is indeed the case.
2018-11-22Merge branch 'maint'Björn Gustavsson
* maint: Fix inadvertently suppressed warning for unused variable
2018-11-21Fix inadvertently suppressed warning for unused variableBjörn Gustavsson
An external fun could inadvertently suppress warnings for unused variables, such as in this example: bug() -> BugVar = foo(), if true -> fun m:f/1 end. There would be no warning that `BugVar` was unused. The bug was introduced in ff432e262e652, which was the commit that extended external funs to allow variables. https://bugs.erlang.org/browse/ERL-762
2018-11-19Fix remote-call error in ms_transformPéter Gömöri
Before this patch the following call resulted in the below error ``` 1> dbg:fun2ms(fun(_) -> m:f() end). Error: Unknown error code {122,m,f} ``` Now it is properly formatted as ``` 1> dbg:fun2ms(fun(_) -> m:f() end). Error: fun containing the remote function call 'm:f/0' (called in body) cannot be translated into match_spec ```
2018-11-16Limit more error_logger termsRaimo Niskanen
2018-11-16Add client stacktraceRaimo Niskanen
2018-11-16Print sys:log in error reportRaimo Niskanen
2018-11-16Optimize sys:handle_debug/4Raimo Niskanen
2018-11-16Optimize sys:logRaimo Niskanen
2018-11-16Fix sys:log functionalityRaimo Niskanen
Abstract out Latest-N-Log functions to this to nlog_*. Fix sys:log(Name, get) to strip the internal formatting funs.
2018-11-01Merge branch 'bmk/20180927/remove_otp_mibs2/OTP-14984'Micael Karlberg
2018-10-31Merge PR-1997 from sverker/erts/ordered_set-select-improvements/OTP-15325Sverker Eriksson
Even more scalable ETS ordered_set with write_concurrency
2018-10-24Merge branch 'maint'Björn Gustavsson
* maint: beam_lib: Remove obsolete module() from the beam() type hipe: Don't use beam_lib:info/1 with an atom as filename Honor the max heap size when copying literals after purging
2018-10-23stdlib: Add runtime dependency to ertsSverker Eriksson
2018-10-19beam_lib: Remove obsolete module() from the beam() typeBjörn Gustavsson
The type `beam()` in the `beam_lib` module is confusing: -type beam() :: module() | file:filename() | binary(). It says that the module name can be used to identify the BEAM module to be accessed, but passing in the module name only works if the BEAM file is located in the current working directory because the module is not searched for in the code path. The reason that it is allowed to pass in the module name as an atom is for backward compatibility. A long time ago, atoms instead of strings were used as filenames. For that reason, `filename` and `file` still accept atoms as filenames (although the practice is frown upon). `beam_lib` accepts an atom as the filename for the same reason. To remove the confusion, remove `module()` from the type and the mention of it in the documentation. Code that uses an atom as a filename will still work, but Dialyzer will issue a warning. https://bugs.erlang.org/browse/ERL-696
2018-10-11Merge pull request #1969 from RaimoNiskanen/raimo/stdlib/rand-xorshift116ssRaimo Niskanen
OTP-14731 Implement 'exsss' (Xorshift116**) as new default 'rand' algorithm The new algorithm is a combination of the Xorshift116 ('exsp') state update and a new scrambler "StarStar" from the 2018 paper "Scrambled Linear Pseudorandom Number Generators" by David Blackman and Sebastiano Vigna. This combination should not have the caveat of weak low bits that the previous default algorithm(s) have had, with the cost of about 10% lower speed.
2018-10-08Merge branch 'maint'John Högberg
* maint: compiler: Forward +source flag to epp and fix bug in +deterministic epp: Allow user to set source name independently of input file name
2018-10-08Merge branch 'john/compiler/deterministic-paths/OTP-15245/ERL-706' into maintJohn Högberg
* john/compiler/deterministic-paths/OTP-15245/ERL-706: compiler: Forward +source flag to epp and fix bug in +deterministic epp: Allow user to set source name independently of input file name
2018-10-05epp: Allow user to set source name independently of input file nameJohn Högberg
Note that this does *not* affect -include()'d files or the -file() directive.
2018-10-05Suppress Dialyzer improper list warningsRaimo Niskanen