diff options
author | Hans Bolinder <[email protected]> | 2017-01-13 13:12:54 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-02-03 08:58:00 +0100 |
commit | 5cd1994b89faa27657e2b0bb7ef026124acdff95 (patch) | |
tree | 057d6ed6e57be903e225ab80e018db4bd6d3f1e8 /lib/dialyzer/src/dialyzer_plt.erl | |
parent | cdeca7938c9a2cbad2575065aca3f79e2a16addd (diff) | |
download | otp-5cd1994b89faa27657e2b0bb7ef026124acdff95.tar.gz otp-5cd1994b89faa27657e2b0bb7ef026124acdff95.tar.bz2 otp-5cd1994b89faa27657e2b0bb7ef026124acdff95.zip |
dialyzer: Do not keep the code server's type info on the heap
The table used during translation of forms to types used to be a
dictionary of the type info (-type(), -opaque(), and -record()) for
all modules. Now it is reduced to the modules that are needed to
handle references to types in other modules.
The PLT:s type info is still kept on the heap.
Diffstat (limited to 'lib/dialyzer/src/dialyzer_plt.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_plt.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl index 37c22fef48..1bf30cf83b 100644 --- a/lib/dialyzer/src/dialyzer_plt.erl +++ b/lib/dialyzer/src/dialyzer_plt.erl @@ -32,6 +32,7 @@ from_file/1, get_default_plt/0, get_types/1, + get_module_types/2, get_exported_types/1, %% insert/3, insert_list/2, @@ -199,6 +200,12 @@ insert_exported_types(PLT, Set) -> get_types(#plt{types = Types}) -> Types. +-spec get_module_types(plt(), atom()) -> + 'none' | {'value', erl_types:type_table()}. + +get_module_types(#plt{types = Types}, M) when is_atom(M) -> + table_lookup(Types, M). + -spec get_exported_types(plt()) -> sets:set(). get_exported_types(#plt{exported_types = ExpTypes}) -> |