diff options
author | Kostis Sagonas <[email protected]> | 2016-05-27 11:55:12 +0200 |
---|---|---|
committer | Kostis Sagonas <[email protected]> | 2016-05-27 11:55:12 +0200 |
commit | d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7 (patch) | |
tree | a1dacdd69d192e8a4a59d4a50e1ba5adcc74bccf /lib/compiler/src/beam_disasm.erl | |
parent | 8b5f6835560195b1506ecefcc90f653d5bc14635 (diff) | |
download | otp-d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7.tar.gz otp-d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7.tar.bz2 otp-d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7.zip |
Declare the type of function entry points
This shuts off compiler warnings and will allow to enable stronger
compiler checks files that include beam_disasm.hrl in the hipe
application.
While doing that, also modified a comment in the header file and
turned a case statement into effectively an assertion: there should
not really be any beam files where functions do not have a label as
entry point, right?
Diffstat (limited to 'lib/compiler/src/beam_disasm.erl')
-rw-r--r-- | lib/compiler/src/beam_disasm.erl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl index 5badcce696..c699672db1 100644 --- a/lib/compiler/src/beam_disasm.erl +++ b/lib/compiler/src/beam_disasm.erl @@ -314,10 +314,7 @@ get_funs({LsR0,[{func_info,[{atom,M}=AtomM,{atom,F}=AtomF,ArityArg]}|Code0]}) when is_atom(M), is_atom(F) -> Arity = resolve_arg_unsigned(ArityArg), {LsR,Code,RestCode} = get_fun(Code0, []), - Entry = case Code of - [{label,[{u,E}]}|_] -> E; - _ -> undefined - end, + [{label,[{u,Entry}]}|_] = Code, [#function{name=F, arity=Arity, entry=Entry, |