aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
AgeCommit message (Collapse)Author
2014-03-07Merge branch 'nox/maps-beam_jump-put_map'Björn-Egil Dahlberg
* nox/maps-beam_jump-put_map: Properly collect labels in put_map instructions in beam_jump
2014-03-06Merge branch 'nox/maps-cerl_clauses'Björn-Egil Dahlberg
* nox/maps-cerl_clauses: Support maps in cerl_clauses:match/2
2014-03-06Merge branch 'nox/maps-beam_jump'Björn-Egil Dahlberg
* nox/maps-beam_jump: Properly check label use in get_map_elements in beam_jump
2014-03-06Merge branch 'nox/maps-v3_codegen-sort-nil-keys'Björn-Egil Dahlberg
* nox/maps-v3_codegen-sort-nil-keys: Properly sort map pairs in v3_codegen
2014-03-06Merge branch 'nox/maps-complex-mixed-values'Björn-Egil Dahlberg
* nox/maps-complex-mixed-values: Properly order Kernel code for maps with mixed pairs
2014-03-06Merge branch 'nox/compiler/v3_core-comprehension-no-export'Björn Gustavsson
* nox/compiler/v3_core-comprehension-no-export: Do not export variables from comprehension cases in v3_core OTP-11770
2014-03-06Merge branch 'nox/compiler/beam_bool-not_boolean_expr'Björn Gustavsson
* nox/compiler/beam_bool-not_boolean_expr: Compile BIF calls and operator expressions to Core the same way Do not try to optimize non-boolean guards
2014-03-06Merge branch 'nox/compiler/core_lint-call-guard'Björn Gustavsson
* nox/compiler/core_lint-call-guard: Properly lint calls in Core Erlang guards
2014-03-06Properly collect labels in put_map instructions in beam_jumpAnthony Ramine
Reported-by: Ulf Norell
2014-03-05Merge branch 'nox/compiler/beam_bool-bad-protected'Björn Gustavsson
* nox/compiler/beam_bool-bad-protected: Properly detect nonboolean protected expressions in beam_bool
2014-03-05Merge branch 'nox/compiler/live_opt-wait_timeout-nil'Björn Gustavsson
* nox/compiler/live_opt-wait_timeout-nil: Handle nil as a wait_timeout argument in beam_utils:live_opt/4
2014-03-05Merge branch 'nox/compiler/sys_core_fold-erlang-is_function-2'Björn Gustavsson
* nox/compiler/sys_core_fold-erlang-is_function-2: Do not mark all calls to erlang:is_function/2 as safe
2014-03-05Do not export variables from comprehension cases in v3_coreAnthony Ramine
Code like the following snippet could make the compiler crash: f() -> [X = a || false] ++ [X = a || false]. Reported-by: Ulf Norell
2014-03-05Merge branch 'hb/dialyzer/deprecate_types/OTP-10342'Hans Bolinder
* hb/dialyzer/deprecate_types/OTP-10342: Introduce compiler option 'nowarn_deprecated_type' Improve message about deprecated built-in types
2014-03-05Compile BIF calls and operator expressions to Core the same wayAnthony Ramine
Previously, erlang:'or'(X, Y) and X or Y were not compiled to the same Core code.
2014-03-05Do not try to optimize non-boolean guardsAnthony Ramine
Expressions such as erlang:'or'(bar, true) can make beam_bool crash if it tries to optimize them, as this code is not quite really written by users, no attempt to rewrite them more efficiently should be done, for simplicity's sake. Reported-by: Ulf Norell
2014-03-05Properly check label use in get_map_elements in beam_jumpAnthony Ramine
Reported-by: Ulf Norell
2014-03-04Support maps in cerl_clauses:match/2Anthony Ramine
Without this, sys_core_fold could crash on non-matching clauses using maps patterns. Reported-by: Ulf Norell
2014-03-04Properly order Kernel code for maps with mixed pairsAnthony Ramine
The Kernel instructions were not properly ordered when compiling maps with complex values mixed in assoc and exact pairs. Reported-by: Ulf Norell
2014-03-04Properly sort map pairs in v3_codegenAnthony Ramine
Literal nil values aren't tagged tuple but the bare atom nil. The function lists:sort/2 expects the passed function to return true if the first element is less than or equal to the second, not strictly less than. The original base clause is changed accordingly. Reported-by: Ulf Norell
2014-03-04Properly lint calls in Core Erlang guardsAnthony Ramine
Not all calls to the erlang module are legal guards in Core Erlang.
2014-03-04Merge branch 'nox/maps-fix-beam_bool-put_map'Björn-Egil Dahlberg
* nox/maps-fix-beam_bool-put_map: Properly collect labels in put_map instructions in beam_bool
2014-03-04Merge branch 'nox/maps-expand-update'Björn-Egil Dahlberg
* nox/maps-expand-update: Fix expansion of map update arguments
2014-03-04Merge branch 'nox/compiler/v3_core-mismatched-apply'Björn Gustavsson
* nox/compiler/v3_core-mismatched-apply: Do not emit blatantly illformed Core Erlang apply expressions
2014-03-04Merge branch 'nox/compiler/sys_core_fold-erlang-is_record-3'Björn Gustavsson
* nox/compiler/sys_core_fold-erlang-is_record-3: Do not mark all calls to erlang:is_record/3 as safe
2014-03-04Introduce compiler option 'nowarn_deprecated_type'Hans Bolinder
The deprecation of the built-in types dict/0 and so on had as side-effect that it was impossible to switch to dict:dict/2 and so on without getting warnings either in the the previous release (R16B) or the current one (17.0). By including the attribute -compile(nowarn_deprecated_type). in an Erlang source file warnings about deprecated types can be avoided in 17.0. The option can also be given as a compiler flag: erlc +nowarn_deprecated_type file.erl
2014-03-04Handle nil as a wait_timeout argument in beam_utils:live_opt/4Anthony Ramine
Reported-by: Ulf Norell
2014-03-04Properly detect nonboolean protected expressions in beam_boolAnthony Ramine
Silly code such as the following could make the compiler crash: f() when erlang:float(self()); true -> ok. Reported-by: Ulf Norell
2014-03-03Properly collect labels in put_map instructions in beam_boolAnthony Ramine
Reported-by: Ulf Norell
2014-03-03Do not mark all calls to erlang:is_function/2 as safeAnthony Ramine
Calls to erlang:is_function/2 where the second is not a literal nonnegative integer can crash at runtime and thus can't be marked as safe.
2014-03-02Do not mark all calls to erlang:is_record/3 as safeAnthony Ramine
Calls to erlang:is_record/3 where the second and third arguments are not respectively a literal atom and a literal integer can't be transformed to guards and thus are not safe. Reported-by: Ulf Norell
2014-03-01Do not emit blatantly illformed Core Erlang apply expressionsAnthony Ramine
(fun f/1)() should be compiled to let X = 'f'/1 in apply X () to let the compiler properly generate code that will fail with badarity at runtime. Reported-by: Ulf Norell
2014-03-01Fix expansion of map update argumentsAnthony Ramine
Reported-by: José Valim
2014-02-28compiler: Fix error message printout on compile errorBjörn-Egil Dahlberg
Use correct stack in printout.
2014-02-24Merge branch 'tuncer/update-deprecation-message/OTP-11751'Henrik Nord
* tuncer/update-deprecation-message/OTP-11751: compiler: update 'asm' deprecation message
2014-02-24Merge branch 'fenollp/otp-edoc-usage-fixes'Henrik Nord
* fenollp/otp-edoc-usage-fixes: Fix edoc usage errors OTP-11702
2014-02-24Merge branch 'egil/maps/fix-cerl-inlining'Björn-Egil Dahlberg
* egil/maps/fix-cerl-inlining: compiler: Update map_SUITE to handle inlining erts: Maps src instructions can't be literals compiler: Fix map inlining compiler: Add variable coverage of map in cerl
2014-02-24Merge branch 'hb/dialyzer/deprecate_types/OTP-10342'Hans Bolinder
* hb/dialyzer/deprecate_types/OTP-10342: Deprecate pre-defined built-in types
2014-02-24Merge branch 'schlagert/fix_basic_appups'Siri Hansen
* schlagert/fix_basic_appups: Dynamically configure typer_SUITE according to environment Disable hipe_SUITE when environment doesn't support it Make hipe non-upgradable by setting appup file empty Fix missing module on hipe app file template Add test suites performing app and appup file checks Introduce appup test utility Fix library application appup files Fix non-library appup files according to issue #240 OTP-11744
2014-02-24Add test suites performing app and appup file checksTobias Schlager
Add the mentioned test suites for *all* library and touched non-library applications.
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been deprecated. They will be removed in OTP 18.0. Instead the types array:array(), dict:dict(), digraph:graph(), gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid() can be used. (Note: it has always been necessary to use ets:tid().) It is allowed in OTP 17.0 to locally re-define the types array(), dict(), and so on. New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2, queue:queue/1, and sets:set/1 have been added.
2014-02-21compiler: Update map_SUITE to handle inliningBjörn-Egil Dahlberg
2014-02-21compiler: Fix map inliningBjörn-Egil Dahlberg
Added coverage of operating map variable.
2014-02-21compiler: Add variable coverage of map in cerlBjörn-Egil Dahlberg
2014-02-21Merge branch 'egil/compiler/maps-get_map_elements'Björn-Egil Dahlberg
* egil/compiler/maps-get_map_elements: compiler: Strengthen Maps compile tests compiler: Remove dead warning erts: Fix erts_debug:disassemble/1 compiler: Transform list of Args to exact literal type compiler: Test Maps aliasing compiler: Use aliasing in map pair patterns compiler: Check literal order in beam_validator erts: Introduce new instructions for combined key fetches compiler: Change map instructions for fetching values
2014-02-20compiler: Strengthen Maps compile testsBjörn-Egil Dahlberg
2014-02-20compiler: Remove dead warningBjörn-Egil Dahlberg
2014-02-19compiler: Transform list of Args to exact literal typeBjörn-Egil Dahlberg
2014-02-19compiler: Test Maps aliasingBjörn-Egil Dahlberg
2014-02-19compiler: Use aliasing in map pair patternsBjörn-Egil Dahlberg