diff options
author | Björn Gustavsson <[email protected]> | 2013-02-04 13:53:40 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-02-04 13:53:40 +0100 |
commit | 9b5dc27be0baab15d1bc8b583305205559d97668 (patch) | |
tree | e48e22712662ec4b1ef16cc6025bb7eecba089d2 /lib/compiler/src/beam_disasm.erl | |
parent | f84427d53db9843227adda945fb10ed19fc762b8 (diff) | |
parent | 819894b14db18c98ea0460cbbb28f3ad2a1d1b1b (diff) | |
download | otp-9b5dc27be0baab15d1bc8b583305205559d97668.tar.gz otp-9b5dc27be0baab15d1bc8b583305205559d97668.tar.bz2 otp-9b5dc27be0baab15d1bc8b583305205559d97668.zip |
Merge branch 'bjorn/compiler/float/OTP-10788'
* bjorn/compiler/float/OTP-10788:
beam_type: Convert integer to float at compile time
compiler: Use the literal pool for floating point constants
Diffstat (limited to 'lib/compiler/src/beam_disasm.erl')
-rw-r--r-- | lib/compiler/src/beam_disasm.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl index 62bdc74cc8..67d756c45c 100644 --- a/lib/compiler/src/beam_disasm.erl +++ b/lib/compiler/src/beam_disasm.erl @@ -512,7 +512,12 @@ decode_z_tagged(Tag,B,Bs,Literals) when (B band 16#08) =:= 0 -> decode_alloc_list(Bs, Literals); 4 -> % literal {{u,LitIndex},RestBs} = decode_arg(Bs), - {{literal,gb_trees:get(LitIndex, Literals)},RestBs}; + case gb_trees:get(LitIndex, Literals) of + Float when is_float(Float) -> + {{float,Float},RestBs}; + Literal -> + {{literal,Literal},RestBs} + end; _ -> ?exit({decode_z_tagged,{invalid_extended_tag,N}}) end; |