Age | Commit message (Collapse) | Author | |
---|---|---|---|
2016-11-22 | Avoid unnecessary length calculations in gl | Dan Gudmundsson | |
2016-11-22 | dialyzer: Substitute 'opacity' for 'opaqueness' | Hans Bolinder | |
Suggested by Kostis. | |||
2016-11-22 | dialyzer: Improve a warning message | Hans Bolinder | |
Messages regarding guards with orelse/andalso could look like "Clause guard cannot succeed. The variable A was matched against the type any()". Now they look like as if or/and is used: "Guard test is_integer(A::atom()) can never succeed". | |||
2016-11-22 | dialyzer: Improve a warning message | Hans Bolinder | |
Messages like "Invalid type specification for function para3:exp_adt/0. The success typing is () -> 3" now look like "The specification for para3:exp_adt/0 has an opaque subtype para3_adt:exp1(para3_adt:exp2()) which is violated by the success typing () -> 3". The old message did not give any clue as to what invalidated the contract, namely the opaque subtype. | |||
2016-11-22 | dialyzer: Correct a warnings message | Hans Bolinder | |
Messages like "The attempt to match a term of type rec_api:f() against the variable _ breaks the opaqueness of rec_adt:f()" now look like "The attempt to match a term of type rec_adt:f() against the record field 'f' with type rec_api:f() breaks the opaqueness of the term". | |||
2016-11-22 | Add option to send prebuilt binaries to multiDrawArrays | Dan Gudmundsson | |
2016-11-22 | Fix gl driver pointer error | Dan Gudmundsson | |
For lists the pointer was not advanced as it should which caused following in-data (if any) to be wrong. | |||
2016-11-21 | erts: Mend broken checks in nif_SUITE | Sverker Eriksson | |
Macro CHECK did not fail the test case just some nice logging that no one saw. One ignored failure fixed; a delayed unload after purge due to live resource with dtor. | |||
2016-11-21 | ssh: fix error when large client packet size and small on server | Hans Nilsson | |
2016-11-21 | ssh: testcase for too large packet size on client | Hans Nilsson | |
2016-11-21 | Remove remnants of module package support | Richard Carlsson | |
2016-11-19 | hipe_icode_call_elim: Fix cf elimination crash | Magnus Lång | |
hipe_icode_call_elim could in some cases replace an #icode_call{} with control flow with a move instruction. This would break the control flow graph invariants and cause a crash. | |||
2016-11-19 | hipe: Improve error message on internal crashes | Magnus Lång | |
Print the MFA/module being compiled, and pretty-print the backtrace with lib:format_stacktrace/4. Additionally, make the error_msg/2 macro in hipe.hrl respect the HIPE_LOGGING define, since messages produced by this macro just before runtime shutdown were sometimes lost (since code_server:error_msg/2 is asynchronous). | |||
2016-11-19 | document {yield/nb_yield}() limitation | Alexander Clouter | |
2016-11-19 | Add an option erlang-icr-indent | Victor Ren | |
The option makes it possible to customize the indention of if/case/recieve patterns. Before the change, the indentation of 'if' patterns is 3 steps and 'case' patterns is 4 steps. It cannot be changed alone. Some people prefer other styles, for example, zero indentation. case a of true -> do_something(); false -> do_something_else() end. This patch just adds an option `erlang-icr-indent'. Its default value is `nil' which means keeping the legacy behavior. When non-nil, the pattens of if/case/receive are indented according to `erlang-icr-indent'. "(setq erlang-icr-indent 0)" will keep if/case/receive at the same column of the sub-clauses. Change-Id: I10c32e42dbf69cbe187f55223b9aa7824853e493 | |||
2016-11-18 | Merge branch 'mm/stdlib/ord-docs/PR-1242' | Björn Gustavsson | |
* mm/stdlib/ord-docs/PR-1242: Document the ordering used in ordsets and orddicts | |||
2016-11-18 | Document the ordering used in ordsets and orddicts | Michal Muskala | |
Right now the exact order of elements is not specified, yet many programs rely on the ordering being the obvious one - erlang term order. It is only beneficial to make this an explicit part of the documentation. | |||
2016-11-18 | ssh: added two test cases | Hans Nilsson | |
2016-11-18 | ssh: Removed irrelevant rfc reference in doc | Hans Nilsson | |
The rfc 4255 is about fingerprints, but only in the context of dns. Since this is out-of-scope for the Erlang/OTP ssh, the reference is missleading. | |||
2016-11-18 | ssh: Add fun and fingerprint to option 'silently_accept_host' | Hans Nilsson | |
2016-11-18 | public_key: type extension (digest_type()) | Hans Nilsson | |
2016-11-18 | public_key: ssh host key fingerprint generator added | Hans Nilsson | |
2016-11-18 | Merge branch 'maint' | Björn Gustavsson | |
* maint: Travis: Reduce memory consumption for dialyzer | |||
2016-11-18 | Merge branch 'bjorn/travis-dialyzer' into maint | Björn Gustavsson | |
* bjorn/travis-dialyzer: Travis: Reduce memory consumption for dialyzer | |||
2016-11-18 | Travis: Reduce memory consumption for dialyzer | Björn Gustavsson | |
9e06884c3a7db started to run Dialyzer in Travis. After that, Travis has crashed several times because of the memory limit of 2Gb has been exceeded. Try to fix that by analyzing only three or four applications at a time. | |||
2016-11-18 | Merge branch 'bjorn/compiler/guards/PR-1232/OTP-14042' | Björn Gustavsson | |
* bjorn/compiler/guards/PR-1232/OTP-14042: compile_SUITE: Make sure that guards are optimized beam_dead: Remove redundant 'or' instruction beam_dead: Remove redundant 'bif' instructions Add test using LFE-generated Core Erlang modules Remove beam_bool v3_kernel: Generate optimized code for guards sys_core_fold: Remove unnecessary calls to opt_bool_case/1 record_SUITE: Strengthen test of record access in guards | |||
2016-11-18 | compile_SUITE: Make sure that guards are optimized | Björn Gustavsson | |
Guards should use the more efficient 'test' instructions, not 'bif' instructions. Add a test to make sure that the optimizations don't degrade. We do have to keep an exception list for functions where we can't replace all 'bif' calls with 'test' instructions. We try to keep that list a short as practically possible. | |||
2016-11-18 | beam_dead: Remove redundant 'or' instruction | Björn Gustavsson | |
In practice, this optimization will only apply to contrived guards that are almost never used in real applications. The only reason we add this optimization is to help approach the goal of zero tolerance for 'bif' instructions instead of 'test' instructions in guards. | |||
2016-11-18 | beam_dead: Remove redundant 'bif' instructions | Björn Gustavsson | |
A 'bif' or 'gc_bif' instruction is redundant if it has the same failure label as a 'jump' instruction immediately following it. There is no need to test for liveness of the destination register, because the code at the failure label cannot safely assume that the destination register is initialized. See the comments in the code for further details. In practice, this optimization will only apply to contrived guards that are almost never used in real applications. The only reason we add this optimization is to help approach the goal of zero tolerance for 'bif' instructions instead of 'test' instructions in guards. | |||
2016-11-18 | Add test using LFE-generated Core Erlang modules | Björn Gustavsson | |
Ensure that correct (not necessarily optimal) code is generated for Core Erlang code not originating from v3_core. | |||
2016-11-18 | Remove beam_bool | Björn Gustavsson | |
The guard optimizations in v3_kernel has removed the need for beam_bool. | |||
2016-11-18 | v3_kernel: Generate optimized code for guards | Björn Gustavsson | |
The compiler produces poor code for complex guard expressions with andalso/orelse. Here is an example from the filename module: -define(IS_DRIVELETTER(Letter),(((Letter >= $A) andalso (Letter =< $Z)) orelse ((Letter >= $a) andalso (Letter =< $z)))). skip_prefix(Name, false) -> Name; skip_prefix([L, DrvSep|Name], DrvSep) when ?IS_DRIVELETTER(L) -> Name; skip_prefix(Name, _) -> Name. beam_bool fails to simplify the code for the guard, leaving several 'bif' instructions: {function, skip_prefix, 2, 49}. {label,48}. {line,[{location,"filename.erl",187}]}. {func_info,{atom,filename},{atom,skip_prefix},2}. {label,49}. {test,is_ne_exact,{f,52},[{x,1},{atom,false}]}. {test,is_nonempty_list,{f,52},[{x,0}]}. {get_list,{x,0},{x,2},{x,3}}. {test,is_nonempty_list,{f,52},[{x,3}]}. {get_list,{x,3},{x,4},{x,5}}. {bif,'=:=',{f,52},[{x,1},{x,4}],{x,6}}. {test,is_ge,{f,50},[{x,2},{integer,65}]}. {bif,'=<',{f,52},[{x,2},{integer,90}],{x,7}}. {test,is_eq_exact,{f,51},[{x,7},{atom,false}]}. {test,is_ge,{f,50},[{x,2},{integer,97}]}. {bif,'=<',{f,52},[{x,2},{integer,122}],{x,7}}. {jump,{f,51}}. {label,50}. {move,{atom,false},{x,7}}. {label,51}. {bif,'=:=',{f,52},[{x,7},{atom,true}],{x,7}}. {test,is_eq_exact,{f,52},[{x,6},{atom,true}]}. {test,is_eq_exact,{f,52},[{x,7},{atom,true}]}. {move,{x,5},{x,0}}. return. {label,52}. return. We can add optimizations of guard tests to v3_kernel to achive a better result: {function, skip_prefix, 2, 49}. {label,48}. {line,[{location,"filename.erl",187}]}. {func_info,{atom,filename},{atom,skip_prefix},2}. {label,49}. {test,is_ne_exact,{f,51},[{x,1},{atom,false}]}. {test,is_nonempty_list,{f,51},[{x,0}]}. {get_list,{x,0},{x,2},{x,3}}. {test,is_nonempty_list,{f,51},[{x,3}]}. {get_list,{x,3},{x,4},{x,5}}. {test,is_eq_exact,{f,51},[{x,1},{x,4}]}. {test,is_ge,{f,51},[{x,2},{integer,65}]}. {test,is_lt,{f,50},[{integer,90},{x,2}]}. {test,is_ge,{f,51},[{x,2},{integer,97}]}. {test,is_ge,{f,51},[{integer,122},{x,2}]}. {label,50}. {move,{x,5},{x,0}}. return. {label,51}. return. Looking at the STDLIB application, there were 112 lines of BIF calls in guards that beam_bool failed to convert to test instructions. This commit eliminates all those BIF calls. Here is how I counted the instructions: $ PATH=$ERL_TOP/bin:$PATH erlc -I ../include -I ../../kernel/include -S *.erl $ grep "bif,'[=<>]" *.S | grep -v f,0 dets.S: {bif,'=:=',{f,547},[{x,4},{atom,read_write}],{x,4}}. dets.S: {bif,'=:=',{f,547},[{x,5},{atom,saved}],{x,5}}. dets.S: {bif,'=:=',{f,589},[{x,5},{atom,read}],{x,5}}. . . . $ grep "bif,'[=<>]" *.S | grep -v f,0 | wc 112 224 6765 $ | |||
2016-11-18 | Merge branch 'maint' | Björn Gustavsson | |
* maint: Run dialyzer as part of the travis script Correct tar_SUITE:unicode/1 | |||
2016-11-18 | Merge branch 'kostis/travis-dialyzer' into maint | Björn Gustavsson | |
* kostis/travis-dialyzer: Run dialyzer as part of the travis script | |||
2016-11-18 | Merge branch 'bjorn/cuddle-with-tests' into maint | Björn Gustavsson | |
* bjorn/cuddle-with-tests: Correct tar_SUITE:unicode/1 | |||
2016-11-18 | Merge branch 'maint' | Ingela Anderton Andin | |
2016-11-18 | Merge branch 'ingela/httpc/keep-alive-https/OTP-14041' into maint | Ingela Anderton Andin | |
* ingela/httpc/keep-alive-https/OTP-14041: inets: httpc - do not send absolute URIs over TLS tunnels | |||
2016-11-18 | Suppress warnings from v3_kernel when inlining is turned on | Björn Gustavsson | |
v3_kernel may produce unwanted and confusing warnings for code that has been inlined with the new inliner (cerl_inline). Consider this code: -compile(inline). compute1(X) -> add(X, 0). compute2(X, Y) -> add(X, Y). add(1, 0) -> 1; add(1, Y) -> %% "this clause cannot match..." 1 + Y; add(X, Y) -> X + Y. v3_kernel warns because add/2 has been inlined into compute1/1 and only the first clause in add/2 will match. But the other clauses are needed when add/2 is inlined into compute2/2, so the user cannot do anything to eliminate the warning (short of manually inlining add/2, defeating the purpose of the 'inline' option). The warning would be reasonable if compute2/2 didn't exist, but it would be too complicated for the compiler to figure whether a warning make sense or not. Therefore, suppress all warnings generated by v3_kernel if cerl_inline has been run. ERL-301 | |||
2016-11-18 | Merge branch 'dgud/stdlib/rand-fixup-spec' | Dan Gudmundsson | |
* dgud/stdlib/rand-fixup-spec: Fixup of specs in rand | |||
2016-11-18 | Merge branch 'maint' | Ingela Anderton Andin | |
2016-11-18 | Merge branch 'ingela/odbc/mac' into maint | Ingela Anderton Andin | |
* ingela/odbc/mac: odbc: Remove support for old MACs | |||
2016-11-18 | odbc: Remove support for old MACs | Ingela Anderton Andin | |
Change configure to skip odbc for old MACs, the change in PR-1227 is not backwards compatible with old MACs, and we do not see a need to continue support for such old versions. However it is still possible to make it work on such machines using the --with-odbc configure option. | |||
2016-11-17 | Run dialyzer as part of the travis script | Kostis Sagonas | |
Build a dialyzer PLT and use it to analyze all OTP applications that can currently be analyzed without warnings even when the option -Wunmatched_returns is turned on. Note that the dialyzer run does _not_ enable the option which allows for improper lists. Applications to run dialyzer on are mentioned alphabetically. As more applications are fixed to run cleanly even with unmatched returns, they can be added to this list. However, there will come a point when the warning pass of Dialyzer will run out of memory on Travis and the process will be killed. This should be fixed in dialyzer. | |||
2016-11-17 | erts: Tweak PSTACK to avoid warning | Sverker Eriksson | |
warning: array subscript is below array bounds and ok, it's technically undef behavior to set pointer before first array element. | |||
2016-11-17 | erts: Fix all -Wundef errors | Sverker Eriksson | |
2016-11-17 | erts: Add ErtsStrToSint64 | Sverker Eriksson | |
for simplify string to 64-bit integer parsing. | |||
2016-11-17 | erts: Refactor crash dumping with cbprintf | Sverker Eriksson | |
Instead of passing around a file descriptor use a function pointer to facilitate more advanced backend write logic such as size limitation or compression. | |||
2016-11-17 | erts: Add cbprintf for Callback Printing | Sverker Eriksson | |
2016-11-17 | Correct tar_SUITE:unicode/1 | Björn Gustavsson | |
Make sure that we always test the "+fnu" option on all systems. It seems that it was not tested in our daily builds, since they are run non-interactively. Make sure that we sort the list of names in do_unicode/1. Otherwise the test would only work in "+fnl" mode because the list would only contain one element. | |||
2016-11-17 | Merge branch 'elbrujohalcon/expand-sup-doc/PR-1233/OTP-14037' | Siri Hansen | |
* elbrujohalcon/expand-sup-doc/PR-1233/OTP-14037: Expand on the behavior of supervisors |