Age | Commit message (Collapse) | Author |
|
|
|
Optimization: A few dictionaries are maps instead of dicts.
|
|
The evaluation of a single SCC has been optimized.
The parallelism when evaluating a single SCC has been removed.
|
|
* experimental/correct_dialyzer_spelling/PR-1007/OTP-13544:
Correct mispelling in Dialyzer's acronym definition
|
|
28a4a5057ab9 mistakenly used the non-existing type cerl:tree() instead
of cerl:cerl().
|
|
dialyzer_typesig:traverse/3 would perform an unsafe optimisation when
given a cons pattern that contained a map and could be folded into a
literal with cerl:fold_literal/1. In this case, when traversing the map
a type variable would be generated, but this variable would be dropped
by the erl_types:t_cons/2 constructor by in turn calling t_sup(),
producing the overapproximation any(). However, in this particular case,
dialyzer_typesig:traverse/3 is not allowed to overapproximate, since its
result is used in an EQ-constraint.
Although erl_types:t_tuple/1 does not overapproximate like t_cons/2,
which makes the bug unlikely to affect tuples too, the fix was
nevertheless applied defensively to the case of tuples as well.
Also, fix a bug where dialyzer_utils:refold_pattern/1 would generate
syntax nodes with two {label, _} attributes.
|
|
|
|
This is analogous to the case of nil. Since #{} is a base-case of almost
all map types, contract and success typing sharing #{} does not mean
much, and is often sign of a violation.
|
|
mk_constraint_list/2 was simplifying (C OR TriviallyTrue) to (C), which
is obviously wrong.
|
|
The assumption that 'try' nodes were only used to wrap entire guards is
no longer true.
We're still swallowing warnings when the handler returns successfully.
Unfortunately, bind_guard/5 would need to be refactored to return a new
state in order to generate those warnings.
|
|
Dialyzer relies heavily on the assumption that the type of a literal
that is used as a pattern is the type of any value that can match that
pattern. For maps, that is not true, and it was causing bad analysis
results. A new help function dialyzer_utils:refold_pattern/1 identifies
maps in literal patterns, and unfolds and labels them, allowing them to
be properly analysed.
|
|
|
|
|
|
"DIscrepany" is replaced with "DIscrepancy" in every occurrence.
|
|
|
|
* maint:
dialyzer: Fix a bug concerning the option 'plt_remove'
|
|
[James Fish:]
Dialyzer always asserts that files and directories passed in its
options exist. Therefore it is not possible to remove a beam/module
from a PLT when the beam file no longer exists. Dialyzer should not to
check files exist on disk when removing from the PLT.
|
|
Conflicts:
lib/dialyzer/src/dialyzer_analysis_callgraph.erl
|
|
* Comment in dialyzer_analysis_callgraph what the call to
dialyzer_coordinator does;
* Delegate activation request to each dialyzer_worker;
* There is no reason for the dialyzer_coordinator to request
activation on behalf of the workers: let each worker request its
own activation as it leads to more consistent dialyzer_worker
module (activation is request as soon as status running is hit -
reguardless of mode) and it reduces lines of code.
* Clarify types in coordinator and worker e.g. make opaque and make
type more strict.
|
|
Also clarify in which modes the states `updating` and `waiting` can
happen in the loop.
|
|
|
|
Superfluous usage of insert_temp_exported_types had been in since
6452b57. (Change in commit 8a3ea1f module dialyzer_analysis_callgraph
is a correct simplification and is not relevant.)
|
|
... in order to reduce size of module dialyzer_callgraph, down from
~850 to ~750 lines.
|
|
|
|
|
|
|
|
|
|
If a behaviour module contains an non-exported function with the same name as
one of the behaviour's callbacks, the callback info was inadvertently deleted
from the PLT as the dialyzer_plt:delete_list/2 function was cleaning up the
callback table. This bug was reported by Brujo Benavides.
Fixes ERL-72 bug report.
|
|
|
|
Dialyzer used to report unknown behaviours in the same way as unknown
functions and types. This functionality has been removed in d101155, but
some code remained.
|
|
|
|
|
|
|
|
|
|
Record field types have been modified due to commit 8ce35b2:
"Take out automatic insertion of 'undefined' from typed record fields".
|
|
* sverk/hipe-fix-literal-crc:
erts,hipe,dialyzer: Fix hipe checkum of target runtime system
erts: Change THE_NON_VALUE to not be hard coded in hipe compiler
OTP-12962
OTP-12963
OTP-12964
|
|
Main problem:
A faulty HIPE_LITERAL_CRC was not detected by the loader.
Strangeness #1:
Dialyzer should ask the hipe compiler about the target checksum,
not an internal bif.
Strangeness #2:
The HIPE_SYSTEM_CRC checksum was based on the HIPE_LITERALS_CRC
checksum.
Solution:
New HIPE_ERTS_CHECKSUM which is an bxor of the two (now independent)
HIPE_LITERALS_CRC and HIPE_SYSTEM_CRC.
HIPE_LITERALS_CRC represents values that are assumed to stay constant
for different VM configurations of the same arch, and are therefor
hard coded into the hipe compiler.
HIPE_SYSTEM_CRC represents values that may differ between VM variants.
By default the hipe compiler asks the running VM for this checksum,
in order to create beam files for the same running VM.
The hipe compiler can be configured (with "make XCOMP=yes ...") to
create beam files for another VM variant, in which case HIPE_SYSTEM_CRC
is also hard coded.
ToDo:
Treat all erts properties the same. Either ask the running VM or hard
coded into hipe (if XCOMP=yes). This will simplify and reduce the risk
of dangerous mismatches. One concern might be the added overhead
from more frequent calls to hipe_bifs:get_rts_param.
|
|
|
|
Add more information about the caller of t_from_form(). Instead of
just the module, also provide name of the type, spec, or record where
the type form resides.
|
|
|
|
OTP-12845
* bruce/change-license:
fix errors caused by changed line numbers
Change license text to APLv2
|
|
|
|
|
|
Opaque types need to be expanded before record field types, otherwise
any() could be used for opaque types.
|
|
Remove what it seems redundant checks.
|
|
The check that a modified type of a field is a subtype of the declared
type has been moved outside of the expansion of forms to avoid loops.
|
|
* legoscia/dialyzer/cache-hipe-binaries/OTP-12779:
Dialyzer to cache results of HiPE compilation
Change hipe_bifs:system_crc/1 to hipe_bifs:system_crc/0
|
|
Cache the results of native compilation in
$XDG_CACHE_HOME/dialyzer_hipe_cache. This can reduce the startup time
significantly.
If XDG_CACHE_HOME is unset, it defaults to $HOME/.cache.
See the XDG Base Directory spec for more details:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html
Under that directory, create a subdirectory called
ARCH-VERSION-CHECKSUM, where ARCH is the HiPE architecture, VERSION is
the HiPE version number, and CHECKSUM is the return value of
hipe_bifs:system_crc/0.
Caching can be disabled by specifying --no_native_cache on the command
line.
|
|
Applications that use the new erl_anno module are depending on STDLIB 2.5.
Note that CosNotification, Megaco, SNMP, Xmerl, and Parsetools use the
erl_anno module via the Yecc parsers only (the header file in
lib/parsetools/include/yeccpre.hrl calls the erl_anno module).
HiPE does not call the erl_anno module, but uses an exported type.
We have chosen to make HiPE dependent on the erl_anno module.
|
|
* Mention the option 'check_plt' among gui() options.
* No longer check a PLT twice when the analysis type is 'plt_check'.
* No longer raise a case_clause error when checking a PLT finds warnings.
Thanks to James Fish.
|