aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/main
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2012-01-16 12:30:12 +0100
committerHenrik Nord <[email protected]>2012-02-20 13:08:04 +0100
commit34f76104e4ce731f6b2e0969ade5e92e2bfddeae (patch)
treeb6e2e6758ec8877567b0bea4e6ac19fc71b62203 /lib/hipe/main
parent8d59a1fc518719c8c445d9d94b23c173c18b4438 (diff)
downloadotp-34f76104e4ce731f6b2e0969ade5e92e2bfddeae.tar.gz
otp-34f76104e4ce731f6b2e0969ade5e92e2bfddeae.tar.bz2
otp-34f76104e4ce731f6b2e0969ade5e92e2bfddeae.zip
Fix discrepancy in compile_info
The BEAM disassembler used the atom 'none' to signify the absence of a compile_info chunk in a .beam file. This clashes with the type declaration of the compile_info field of a #beam_file{} record as containing a list. Use [] to signify the absence of this chunk. This simplifies the code and avoids a dialyzer warning. For fixing a similar problem and for consistency, changed also the return type of the attributes field of the #beam_file{} record. This required a change in the beam_disasm test suite.
Diffstat (limited to 'lib/hipe/main')
-rw-r--r--lib/hipe/main/hipe.erl6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 309d847374..1be679a13f 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -574,12 +574,8 @@ file(File, Options) when is_atom(File) ->
disasm(File) ->
case beam_disasm:file(File) of
#beam_file{labeled_exports = LabeledExports,
- compile_info = CompInfo0,
+ compile_info = CompInfo,
code = BeamCode} ->
- CompInfo = case CompInfo0 of
- none -> [];
- _ -> CompInfo0
- end,
CompOpts = proplists:get_value(options, CompInfo, []),
HCompOpts = case lists:keyfind(hipe, 1, CompOpts) of
{hipe, L} when is_list(L) -> L;