aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-09-28beam_dead: Improve optimization of literal binary matchingBjörn Gustavsson
When the bit syntax is used to match a single binary literal, the bit syntax instructions will be replaced with a comparison to a binary literal. The only problem is that the bs_context_to_binary instruction will not be eliminated. Example: f(<<"string">>) -> ok. This function would be translated to: {function, f, 1, 2}. {label,1}. {line,...}. {func_info,...}. {label,2}. {test,is_eq_exact,{f,3},[{x,0},{literal,<<"string">>}]}. {move,{atom,ok},{x,0}}. return. {label,3}. {bs_context_to_binary,{x,0}}. {jump,{f,1}}. The bs_context_to_binary instruction serves no useful purpose, since {x,0} can never be a match context. Eliminating the instruction, the resulting code will be: {function, f, 1, 2}. {label,1}. {line,...}. {func_info,...}. {label,2}. {test,is_eq_exact,{f,1},[{x,0},{literal,<<"string">>}]}. {move,{atom,ok},{x,0}}. return.
2015-09-28beam_dead: Optimize select_val instructionsBjörn Gustavsson
In a select_val instruction, values associated with a label which is the same as the failure label can be removed. We already do this optimization in beam_clean, but it is better do this sort of optimization before the beam_jump pass. Also rewrite a select_val instruction with a single value to is_eq_exact instruction followed by a jump instruction.
2015-09-28Move out bit syntax optimizations from beam_blockBjörn Gustavsson
In the future we might want to add more bit syntax optimizations, but beam_block is already sufficiently complicated. Therefore, move the bit syntax optimizations out of beam_block into a separate compiler pass called beam_bs.
2015-09-28sys_core_fold: Extend the list of BIFs that return integersBjörn Gustavsson
Knowing that a BIF returns an integer makes it possible to replace '==' with the cheaper '=:=' test.
2015-09-28v3_codegen: Optimize matching of the final size-less binary segmentBjörn Gustavsson
Consider the following function: f(Bin, Bool) -> case Bin of <<Val:16/binary,_/binary>> when Bool -> Val end. Simplified, the generated code looks like: bs_start_match2 Fail Live Bin => Bin bs_get_integer2 Fail Live Bin size=Sz unit=1 => Val bs_skip_bits2 Fail Bin size=all unit=8 is_eq_exact Fail Bool true The code generator will replace the bs_skip_bits2 instruction with a bs_test_unit instruction if it can be clearly seen that the context register will not be used again. In this case, it is not obvious without looking at the code at the Fail label. However, it turns out that bs_test_unit instruction is always safe beacuse of the way v3_kernel compiles pattern matching. It doesn't matter whether the match context will be used again. If it will be used again, the position in it will *not* be used. Instead, a bs_restore2 instruction will restore one of the saved instructions.
2015-09-21Regain full coverage of beam_blockBjörn Gustavsson
d0784035ab fixed a problem with register corruption. Because of that, opt_moves/2 will never be asked to optimize instructions with more than two destination registers. Therefore, to regain full coverage of beam_block, remove the final clause in opt_moves/2.
2015-09-21Merge branch 'maint'Björn Gustavsson
* maint: Update sasl vsn to 2.6
2015-09-21Merge branch 'siri/sasl-vsn-OTP-18.1' into maintBjörn Gustavsson
* siri/sasl-vsn-OTP-18.1: Update sasl vsn to 2.6
2015-09-21Merge branch 'bjorn/compiler/remove-deprecated/OTP-12979'Björn Gustavsson
* bjorn/compiler/remove-deprecated/OTP-12979: core_lib: Remove previously deprecated functions
2015-09-21Merge branch 'maint'Hans Bolinder
* maint: Update application versions
2015-09-21Merge branch 'hb/app_vsn' into maintHans Bolinder
* hb/app_vsn: Update application versions
2015-09-20Merge branch 'maint'Ingela Anderton Andin
2015-09-18ssl: Correct soft upgrade testIngela Anderton Andin
Soft upgrade test did not work as expected due to that the upgrade frame work keeps the control of the test case process to itself, so we need a proxy process to receive messages from ssl test framework.
2015-09-18Update application versionsHans Bolinder
2015-09-18Merge branch 'maint'Ingela Anderton Andin
2015-09-18Merge branch 'ia/inets/next/version' into maintIngela Anderton Andin
* ia/inets/next/version: inets: Prepare for release
2015-09-18Merge branch 'ia/ssl/cuddle_tests' into maintIngela Anderton Andin
* ia/ssl/cuddle_tests: ssl: Timeout tuning
2015-09-18Merge branch 'maint'Dan Gudmundsson
* maint: stdlib: Fix leaking files after error_logger:logfile(close)
2015-09-18Merge branch 'dgud/stdlib/fix-file-error_log-leak' into maintDan Gudmundsson
* dgud/stdlib/fix-file-error_log-leak: stdlib: Fix leaking files after error_logger:logfile(close)
2015-09-17ssl: Timeout tuningIngela Anderton Andin
2015-09-17Merge branch 'maint'Henrik Nord
2015-09-17Update sasl vsn to 2.6Siri Hansen
2015-09-17inets: Prepare for releaseIngela Anderton Andin
2015-09-17stdlib: Fix leaking files after error_logger:logfile(close)Dan Gudmundsson
Introduced when changing state from tuple to record.
2015-09-17Merge branch 'leoliu/export-catch_exception' into maintHenrik Nord
* leoliu/export-catch_exception: Export shell:catch_exception/1 as documented
2015-09-17Merge branch 'maint'Hans Bolinder
* maint: stdlib: Update application version
2015-09-17stdlib: Update application versionHans Bolinder
2015-09-16Merge branch 'maint'Hans Bolinder
* maint: Update application versions
2015-09-16Update application versionsHans Bolinder
2015-09-16Merge branch 'maint'Ingela Anderton Andin
2015-09-16odbc: Prepare for releaseIngela Anderton Andin
2015-09-16Merge branch 'maint'Ingela Anderton Andin
2015-09-16Merge branch 'ia/public_key/next-version' into maintIngela Anderton Andin
* ia/public_key/next-version: public_key: Document enhancements
2015-09-16public_key: Document enhancementsIngela Anderton Andin
OTP-12986
2015-09-16Merge branch 'maint'Dan Gudmundsson
* maint: mnesia: Improve index updates wx: Fix wxAuiManager:getAllPanes/1 wx: Add missing aui functionality
2015-09-16Merge branch 'dgud/wx/add-missing-aui-func/OTP-12961' into maintDan Gudmundsson
* dgud/wx/add-missing-aui-func/OTP-12961: wx: Fix wxAuiManager:getAllPanes/1 wx: Add missing aui functionality
2015-09-16Merge branch 'dgud/mnesia/index-timing/OTP-12972' into maintDan Gudmundsson
* dgud/mnesia/index-timing/OTP-12972: mnesia: Improve index updates
2015-09-16Merge branch 'maint'Ingela Anderton Andin
2015-09-16ssl: Prepare for releaseIngela Anderton Andin
We do not want ssl_soft_upgrade_SUITE to fail, but for now we do not know the details of these changes so we use a general fallback for now.
2015-09-16Merge branch 'maint'Ingela Anderton Andin
2015-09-16Merge branch 'ia/ssl/register-unique-session/OTP-12980' into maintIngela Anderton Andin
* ia/ssl/register-unique-session/OTP-12980: ssl: Correct return value of default session callback module
2015-09-16Merge branch 'ia/ssl/downgrade/alert_timout/OTP-11397/OTP-12832' into maintIngela Anderton Andin
* ia/ssl/downgrade/alert_timout/OTP-11397/OTP-12832: ssl: Better timeout gaurds ssl: Improve shutdown logic
2015-09-16ssl: Better timeout gaurdsIngela Anderton Andin
2015-09-16ssl: Improve shutdown logicIngela Anderton Andin
Add possibility to downgrade an SSL/TLS connection to a tcp connection, and give back the socket control to a user process. Add application setting to be able to change fatal alert shutdown timeout, also shorten the default timeout. The fatal alert timeout is the number of milliseconds between sending of a fatal alert and closing the connection. Waiting a little while improves the peers chances to properly receiving the alert so it may shutdown gracefully.
2015-09-15Merge branch 'maint'Ingela Anderton Andin
2015-09-15Merge branch 'ia/pr/800/OTP-12984' into maintIngela Anderton Andin
* ia/pr/800/OTP-12984: inets: Forward connection errors with https proxy
2015-09-15ssl: Correct return value of default session callback moduleIngela Anderton Andin
ssl_session_cache:select_session/2 returned [sesionid(), #session{}] instead of #session{} as the API demands. This was wrongly compensated for in the code in one place making it look like everything was good. But the client check for unique session would always fail, potentially making the client session table grow a lot and causing long setup times.
2015-09-15syntax_tools: Use the erl_anno module a bit moreHans Bolinder
2015-09-15test_server: Fix a bug related to the use of the erl_anno moduleHans Bolinder
The (harmless) bug was introduced in 42cf8b8.
2015-09-15debugger: Fix a bug related to the use of the erl_anno moduleHans Bolinder
The (harmless) bug was introduced in 541e87f.