Related articles |
---|
[16 earlier articles] |
Re: How to implement dynamic typing? gneuner2@comcast.net (George Neuner) (2010-04-13) |
Re: How to implement dynamic typing? bartc@freeuk.com (bartc) (2010-04-14) |
Re: How to implement dynamic typing? dot@dotat.at (Tony Finch) (2010-04-14) |
Re: How to implement dynamic typing? cr88192@hotmail.com (BGB / cr88192) (2010-04-16) |
Re: How to implement dynamic typing? gneuner2@comcast.net (George Neuner) (2010-04-18) |
Re: How to implement dynamic typing? bartc@freeuk.com (bartc) (2010-04-18) |
Re: How to implement dynamic typing? gneuner2@comcast.net (George Neuner) (2010-04-20) |
Re: How to implement dynamic typing? mikelu-1004cc@mike.de (Mike Pall) (2010-04-21) |
Re: How to implement dynamic typing? bartc@freeuk.com (bartc) (2010-04-21) |
Re: How to implement dynamic typing? gneuner2@comcast.net (George Neuner) (2010-04-22) |
Re: How to implement dynamic typing? gneuner2@comcast.net (George Neuner) (2010-04-23) |
Re: How to implement dynamic typing? cr88192@hotmail.com (BGB) (2010-04-23) |
Re: How to implement dynamic typing? bartc@freeuk.com (bartc) (2010-04-24) |
[2 later articles] |
From: | George Neuner <gneuner2@comcast.net> |
Newsgroups: | comp.compilers |
Date: | Tue, 20 Apr 2010 17:13:16 -0400 |
Organization: | A noiseless patient Spider |
References: | 10-04-009 10-04-028 10-04-031 10-04-036 10-04-038 |
Keywords: | types |
Posted-Date: | 20 Apr 2010 19:10:08 EDT |
On 14 Apr 2010 17:55:11 +0100 (BST), Tony Finch <dot@dotat.at> wrote:
>George Neuner <gneuner2@comcast.net> wrote:
>>
>LuaJIT takes an interesting approach. Its only numeric type is the
>double precision floating point number. It uses different kinds of NAN
>as tags for the other types, with the pointer embedded in the
>mantissa.
>
>http://article.gmane.org/gmane.comp.lang.lua.general/44823
>
>Regarding typed word-sized pointers, see for instance
>http://www.haskell.org/~simonmar/papers/ptr-tagging.pdf
That is interesting. It does, however, prevent loading tagged values
directly as doubles if the CPU might throw an exception on a NAN. Also
the IEEE storage format for doubles leaves the tag in the middle of
the first word (the sign bit is first - NANs are encoded in the
exponent). That makes tag checking/extraction cumbersome on a 32-bit
machine.
George
Return to the
comp.compilers page.
Search the
comp.compilers archives again.