diff options
author | Gustav Simonsson <[email protected]> | 2012-02-22 10:18:33 +0100 |
---|---|---|
committer | Gustav Simonsson <[email protected]> | 2012-02-22 10:18:33 +0100 |
commit | 7140a4e44d728e6b796c812cd7a50cd4cb5e0283 (patch) | |
tree | 9b3ea9134b4985e01f1dbeb40a8f4a35b1e09ecd /lib/compiler/src/beam_disasm.erl | |
parent | 3735ecf0815925950db313e56e8d2371afe2207a (diff) | |
parent | be237a6c5adfe8ea089bd8ff395316614888a768 (diff) | |
download | otp-7140a4e44d728e6b796c812cd7a50cd4cb5e0283.tar.gz otp-7140a4e44d728e6b796c812cd7a50cd4cb5e0283.tar.bz2 otp-7140a4e44d728e6b796c812cd7a50cd4cb5e0283.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/compiler/src/beam_disasm.erl')
-rw-r--r-- | lib/compiler/src/beam_disasm.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl index 7103d2390f..62bdc74cc8 100644 --- a/lib/compiler/src/beam_disasm.erl +++ b/lib/compiler/src/beam_disasm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2011. All Rights Reserved. +%% Copyright Ericsson AB 2000-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -182,10 +182,14 @@ process_chunks(F) -> Literals = beam_disasm_literals(LiteralBin), Code = beam_disasm_code(CodeBin, Atoms, mk_imports(ImportsList), StrBin, Lambdas, Literals, Module), - Attributes = optional_chunk(F, attributes), + Attributes = + case optional_chunk(F, attributes) of + none -> []; + Atts when is_list(Atts) -> Atts + end, CompInfo = case optional_chunk(F, "CInf") of - none -> none; + none -> []; CompInfoBin when is_binary(CompInfoBin) -> binary_to_term(CompInfoBin) end, @@ -198,7 +202,7 @@ process_chunks(F) -> end. %%----------------------------------------------------------------------- -%% Retrieve an optional chunk or none if the chunk doesn't exist. +%% Retrieve an optional chunk or return 'none' if the chunk doesn't exist. %%----------------------------------------------------------------------- optional_chunk(F, ChunkTag) -> |