aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-09-27Update kernel, stdlib and sasl appups for OTP-21.2Siri Hansen
2018-09-26Move peephole optimization from beam_block to beam_aBjörn Gustavsson
Moving away this optimization makes beam_block do one thing and one thing only -- creating blocks.
2018-09-26Move bif_to_test/3 from beam_utils to beam_ssa_codegenBjörn Gustavsson
The only caller of bif_to_test/3 is beam_ssa_codegen.
2018-09-26beam_validator: Disallow literal arguments for certain instructionsBjörn Gustavsson
Disallow a literal map source for get_map_elements. There is currently runtime support for get_map with a literal map source, but by forbidding it in OTP 22, the runtime support could be removed in a future release (perhaps OTP 24). Also verify that the source arguments for get_list, get_hd, get_tl, and get_tuple_element are not literals. Literals are not supported for those instructions in the runtime system; verifying it in beam_validator is a convenience so that this kind of bug will be detected already during compilation.
2018-09-26beam_ssa_pre_codegen: Fix bug in sanitization of get_map_elementBjörn Gustavsson
The source map for `get_map_element` is not supposed to be a literal, and the sanitization code is supposed to ensure that. The sanitization incorrectly translated this code: Map = get_tuple_element literal {ok,#{key=>value}}, literal 1 Var = get_map_element Map, literal {a,key} To this code: Var = get_map_element literal #{key=>value}, literal {a,key} Make sure to substitute the arguments for `get_map_element` before looking for a literal source map.
2018-09-26beam_utils: Fix typo in commentBjörn Gustavsson
2018-09-26beam_clean: Use maps and cerl_sets instead of dict and setsBjörn Gustavsson
Using maps and cerl_sets instead of dict and sets will slightly speed up the beam_clean pass for modules with many functions and/or calls to local functions.
2018-09-26Remove the last optimization from beam_flattenBjörn Gustavsson
It is not necessary to combine get_hd and get_tl instruction to a get_list instruction. It will be done in beam_z. After this change, beam_flatten does nothing more than eliminating the blocks.
2018-09-26Move allocation combining from beam_flatten to beam_ssa_codegenBjörn Gustavsson
Continuing the simplification of beam_flatten, move the optimization that eliminates a test_heap instruction following a binary construction by incorporating the allocation of the heap space into the bs_init* instruction itself. This change does not change the generated code in any way. Also remove beam_utils:combine_heap_needs/2, because beam_flatten was the last user of it.
2018-09-26Move optimization of 'move' from beam_flatten to beam_ssa_codegenBjörn Gustavsson
The purpose of beam_flatten is to eliminate the blocks created by beam_block, but it also does a few optimizations because at the time the optimizations were added, beam_flatten was the most convenient place. Move the optimization that places `{move,Something,{x,0}}` before `call` instructions from beam_flatten to beam_ssa_codegen. This change will very slightly improve compilation times, and it will also apply the optimization in more places. In particular, a `{move,Literal,{x,0}}` would never be moved passed a `trim` instruction before this change. Now it will.
2018-09-26Use os:getenv/2 where possiblePeter Lemenkov
Signed-off-by: Peter Lemenkov <[email protected]>
2018-09-26TypoPeter Lemenkov
Signed-off-by: Peter Lemenkov <[email protected]>
2018-09-26Merge pull request #1960 from ↵John Högberg
jhogberg/john/compiler/validator-aliased-type-fixes/ERL-735 beam_validator: Use set_aliased_type in more operations
2018-09-25erts: Remove unnecessary NIF argc testsSverker Eriksson
It's impossible to call NIF with wrong argc from Erlang and thus pointless to throw badarg.
2018-09-25Document bit_size in match-specs and allow in fun2msPéter Gömöri
It is already allowed in match-specs.
2018-09-25beam_validator: Use set_aliased_type in more operationsJohn Högberg
The following code broke because aliases weren't tracked for hd/1: bug(Bool) -> Bug = remote:call(), if Bool -> %% Branch of some kind. _ = hd(Bug), remote:call(), hd(Bug) end. Related to 1f221b27f1336e747f7409692f260055dd3ddf79
2018-09-25sasl: Order systools_make:preloaded modules alphabeticallyLukas Larsson
This is needed for testcases to run correctly.
2018-09-25Merge pull request #1937 from grooverdan/travisHenrik Nord
fix for ppc64le / add travis test for ppc64le OTP-15313
2018-09-25Merge branch 'maint'Henrik Nord
2018-09-24ets_SUITE: Try avoid redundant option combosSverker Eriksson
to reduce test times
2018-09-24ets_SUITE: Reduce table type combos by removing "void"Sverker Eriksson
Avoid repeating same tests for [] and [set]. Test case 'default' verifies 'set' to be the default type.
2018-09-24beam_ssa_pre_codegen: Correct some commentsBjörn Gustavsson
2018-09-24Updated OTP versionOTP-21.1Erlang/OTP
2018-09-24Prepare releaseErlang/OTP
2018-09-24Merge branch 'maint'Ingela Anderton Andin
2018-09-24Merge branch 'ingela/ftp/tftp/app.src-fix' into maintIngela Anderton Andin
* ingela/ftp/tftp/app.src-fix: ftp, tftp: Version should not be hardcoded in <app>.app.src
2018-09-24ftp, tftp: Version should not be hardcoded in <app>.app.srcIngela Anderton Andin
2018-09-24beam_ssa: Add helper functions and export more typesJohn Högberg
get_anno/3: as get_anno but with a default value definitions/1-2: returns a map of variable definitions (#b_set{}) uses/1-2: returns a map of all uses of a given variable mapfold_blocks_rpo/4: mapfolds over blocks
2018-09-24Remove match context reuse annotations from core/kernel passesJohn Högberg
The upcoming beam_ssa_bsm pass makes this redundant.
2018-09-24Support using match contexts from Y registersJohn Högberg
The upcoming beam_ssa_bsm pass allows match contexts to be used across function calls that take said context as an argument, which means it's fairly common for them to end up in Y registers.
2018-09-24Merge pull request #1959 from jhogberg/john/compiler/ssa-var_name-to-b_varJohn Högberg
Clean up variable-related cruft in new SSA passes
2018-09-21Merge branch 'sverker/erts/beautify-ifdef-DEBUG'Sverker Eriksson
* sverker/erts/beautify-ifdef-DEBUG: erts: Beautify away #ifdef DEBUG
2018-09-21ets_SUITE: Optimize throughput_benchmarkSverker Eriksson
by populating the table with the help of a random number generator creating series of unique integers.
2018-09-21Merge PR-1952 from kjellwinblad/ca_tree_pull_requestSverker Eriksson
Add a more scalable ETS ordered_set implementation
2018-09-21Merge branch 'maint'Hans Nilsson
* maint: crypto: Fix accidental merge
2018-09-21Merge branch 'hans/crypto/fix_bad_merge' into maintHans Nilsson
* hans/crypto/fix_bad_merge: crypto: Fix accidental merge
2018-09-21crypto: Fix accidental mergeHans Nilsson
Commit 8c47a7657d03777a03a6838c7ec937b6347d07f8 accidently reverted the changes in lib/crypto/src/crypto.erl correctly introduced in e8de0736005e91afd992e49f434e08c940eddfa0 This fix re-introduces the correct changes.
2018-09-21Merge branch 'maint'Henrik Nord
2018-09-21Update copyright yearHenrik Nord
2018-09-20Merge branch 'maint'Ingela Anderton Andin
2018-09-20Merge branch 'ingela/ssl/openssl-test-interop' into maintIngela Anderton Andin
* ingela/ssl/openssl-test-interop: ssl: Improve interop checks
2018-09-20ssl: Improve interop checksIngela Anderton Andin
2018-09-20Merge branch 'maint'Sverker Eriksson
* maint: Updated OTP version Update release notes Update version numbers erts: Fix memory leak when sending to terminating port
2018-09-20Merge branch 'maint-19' into maintSverker Eriksson
* maint-19: Updated OTP version Update release notes Update version numbers erts: Fix memory leak when sending to terminating port
2018-09-20beam_ssa_recv: Remove redundant {var, _} wrappingJohn Högberg
Now that variables are represented as #b_var{}, there's no longer any risk of colliding with anything else.
2018-09-20Consistently use #b_var{} instead of var_name()John Högberg
We chose to refer to variables through their var_name() because we anticipated the need to annotate them, but it turned out we didn't really need that, and many things become a lot cleaner if the entire #b_var{} is used to represent variables.
2018-09-20Merge branch 'maint'Ingela Anderton Andin
2018-09-20Merge branch 'ingela/ERL-622/fix' into maintIngela Anderton Andin
* ingela/ERL-622/fix: ssl: Move link to correct process
2018-09-20ssl: Move link to correct processIngela Anderton Andin
The link should be between the connection process and the tls_sender process. But the start of the tls_sender process needs to be done by the process that also starts the connection process in order to correctly create the opaque #ssl_socket{}.
2018-09-19Updated OTP versionOTP-19.3.6.11Erlang/OTP