aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2014-03-21fix sys:get_state/1,2 and sys:replace_state/2,3 when sys suspendedSteve Vinoski
Add two new system callbacks Module:system_get_state/1 and Module:system_replace_state/2 to allow sys:get_state/1,2 and sys:replace_state/2,3 to operate correctly even if a process is sys suspended. Modify gen_server, gen_fsm, and gen_event to support the new callbacks. If a callback module does not export these functions, then by default the Misc value (the same as that passed as the final argument to sys:handle_system_msg/6, and returned as part of the return value of sys:get_status/1,2) is treated as the callback module's state. The previous behaviour of intercepting the system message and passing a tuple of size 2 as the last argument to sys:handle_system_msg/6 is no longer supported. Add tests to verify the correctness of sys:get_state/1,2 and sys:replace_state/2,3 when processes are sys suspended. Add two tests for modules that implement special processes, one that exports system_get_state/1 and system_replace_state/2 and one that doesn't. Much of the credit for this patch goes to James Fish, who reported the initial problem and implemented much of the fix.
2014-03-20Merge branch 'ks/cerl-type-fixes'Björn-Egil Dahlberg
* ks/cerl-type-fixes: Restore the alphabetical order of Core Erlang records Clean up the types of cerl
2014-03-20Merge branch 'bjorn/asn1/cleanup/OTP-11727'Björn Gustavsson
* bjorn/asn1/cleanup/OTP-11727: Clean up reporting of errors in IMPORTS asn1ct_check: Clean up error checking for INSTANCE OF asn1ct_check: Rewrite error checking for INTEGER and BIT STRING asn1ct_check: Remove unreachable clauses handling {identifier,_,_} asn1ct_check: Let asn1_error/3 throw its result
2014-03-20Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: cover_SUITE:reconnect/1: Let the other side initiate the disconnect Attempt to provide more information if a test case fails prim_file_SUITE: Remove the short 5 seconds timetrap timeout shell_SUITE: Give bs_match_bin_SUITE/1 more time
2014-03-20Merge branch 'siri/master-cuddle-with-tests'Siri Hansen
* siri/master-cuddle-with-tests: Remove "coding: utf-8" from test files Change encoding for XML files to utf-8
2014-03-19Merge branch 'nox/maps-v3_core-lit_vars'Björn-Egil Dahlberg
* nox/maps-v3_core-lit_vars: Properly collect variables in map expressions in v3_core
2014-03-19Merge remote branch 'origin/peppe/common_test/telnet_logging_final'Peter Andersson
* origin/peppe/common_test/telnet_logging_final: Add test cases and fix some problems with logging and with the telnet client Get ct_telnet_client to print all data from server to log Change telnet logging behaviour OTP-11690
2014-03-19Merge branch 'hb/clarify_encoding'Hans Bolinder
* hb/clarify_encoding: Clarify the reference manual regarding source file encoding
2014-03-19Merge branch 'scrapinghub/update_session_error_logging_fix'Henrik Nord
* scrapinghub/update_session_error_logging_fix: inets: Fix incorrect argument order OTP-11794
2014-03-19Merge branch 'technomancy/emacs-autoload'Henrik Nord
* technomancy/emacs-autoload: Activate Emacs erlang-mode for .app files inside ebin directory. Add more file types to Emacs auto-mode-alist. Add Emacs autoloads for .erl and .app.src. OTP-11788
2014-03-19Merge branch 'bjorn/compiler/utf8-warning/OTP-11791'Björn Gustavsson
* bjorn/compiler/utf8-warning/OTP-11791: Don't fail compilation for modules that contain invalid UTF-8 epp: Make it possible to specify a default encoding
2014-03-19Restore the alphabetical order of Core Erlang recordsKostis Sagonas
The introduction of c_map{} and c_map_pair{} unnecessarily broke the alphabetical order of Core Erlang records. They were probably placed at the end of the file so as to use other records as types. There is really no need for this since 'cerl' contains appropriate definitions of types that can be used for this purpose. While at it, a type declaration to the c_binary{} definition was added.
2014-03-19Clean up the types of cerlKostis Sagonas
The introduction of c_map and c_map_pair was not done properly. In particular, the definition of ctype() and an important Edoc comment were not up-to-date. While at it, - some more types were cleaned up and exported so as to be used in core_parse.hrl and - some obviously dead code was removed (the type/1 function does not return 'nil', which in turn simplified a clause in the code of meta_1/2).
2014-03-19Merge remote-tracking branch 'erlang/pr/289'Henrik Nord
* erlang/pr/289: remove reference to dbg_wx_edit* modules that don't exist
2014-03-19Merge branch 'josevalim/set_cwd-typespec'Henrik Nord
* josevalim/set_cwd-typespec: Correct file:set_cwd/1 typespec OTP-11787
2014-03-19Merge branch 'vinoski/emacs-keyword-boundaries'Henrik Nord
* vinoski/emacs-keyword-boundaries: match erlang keywords more carefully OTP-11786
2014-03-19Merge branch 'kostis/hipe-rc2-patch'Henrik Nord
* kostis/hipe-rc2-patch: Cleanup and make sure warnings are treated as errors Add specs for exported functions (to shut off a warning) and types in some record fields Introduce and use a hipe_icode:icode() type Substitude uses of lists:reverse(L1) ++ L2 with lists:reverse(L1, L2)
2014-03-18Don't fail compilation for modules that contain invalid UTF-8Björn Gustavsson
The default encoding for Erlang modules is now UTF-8, and the compilation would fail if a module contained byte sequences that are not valid UTF-8 sequences. In a large project with say many hundreds of Erlang modules with names of developers such as "Björn" or "Håkan" encoded in latin-1, that could mean that many hundreds of files would need to be modified just to get started testing OTP 17. As a temporary measure to ease the transition, automatically fall back to the latin-1 encoding with a warning for any module that contains invalid byte sequences and for which no encoding has been specified. The intention is to remove this workaround in OTP 18 or 19.
2014-03-18epp: Make it possible to specify a default encodingBjörn Gustavsson
In the next commit, we will need a way to tell epp which the default encoding should be for files that have no encoding comment. We could add new open() and parse_file() functions with one extra argument for the encoding, but there are already too many variants. To avoid having to add an additional argument to epp:open() and epp:parse_file() each time new options are needed, introduce epp:open/1 and epp:parse_file/2 that takes a property list with options. Also support the new 'default_encoding' option for specifying the default encoding for source files. Thanks to Richard Carlsson for the idea and the implementation of the new functionality in epp.erl.
2014-03-18Properly collect variables in map expressions in v3_coreAnthony Ramine
Reported-by: José Valim
2014-03-18Merge branch 'egil/maps-literals'Björn-Egil Dahlberg
* egil/maps-literals: compiler: Transform M#{} to is_map(M) dialyzer: Do not native compile modules with Maps code hipe: Properly identify map() type form terms stdlib: Test Map key linting stdlib: Accept records as Map keys stdlib: Accept Maps as Map keys stdlib: Move map type to proper definition stdlib: Properly lint map key expressions compiler: Change #c_map{var} to #c_map{arg} compiler: Constant fold Maps that are safe compiler: Validate Map src compiler: Support literal maps in cerl_clauses:match/2 compiler: Guard BIF is_map/1 is pure erts: Handle literals in is_map/1 compiler: Change Maps Core Format compiler: Create literal Maps in creation if possible
2014-03-18Merge branch 'nox/maps-eval-empty-update'Björn-Egil Dahlberg
* nox/maps-eval-empty-update: Fix evaluation of empty map patterns in erl_lint Fix evaluation of empty map updates in the debugger Fix evaluation of empty map updates in erl_eval
2014-03-18Merge branch 'ia/ssl/ECC-error-handling/OTP-11780'Ingela Anderton Andin
* ia/ssl/ECC-error-handling/OTP-11780: ssl: Server now ignores client ECC curves that it does not support instead of crashing. Add test for unknown elliptic curve supported by client
2014-03-17compiler: Transform M#{} to is_map(M)Björn-Egil Dahlberg
Core should not understand M#{} Instead transform M#{} to case _cor0 of <_cor1> when call 'erlang':'is_map' (_cor0) -> _cor1 ( <_cor2> when 'true' -> primop 'match_fail' ('badarg') -| ['compiler_generated'] ) end
2014-03-17dialyzer: Do not native compile modules with Maps codeBjörn-Egil Dahlberg
hipe:c/1 ignores '-compile(no_native).'
2014-03-17hipe: Properly identify map() type form termsBjörn-Egil Dahlberg
2014-03-17stdlib: Test Map key lintingBjörn-Egil Dahlberg
This will change in future release.
2014-03-17stdlib: Accept records as Map keysBjörn-Egil Dahlberg
2014-03-17stdlib: Accept Maps as Map keysBjörn-Egil Dahlberg
2014-03-17stdlib: Move map type to proper definitionBjörn-Egil Dahlberg
2014-03-17stdlib: Properly lint map key expressionsBjörn-Egil Dahlberg
Only values are valid key expressions.
2014-03-17compiler: Change #c_map{var} to #c_map{arg}Björn-Egil Dahlberg
Not only variables are allowed as arguments, the name should reflect that. Change cerl Map argument interface * cerl:map_arg/1 is more suitable then cerl:map_val/1 in this case.
2014-03-17compiler: Constant fold Maps that are safeBjörn-Egil Dahlberg
For updates of Map literals which may cause an error will be determined in runtime, i.e. instructions are emitted for those updates. The changes in cerl now requires compiler-5.0 to compile because of is_map/1 guard.
2014-03-17compiler: Validate Map srcBjörn-Egil Dahlberg
Reject all expressions that are known to fail. Emit 'badarg' for those expressions. Ex. []#{ a => 1} Is not a valid map update expression.
2014-03-17compiler: Support literal maps in cerl_clauses:match/2Björn-Egil Dahlberg
2014-03-17compiler: Guard BIF is_map/1 is pureBjörn-Egil Dahlberg
2014-03-17compiler: Change Maps Core FormatBjörn-Egil Dahlberg
Ex. Instead of: M~{~<K,V>}~ The format is now: ~{~<K,V>|M}~ This also removes a shift/reduce warning. The changes in core_pp now requires compiler-5.0 to compile because of is_map/1 guard, i.e. a need for a compiler with Maps know-how.
2014-03-17Clarify the reference manual regarding source file encodingHans Bolinder
2014-03-17Remove "coding: utf-8" from test filesSiri Hansen
UTF-8 is now the default encoding and should no longer be specified. These have probably been merged from maint earlier and the coding statement was missed. lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl lib/diameter/test/diameter_codec_test.erl lib/ssh/test/ssh_unicode_SUITE.erl
2014-03-17Change encoding for XML files to utf-8Siri Hansen
These are some files that were erronously missed earlier: erts/doc/src/time_correction.xml lib/crypto/doc/src/crypto_app.xml lib/snmp/doc/src/snmpa_mib_data.xml lib/snmp/doc/src/snmpa_mib_storage.xml
2014-03-15Fix evaluation of empty map patterns in erl_lintAnthony Ramine
Reported-by: José Valim
2014-03-15Fix evaluation of empty map updates in the debuggerAnthony Ramine
2014-03-14Fix evaluation of empty map updates in erl_evalAnthony Ramine
2014-03-14compiler: Create literal Maps in creation if possibleBjörn-Egil Dahlberg
2014-03-14Merge branch 'sverk/maps-erl_interface'Sverker Eriksson
* sverk/maps-erl_interface: erts: Add distribution capability flag for maps DFLAG_MAP_TAG erts: Change external format for maps erts: Document external format for maps (MAP_EXT) erl_interface: Add test for ei_skip_term of container terms erl_interface: Add map support in ei_skip_term erl_interface: Fix mem leak in ei_decode_encode_test erl_interface: test decode/encode of maps erl_interface: Add ei encode/decode for maps erl_interface: test decode_encode of tuples and lists erl_interface: refactor ei_decode_encode_test.c
2014-03-14ssl: Server now ignores client ECC curves that it does not support instead ofIngela Anderton Andin
crashing. When TLS client sends Supported Elliptic Curves Client Hello Extension the server shall select a curve supported by both sides or refuse to negotiate the use of an ECC cipher suite.
2014-03-14Add test for unknown elliptic curve supported by clientDanil Zagoskin
When TLS client sends a Supported Elliptic Curves Client Hello Extension containing an unknown curve enum value, a server crashes with a function_clause instead of just ignoring specified unknown curve.
2014-03-14erts: Add distribution capability flag for maps DFLAG_MAP_TAGSverker Eriksson
This is just a preparation to allow detection of older nodes that do not understand maps (R16 and older).
2014-03-14erts: Change external format for mapsSverker Eriksson
to be: 116,Arity, K1,V1,K2,V2,...,Kn,Vn instead of: 116,Arity, K1,K2,...,Kn, V1,V2,....,Vn We think this will be better for future internal map structures like HAMT. Would be bad if we need to iterate twice over HAMT in term_to_binary, one for keys and one for values.
2014-03-14Merge branch 'nox/compiler/beam_bool-mixed-boolean'Björn Gustavsson
* nox/compiler/beam_bool-mixed-boolean: Properly detect reused boolean values in beam_bool