[erlang-patches] Serge's ei float patch
Tue Jun 1 15:16:21 CEST 2010
2010/6/1 Björn-Egil Dahlberg <>:
> On 2010-06-01 09:06, Steve Vinoski wrote:
>> I've pushed an amended commit to github that I believe addresses all
>> your suggestions:
>> git fetch git://github.com/vinoski/otp.git serge_new_float_ext
>> Thanks to your feedback, I found a number of other places that needed
>> attention as part of this patch. If you could take another careful
>> look at the new changes, that would be good.
> Oops. I forgot something. (And yet again erl_interface is faced with a
> problem). ei_get_type exposes the internal representation (external format)
> of types. This is a problem. Earlier implementation had its own types ...
> which seemingly was a bad idea ...
> Angels are crying for suggesting this but, what do you think of letting
> get_type return ERL_FLOAT_EXT for both ERL_FLOAT_EXT and NEW_FLOAT_EXT?
> My aim is to remove the necessity for changing original source code
> dependent on erl_interface, if that is at all possible.
> What do you think?
I think you're right -- I woke up this morning thinking exactly the
same thing. The erl_interface code should accept and produce
ERL_FLOAT_EXT, and accept but not produce NEW_FLOAT_EXT. I'll make
> Hmm, actually this is somewhat more serious then I first thought. I need to
> talk it over with my team.
Another concern is term_to_binary, which for backwards compatibility
has to be left using ERL_FLOAT_EXT -- this patch leaves it that way --
but binary_to_term should be able to accept NEW_FLOAT_EXT binaries
too. This way, if this patch is adopted for R14, then perhaps R16 can
switch to having term_to_binary produce NEW_FLOAT_EXT binaries by
More information about the erlang-patches