diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/src/v3_core.erl | 8 | ||||
-rw-r--r-- | lib/dialyzer/src/dialyzer_utils.erl | 4 | ||||
-rw-r--r-- | lib/stdlib/src/erl_expand_records.erl | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl index 3d60992e95..83cf76f241 100644 --- a/lib/compiler/src/v3_core.erl +++ b/lib/compiler/src/v3_core.erl @@ -1724,7 +1724,7 @@ fail_clause(Pats, Anno, Arg) -> args=[Arg]}]}. annotate_tuple(A, Es, St) -> - case member(annotate_records, St#core.opts) of + case member(dialyzer, St#core.opts) of true -> %% Do not coalesce constant tuple elements. A Hack. Node = cerl:ann_c_tuple(A, [cerl:c_var(any)]), @@ -1734,7 +1734,7 @@ annotate_tuple(A, Es, St) -> end. annotate_cons(A, H, T, St) -> - case member(annotate_records, St#core.opts) of + case member(dialyzer, St#core.opts) of true -> %% Do not coalesce constant conses. A Hack. Node= cerl:ann_c_cons(A, cerl:c_var(any), cerl:c_var(any)), @@ -2261,14 +2261,14 @@ bitstr_vars(Segs, Vs) -> end, Vs, Segs). record_anno(L, St) when L >= ?REC_OFFSET -> - case member(annotate_records, St#core.opts) of + case member(dialyzer, St#core.opts) of true -> [record | lineno_anno(L - ?REC_OFFSET, St)]; false -> lineno_anno(L, St) end; record_anno(L, St) when L < -?REC_OFFSET -> - case member(annotate_records, St#core.opts) of + case member(dialyzer, St#core.opts) of true -> [record | lineno_anno(L + ?REC_OFFSET, St)]; false -> diff --git a/lib/dialyzer/src/dialyzer_utils.erl b/lib/dialyzer/src/dialyzer_utils.erl index 2eba68322b..e1bcd72c0b 100644 --- a/lib/dialyzer/src/dialyzer_utils.erl +++ b/lib/dialyzer/src/dialyzer_utils.erl @@ -402,9 +402,7 @@ sets_filter([Mod|Mods], ExpTypes) -> src_compiler_opts() -> [no_copt, to_core, binary, return_errors, no_inline, strict_record_tests, strict_record_updates, - %% The following could be coalesced into one Dialyzer specific option. - no_is_record_optimization, - annotate_records]. + dialyzer]. -spec get_module(abstract_code()) -> module(). diff --git a/lib/stdlib/src/erl_expand_records.erl b/lib/stdlib/src/erl_expand_records.erl index 42b02ade8f..c74f68647f 100644 --- a/lib/stdlib/src/erl_expand_records.erl +++ b/lib/stdlib/src/erl_expand_records.erl @@ -841,7 +841,7 @@ optimize_is_record(H0, G0, #exprec{compile=Opts}) -> [] -> {H0,G0}; Rs0 -> - case lists:member(no_is_record_optimization, Opts) of + case lists:member(dialyzer, Opts) of % no_is_record_optimization true -> {H0,G0}; false -> @@ -968,7 +968,7 @@ neg_line(L) -> erl_parse:set_line(L, fun(Line) -> -abs(Line) end). record_offset(L, St) -> - case lists:member(annotate_records, St#exprec.compile) of + case lists:member(dialyzer, St#exprec.compile) of true when L >= 0 -> L+?REC_OFFSET; true when L < 0 -> L-?REC_OFFSET; false -> L |