diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2010-05-05 14:30:59 +0200 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2010-05-12 07:50:57 +0200 |
commit | 36ad0688fd0c9125717fa5c3e6aa46c7040956dd (patch) | |
tree | 277b116c39dda589f3077d00f1ffa52477f3aa57 /lib/compiler/src/beam_asm.erl | |
parent | dd908223cbf62adfeaefac982c4087cd35bb1805 (diff) | |
download | erlang-36ad0688fd0c9125717fa5c3e6aa46c7040956dd.tar.gz |
Remove opaque declarations from the attributes
-opaque declarations should not be retained in the attributes
(because they will be loaded along with the code and are not
useful).
While at it, filter away those Dialyzer attributes as early
as possible - in v3_kernel.
Diffstat (limited to 'lib/compiler/src/beam_asm.erl')
-rw-r--r-- | lib/compiler/src/beam_asm.erl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl index 497c4fa07b..d5ad019013 100644 --- a/lib/compiler/src/beam_asm.erl +++ b/lib/compiler/src/beam_asm.erl @@ -23,7 +23,7 @@ -export([module/4]). -export([encode/2]). --import(lists, [map/2,member/2,keymember/3,duplicate/2,filter/2]). +-import(lists, [map/2,member/2,keymember/3,duplicate/2]). -include("beam_opcodes.hrl"). module(Code, Abst, SourceFile, Opts) -> @@ -191,11 +191,7 @@ flatten_exports(Exps) -> flatten_imports(Imps) -> list_to_binary(map(fun({M,F,A}) -> <<M:32,F:32,A:32>> end, Imps)). -build_attributes(Opts, SourceFile, Attr0, Essentials) -> - Attr = filter(fun({type,_}) -> false; - ({spec,_}) -> false; - (_) -> true - end, Attr0), +build_attributes(Opts, SourceFile, Attr, Essentials) -> Misc = case member(slim, Opts) of false -> {{Y,Mo,D},{H,Mi,S}} = erlang:universaltime(), |