From 34f76104e4ce731f6b2e0969ade5e92e2bfddeae Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Mon, 16 Jan 2012 12:30:12 +0100 Subject: 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. --- lib/compiler/test/beam_disasm_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/compiler/test/beam_disasm_SUITE.erl') diff --git a/lib/compiler/test/beam_disasm_SUITE.erl b/lib/compiler/test/beam_disasm_SUITE.erl index 44574ae64a..62afc80ca6 100644 --- a/lib/compiler/test/beam_disasm_SUITE.erl +++ b/lib/compiler/test/beam_disasm_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011. All Rights Reserved. +%% Copyright Ericsson AB 2011-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 @@ -60,6 +60,6 @@ stripped(Config) when is_list(Config) -> ?line true = is_list(Attr), ?line true = is_list(CompileInfo), ?line {ok, {tmp, _}} = beam_lib:strip(BeamName), - ?line {beam_file, tmp, _, none, none, [_|_]} = + ?line {beam_file, tmp, _, [], [], [_|_]} = beam_disasm:file(BeamName), ok. -- cgit v1.2.3