aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-02-18beam_validator: Tighten and simplify map validation codeBjörn Gustavsson
The assert_strict_literal_termorder/1 function is used to validate the get_map_elements and has_map_fields instructions. In neither case is it useful to allow an empty lists of fields, so we should no longer allow an empty list. The mmap/2 function is cute, but it is used in only one place, so it is much simpler to write a special-purpose function to extract the keys from the list of map pairs.
2015-02-18beam_utils: Correct test for has_map_fields in is_pure_test/1Björn Gustavsson
The has_map_fields test was not recognized in is_pure_test/1, because beam_a has rewritten the {list,_} part of instruction.
2015-02-18map_SUITE: Cover comparisons of 'nil' in v3_codegenBjörn Gustavsson
2015-02-18Merge branch 'bjorn/stdlib/string-tokens/OTP-12422'Björn Gustavsson
* bjorn/stdlib/string-tokens/OTP-12422: Optimize string:tokens/2 Modernize and strengthen the test case for string:tokens/2
2015-02-18Optimize string:tokens/2Björn Gustavsson
We can save some time by reversing the original string before starting the tokenization. When there is only one separator, we can save even more time by treating that case specially so that we don't have to call lists:member/2 for each character.
2015-02-18Merge branch 'maint'Zandra Hird
2015-02-18Merge branch 'richcarl/shell-module-md5-info' into maintZandra Hird
* richcarl/shell-module-md5-info: make c:m/1 show module MD5 OTP-12500
2015-02-18Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: [sasl] Make test unreliable of kernel.appup
2015-02-18Merge branch 'siri/test-upgrade'Siri Hansen
* siri/test-upgrade: [ct] Improve support for upgrade test of application
2015-02-18Merge branch 'maint'Zandra Hird
2015-02-18Merge branch 'stevendanna/eldap-anon-auth-fix' into maintZandra Hird
* stevendanna/eldap-anon-auth-fix: Correctly process anon_auth option for eldap:open()
2015-02-18Merge branch 'maint'Zandra Hird
2015-02-18Merge branch 'studzien/ct_cover_paths' into maintZandra Hird
* studzien/ct_cover_paths: Add tests for absolute incl_dirs path and for excl_dirs [ct_cover] Fix paths of incl_dirs in cover spec OTP-12498
2015-02-18Merge branch 'bjorn/compiler/clean-up/OTP-12497'Björn Gustavsson
* bjorn/compiler/clean-up/OTP-12497: cerl: Teach is_literal_term/1 to handle maps cerl: Add missing is_c_map/1 function v3_core: Simplify translation of maps sys_core_fold: Simplify opt_simple_let_2/6 Break out inlining of 'lists' functions to a new module sys_core_fold: Add is_int_type/2 and is_tuple_type/2 sys_core_fold: Refactor type information access core_lib: Deprecate functions that are no longer used by the compiler Eliminate use of core_lib:literal_value/1 Eliminate all uses of core_lib:get_anno/1 and core_lib:set_anno/2 core_lint: Eliminate call to core_lib:is_literal/1 test_lib: Include test_server.hrl using -include_lib sys_core_fold: Rename add_scope/2 to fit in the sub_* family v3_core: Suppress compiler-generated calls in guards v3_core: Remove out-commented code v3_core: Remove unused function argument for bc_tq() v3_core: Use Core Erlang annotations in a type-safe way
2015-02-17make c:m/1 show module MD5Richard Carlsson
2015-02-17Merge branch 'ia/ssl/soft-upgrade-test'Ingela Anderton Andin
* ia/ssl/soft-upgrade-test: ssl: Prepare for 18 ssl: Add soft upgrade test suite
2015-02-17Merge branch 'maint'Ingela Anderton Andin
2015-02-17ssl: erlang:timestamp -> os:timestampIngela Anderton Andin
Complements commit 450773958165539951cd431a9233ce7666ec20e2
2015-02-16Modernize and strengthen the test case for string:tokens/2Björn Gustavsson
2015-02-13Merge branch 'maint'Zandra Hird
2015-02-13Merge branch 'emauton/mnesia_create_table_docfix' into maintZandra Hird
* emauton/mnesia_create_table_docfix: Fix index for #person.address in create_table/2
2015-02-13Merge branch 'maint'Zandra Hird
2015-02-13Merge branch 'crownedgrouse/fix_mnesia_subscribe_doc' into maintZandra Hird
* crownedgrouse/fix_mnesia_subscribe_doc: Fix xml doc return value mnesia:(un)subscribe
2015-02-13ssl: Prepare for 18Ingela Anderton Andin
2015-02-13ssl: Add soft upgrade test suiteIngela Anderton Andin
2015-02-12[dialyzer] Fix a bug concerning map() typesHans Bolinder
2015-02-12Merge remote branch 'origin/hb/dialyzer/fix_map_type/OTP-12472' into maintHans Bolinder
* origin/hb/dialyzer/fix_map_type/OTP-12472: [dialyzer] Fix a bug concerning map() types
2015-02-12cerl: Teach is_literal_term/1 to handle mapsBjörn Gustavsson
2015-02-12cerl: Add missing is_c_map/1 functionBjörn Gustavsson
2015-02-12v3_core: Simplify translation of mapsBjörn Gustavsson
There is no need to always introduce a new variable to hold a map. Maps are novars (constructs that don't export variables).
2015-02-12sys_core_fold: Simplify opt_simple_let_2/6Björn Gustavsson
In cd1eaf0116190, opt_simple_let_2/6 was updated to do the same optimizations in 'value' and 'effect' context. Coalesce the clauses for 'value' and 'effect' context to one to make it clear that they do the same thing.
2015-02-12Break out inlining of 'lists' functions to a new moduleBjörn Gustavsson
The code for inlining high-order functions from the lists module is quite annoying when you try to navigate the sys_core_fold module. Break out the code into its own module.
2015-02-12sys_core_fold: Add is_int_type/2 and is_tuple_type/2Björn Gustavsson
Those functions allow us to clean up some more code.
2015-02-12sys_core_fold: Refactor type information accessBjörn Gustavsson
Introduce access functions to hide the low-level details of how type information is implemented.
2015-02-12core_lib: Deprecate functions that are no longer used by the compilerBjörn Gustavsson
2015-02-12Eliminate use of core_lib:literal_value/1Björn Gustavsson
Essentially, core_lib:literal_value/1 became useless when literals were introduced in R12. Since we always create #c_literal{} records whenever possible, literal_value/1 would *only* succeed when it was passed a #c_literal{} argument.
2015-02-12Eliminate all uses of core_lib:get_anno/1 and core_lib:set_anno/2Björn Gustavsson
We are about to deprecate core_lib:get_anno/1 and core_lib:set_anno/2, so we should stop using them in the compiler.
2015-02-12core_lint: Eliminate call to core_lib:is_literal/1Björn Gustavsson
Attributes must be literals. Since 1fcdcd50, both core_parse and v3_core guarantees all Core Erlang terms that may be represented as literals in fact are represented as literals. Therefore, we no longer need to call core_lib:is_literal/1, but can test for a #c_literal{} directly.
2015-02-12test_lib: Include test_server.hrl using -include_libBjörn Gustavsson
This module is the last that uses -include() instead of include_lib(). With that change, a quick smoke test can be done simply like this: PATH=$ERL_TOP/bin:$PATH erlc -W0 *.erl Without the change, you would also need to add -I $ERL_TOP/lib/test_server/include to the command line.
2015-02-11Add tests for absolute incl_dirs path and for excl_dirsRafal Studnicki
2015-02-11Merge branch 'richcarl/dcd-dumps'Zandra Hird
* richcarl/dcd-dumps: Make Mnesia DCD dump behaviour available via API Make Mnesia DCD dump behaviour available via configuration OTP-12481
2015-02-11sys_core_fold: Rename add_scope/2 to fit in the sub_* familyBjörn Gustavsson
Rename add_scope/2 to sub_add_scope/2 to be similar in naming as the other functions that operates on #sub{} (in particular, sub_subst_scope/1). Also, move the definition to be near to the other sub_* functions.
2015-02-11v3_core: Suppress compiler-generated calls in guardsBjörn Gustavsson
Compiling the following function: f(V) when not (bar and V) -> true; %Line 4 f(_) -> false. would produce the following warnings: no_file: Warning: the call to is_boolean/1 has no effect t.erl:4: Warning: the guard for this clause evaluates to 'false' t.erl:4: Warning: use of operator '=:=' has no effect Two of the warnings refer to calls to is_boolean/1 and '=:='/2 which v3_core added when translating the code to Core Erlang. The only relevant warning is: t.erl:4: Warning: the guard for this clause evaluates to 'false' Suppress the other two warning by marking the compiler-generated calls with a 'compiler_generated' annotation.
2015-02-11v3_core: Remove out-commented codeBjörn Gustavsson
2015-02-11v3_core: Remove unused function argument for bc_tq()Björn Gustavsson
2015-02-11v3_core: Use Core Erlang annotations in a type-safe wayBjörn Gustavsson
Core Erlang annotations are supposed to be a list of terms. v3_core could temporarily stuff a record in the 'anno' field of a Core Erlang record. That will cause Dialyzer warnings if we would tighten the type specs for annotations. (We want to tighten the warnings in order to catch more real problems.) Avoid abusing the annotation by wrapping the entire Core Erlang record in a #isimple{} record. Reported-by: Kostis Sagonas
2015-02-10Merge branch 'maint'Dan Gudmundsson
* maint: mnesia: Check nodes after protocol negotiation
2015-02-10Merge branch ↵Dan Gudmundsson
'dumbbell/mnesia-hang-if-remote-stopped-after-proto-negotiation' into maint * dumbbell/mnesia-hang-if-remote-stopped-after-proto-negotiation: mnesia: Check nodes after protocol negotiation OTP-12473
2015-02-10mnesia: Check nodes after protocol negotiationJean-Sébastien Pédron
During Mnesia startup, after protocol negotiation, the list of connected nodes is written to "recover_nodes". This list is later used to merge the schema. If Mnesia was stopped on a remote node between the protocol negotiation and the moment the list is stored in "recover_nodes", the remote node is still considered running: the value of "recover_nodes" stored during mnesia_down/1 is overwritten. Therefore, this node may be used to acquire a write lock on the schema in order to perform the merge. In this case, the remote node never answers to the lock request and Mnesia hang forever (application:start(mnesia) never returns). To fix the problem, we check the list one last time and remove from it all nodes where Mnesia is stopped. And because there is still a chance for missing mnesia_down event, handle_cast({mnesia_down, ...}, ...) writes to recover_nodes again, in addition to mnesia_down/1.
2015-02-10[dialyzer] Fix a bug concerning map() typesHans Bolinder
It is allowed in Erlang/OTP 17 to redefine the map() types. However, Dialyzer did not handle local map() types correctly.