aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2013-01-28 10:51:11 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2013-01-31 11:11:35 +0100
commit9cfd4261240fffc51ca5aa7d1df5a29a30f42a38 (patch)
tree90ef3cc303a0b02bee31b954f3e02542c60bf2ad /erts
parent68b804f34d4ec420d86953e3f519179a40fbee8f (diff)
downloadotp-9cfd4261240fffc51ca5aa7d1df5a29a30f42a38.tar.gz
otp-9cfd4261240fffc51ca5aa7d1df5a29a30f42a38.tar.bz2
otp-9cfd4261240fffc51ca5aa7d1df5a29a30f42a38.zip
compiler: Use the literal pool for floating point constants
The BEAM loader will put floating point constants into the literal pools for the module, but it will not check for duplicates. We can do much better by having the compiler use the literal pool for floating point constants.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/beam_load.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index f57fa2bfbb..81c1ea749a 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -1853,7 +1853,10 @@ load_code(LoaderState* stp)
unsigned tag;
switch (last_op->a[arg].val) {
- case 0: /* Floating point number */
+ case 0:
+ /* Floating point number.
+ * Not generated by the compiler in R16B and later.
+ */
{
Eterm* hp;
/* XXX:PaN - Halfword should use ARCH_64 variant instead */