diff options
author | Björn Gustavsson <[email protected]> | 2015-04-20 14:40:05 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-22 10:41:10 +0200 |
commit | 2ff88fe3687c4728e58cf7ac7e008ef7c5be1320 (patch) | |
tree | 03baf7a3157bc27fc3254dc4ea468f1f1c51358a /lib | |
parent | 67acde7a3522c651982a6789c749aaf73313e913 (diff) | |
download | otp-2ff88fe3687c4728e58cf7ac7e008ef7c5be1320.tar.gz otp-2ff88fe3687c4728e58cf7ac7e008ef7c5be1320.tar.bz2 otp-2ff88fe3687c4728e58cf7ac7e008ef7c5be1320.zip |
sys_pre_expand: Remove unused fields in #expand{} record
The compile, bitdefault, and bittypes records are not really used
in the #expand{} record.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/src/sys_pre_expand.erl | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl index f99307c865..6cc849a9d5 100644 --- a/lib/compiler/src/sys_pre_expand.erl +++ b/lib/compiler/src/sys_pre_expand.erl @@ -38,7 +38,6 @@ -record(expand, {module=[], %Module name exports=[], %Exports imports=[], %Imports - compile=[], %Compile flags attributes=[], %Attributes callbacks=[], %Callbacks optional_callbacks=[] :: [fa()], %Optional callbacks @@ -46,9 +45,7 @@ vcount=0, %Variable counter func=[], %Current function arity=[], %Arity for current function - fcount=0, %Local fun count - bitdefault, - bittypes + fcount=0 %Local fun count }). %% module(Forms, CompileOptions) @@ -69,15 +66,12 @@ module(Fs0, Opts0) -> %% Build initial expand record. St0 = #expand{exports=PreExp, - compile=Opts, - defined=PreExp, - bitdefault = erl_bits:system_bitdefault(), - bittypes = erl_bits:system_bittypes() + defined=PreExp }, %% Expand the functions. {Tfs,St1} = forms(Fs, define_functions(Fs, St0)), %% Get the correct list of exported functions. - Exports = case member(export_all, St1#expand.compile) of + Exports = case member(export_all, Opts) of true -> gb_sets:to_list(St1#expand.defined); false -> St1#expand.exports end, @@ -85,7 +79,7 @@ module(Fs0, Opts0) -> {Ats,St3} = module_attrs(St1#expand{exports = Exports}), {Mfs,St4} = module_predef_funcs(St3), {St4#expand.module, St4#expand.exports, Ats ++ Tfs ++ Mfs, - St4#expand.compile}. + Opts}. compiler_options(Forms) -> lists:flatten([C || {attribute,_,compile,C} <- Forms]). |