[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Floating-point constant folding in Emacs byte compiler
From: |
Pip Cet |
Subject: |
Re: Floating-point constant folding in Emacs byte compiler |
Date: |
Mon, 26 Mar 2018 18:23:15 +0000 |
Well, right now the byte code (or at least the constant vector) does
depend on the machine on which the code was byte-compiled, but it's
also read differently: if I understand things correctly, large
integers in decimal notation are automatically converted to floats,
while large hex constants signal an overflow error. I believe the
former case applies to the read syntax for byte-compiled functions.
But is this really a problem for any actual code? Good code shouldn't
depend on more than the 30 bits Emacs guarantees, and IMHO it
shouldn't distinguish between integers and their floating-point
representations. In other words, I think we should specify less
behavior for our numbers, not more, and keep the byte compiler simple.
If code is broken for any of 30-bit integers, 62-bit integers, 32-bit
integers, 48-bit integers, integers-as-IEEE-doubles, or bignums, or
any combination of two of those for compilation and reading/running
bytecode, that's a bug which makes it harder to play around with Emacs
internals.
Re: Floating-point constant folding in Emacs byte compiler, Pip Cet, 2018/03/23
- Re: Floating-point constant folding in Emacs byte compiler, Eli Zaretskii, 2018/03/24
- Re: Floating-point constant folding in Emacs byte compiler, Robert Pluim, 2018/03/26
- Re: Floating-point constant folding in Emacs byte compiler, Eli Zaretskii, 2018/03/26
- Re: Floating-point constant folding in Emacs byte compiler, Robert Pluim, 2018/03/26
- Re: Floating-point constant folding in Emacs byte compiler, Eli Zaretskii, 2018/03/26
- Re: Floating-point constant folding in Emacs byte compiler,
Pip Cet <=
- Re: Floating-point constant folding in Emacs byte compiler, Eli Zaretskii, 2018/03/26
- Re: Floating-point constant folding in Emacs byte compiler, Paul Eggert, 2018/03/26
- Re: Floating-point constant folding in Emacs byte compiler, Paul Eggert, 2018/03/27
- Re: Floating-point constant folding in Emacs byte compiler, Pip Cet, 2018/03/30
- Re: Floating-point constant folding in Emacs byte compiler, Noam Postavsky, 2018/03/30
- Re: Floating-point constant folding in Emacs byte compiler, Paul Eggert, 2018/03/30
Re: Floating-point constant folding in Emacs byte compiler, Stefan Monnier, 2018/03/26
Re: Floating-point constant folding in Emacs byte compiler, Eli Zaretskii, 2018/03/26
Re: Floating-point constant folding in Emacs byte compiler, Paul Eggert, 2018/03/26