aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-12-15 09:23:13 +0100
committerBjörn Gustavsson <[email protected]>2017-01-12 12:10:12 +0100
commit2e5fcfe9dd7137ab96b3f136795cae82f111778a (patch)
tree8c0f39db4b1384aab814527b4e75d2ebeed2bf45 /lib/compiler
parentcd2734811a5fe7c891db1063484489a81c6a92b0 (diff)
downloadotp-2e5fcfe9dd7137ab96b3f136795cae82f111778a.tar.gz
otp-2e5fcfe9dd7137ab96b3f136795cae82f111778a.tar.bz2
otp-2e5fcfe9dd7137ab96b3f136795cae82f111778a.zip
beam_trim: Add types and specs
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/beam_trim.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_trim.erl b/lib/compiler/src/beam_trim.erl
index d40669083e..4da0985085 100644
--- a/lib/compiler/src/beam_trim.erl
+++ b/lib/compiler/src/beam_trim.erl
@@ -24,10 +24,13 @@
-import(lists, [reverse/1,reverse/2,splitwith/2,sort/1]).
-record(st,
- {safe, %Safe labels.
- lbl %Code at each label.
+ {safe :: gb_sets:set(beam_asm:label()), %Safe labels.
+ lbl :: beam_utils:code_index() %Code at each label.
}).
+-spec module(beam_utils:module_code(), [compile:option()]) ->
+ {'ok',beam_utils:module_code()}.
+
module({Mod,Exp,Attr,Fs0,Lc}, _Opts) ->
Fs = [function(F) || F <- Fs0],
{ok,{Mod,Exp,Attr,Fs,Lc}}.