digitalmars.D.announce - Implementing cent/ucent...
- Kai Nacke (29/29) Apr 07 2015 Hi all!
- Vladimir Panteleev (13/15) Apr 07 2015 Hi, I appreciate all the work you're doing for LDC, but isn't
- Kai Nacke (12/27) Apr 07 2015 Hi Vladimir,
- deadalnix (1/1) Apr 07 2015 Awesome !
- Daniel Murphy (4/9) Apr 07 2015 I'm happy to do the DMD backend, at least on x86_64. I don't want WANT_...
- Dominikus Dittes Scherkl (4/12) Apr 13 2015 Hurray!
- Kai Nacke (8/9) Apr 13 2015 TypeInfo for cent/ucent is now in druntime. std.traits has
- Dominikus Dittes Scherkl (7/14) Apr 14 2015 Hmm.
- Kai Nacke (7/9) Apr 14 2015 There is no postfix defined. If the value of an literal does not
Hi all! I started to work on cent/ucent support in LDC (and possible in upstream DMD). Here is the current state: 1) The pull request https://github.com/ldc-developers/ldc/pull/891/files implements cent/ucent based on the upcoming major LDC release (branch merge-2.067). It is usable but relies on GCC because it uses the __int128 data type. My next step is to implement a synthetic int128_t type to enable support on all platforms. Up to now I tested only on Linux/x86_64. 2) I already submitted some pull request for DMD, Druntime and Phobos to enable cent/ucent support. How to continue? As soon as I got it working on all compiler environment I like to create an upstream pull request. (May take some time because I am now busy with other tasks.) But: I am not going to extend the DMD backend! This has 2 consequences. First, we need to decide how to integrate the code. (Do we want to clutter the code with #if WANT_CENT as I currently do? Should we wait for DDMD?) Second, someone needs to work on the DMD backend if DMD should support cent/ucent, too. If you like to help: - clone & test - Druntime/Phobos should support cent/ucent. I already updated/created some modules but more work is needed here - add support to the DMD backend Regards, Kai
Apr 07 2015
On Tuesday, 7 April 2015 at 15:55:24 UTC, Kai Nacke wrote:I started to work on cent/ucent support in LDC (and possible in upstream DMD). Here is the current state:Hi, I appreciate all the work you're doing for LDC, but isn't ucent better implemented as a library type (e.g. as a FixNum struct for arbitrary fixed-size integers)? With the deprecation/removal of complex numbers, octal literals, and hex strings, I'm not sure if cent/ucent would pass the same inclusion requirements that those features didn't. This doesn't necessarily obsolete your work - we could remove ucent from the language specification, but still expose the backend feature in some way that FixNum could use for added efficiency. If there's already been a discussion about removing cent/ucent and I missed it, my apologies.
Apr 07 2015
On Tuesday, 7 April 2015 at 18:43:06 UTC, Vladimir Panteleev wrote:On Tuesday, 7 April 2015 at 15:55:24 UTC, Kai Nacke wrote:Hi Vladimir, for me this was a low-hanging fruit. In many cases I only had to add the special cases for max and min values. If it is not included then it is no disaster. My motivation for the implementation is - implementation of 128bit CAS - evaluation of performance of bigintnoasm with 128bit vs. 64bit on X64 Regards, KaiI started to work on cent/ucent support in LDC (and possible in upstream DMD). Here is the current state:Hi, I appreciate all the work you're doing for LDC, but isn't ucent better implemented as a library type (e.g. as a FixNum struct for arbitrary fixed-size integers)? With the deprecation/removal of complex numbers, octal literals, and hex strings, I'm not sure if cent/ucent would pass the same inclusion requirements that those features didn't. This doesn't necessarily obsolete your work - we could remove ucent from the language specification, but still expose the backend feature in some way that FixNum could use for added efficiency. If there's already been a discussion about removing cent/ucent and I missed it, my apologies.
Apr 07 2015
"Kai Nacke" wrote in message news:kxcbizohnxdtimjwlued forum.dlang.org...But: I am not going to extend the DMD backend! This has 2 consequences. First, we need to decide how to integrate the code. (Do we want to clutter the code with #if WANT_CENT as I currently do? Should we wait for DDMD?) Second, someone needs to work on the DMD backend if DMD should support cent/ucent, too.I'm happy to do the DMD backend, at least on x86_64. I don't want WANT_CENT anywhere in there, it would be better to enable it through a runtime flag in Target in a similar way to the simd types.
Apr 07 2015
On Tuesday, 7 April 2015 at 15:55:24 UTC, Kai Nacke wrote:Hi all! I started to work on cent/ucent support in LDC (and possible in upstream DMD). Here is the current state:Hurray! I missed that.If you like to help: - clone & test - Druntime/Phobos should support cent/ucent. I already updated/created some modules but more work is needed here - add support to the DMD backendI once had added cent/ucent to std/traits.d
Apr 13 2015
On Monday, 13 April 2015 at 09:00:30 UTC, Dominikus Dittes Scherkl wrote:I once had added cent/ucent to std/traits.dTypeInfo for cent/ucent is now in druntime. std.traits has cent/ucent support. I need to address some comments in std.format before it can be merged. Other modules (e.g. std.conv) still miss support. Regards, Kai
Apr 13 2015
On Monday, 13 April 2015 at 20:06:11 UTC, Kai Nacke wrote:On Monday, 13 April 2015 at 09:00:30 UTC, Dominikus Dittes Scherkl wrote:Wow, cool.I once had added cent/ucent to std/traits.dTypeInfo for cent/ucent is now in druntime. std.traits has cent/ucent support.I need to address some comments in std.format before it can be merged. Other modules (e.g. std.conv) still miss support.Hmm. By the way: are also cent/ucent literals defined? And if yes, what's the postfix for that? Was it "T"? cent.max = 170_141_183_460_469_231_731_637_303_715_884_105_727T ucent.max = 340_282_366_920_938_463_463_374_607_431_768_211_455UT
Apr 14 2015
On Tuesday, 14 April 2015 at 10:42:31 UTC, Dominikus Dittes Scherkl wrote:By the way: are also cent/ucent literals defined? And if yes, what's the postfix for that? Was it "T"?There is no postfix defined. If the value of an literal does not fit in long/ulong then the type is cent/ucent. I simply followed the rules of int/long. Regards, Kai
Apr 14 2015