diff options
author | Björn Gustavsson <[email protected]> | 2015-04-17 12:54:48 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-22 10:14:55 +0200 |
commit | f5298679670260be1ea2caba212d20c528701455 (patch) | |
tree | 5973c1b9e81e9e3d26054b4294e5215194ec8547 | |
parent | 93ad33ddcdceb201239f9c5133f2c51769006a2a (diff) | |
download | otp-f5298679670260be1ea2caba212d20c528701455.tar.gz otp-f5298679670260be1ea2caba212d20c528701455.tar.bz2 otp-f5298679670260be1ea2caba212d20c528701455.zip |
beam_asm: Eliminate unnecessary use of iolist_to_binary/1
-rw-r--r-- | lib/compiler/src/beam_asm.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl index f8cf178d2e..084686def7 100644 --- a/lib/compiler/src/beam_asm.erl +++ b/lib/compiler/src/beam_asm.erl @@ -132,10 +132,10 @@ build_file(Code, Attr, Dict, NumLabels, NumFuncs, Abst, SourceFile, Opts) -> LiteralChunk = case beam_dict:literal_table(Dict) of {0,[]} -> []; {NumLiterals,LitTab0} -> - LitTab1 = iolist_to_binary(LitTab0), - LitTab2 = <<NumLiterals:32,LitTab1/binary>>, - LitTab = iolist_to_binary(zlib:compress(LitTab2)), - chunk(<<"LitT">>, <<(byte_size(LitTab2)):32>>, LitTab) + LitTab1 = [<<NumLiterals:32>>,LitTab0], + LitTab = zlib:compress(LitTab1), + chunk(<<"LitT">>, <<(iolist_size(LitTab1)):32>>, + LitTab) end, %% Create the line chunk. |