digitalmars.D.bugs - [Issue 5703] New: std.intrinsic. and core.bitop.bsf, bsr and bswap should be CTFE-able
- d-bugmail puremagic.com (27/27) Mar 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5703
- d-bugmail puremagic.com (8/8) Mar 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5703
- d-bugmail puremagic.com (11/12) Mar 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5703
- d-bugmail puremagic.com (9/14) Mar 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5703
- d-bugmail puremagic.com (12/12) Oct 08 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5703
http://d.puremagic.com/issues/show_bug.cgi?id=5703 Summary: std.intrinsic. and core.bitop.bsf, bsr and bswap should be CTFE-able Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody puremagic.com ReportedBy: kennytm gmail.com import core.bitop; enum x = bsf(0b111100); enum y = bsr(0b111100); enum z = bswap(0b111100); static assert(x == 2); static assert(y == 5); static assert(z == 0x3C000000); The three functions bsr, bsf and bswap are pure nothrow, but cannot be used in CTFE because there is no source code. These functions should be rewritten in D like bitswap and popcnt. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5703 kennytm gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5703 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.ccThese functions should be rewritten in D like bitswap and popcnt.I think they aren't functions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5703They appear to be functions, and can easily implemented as functions too. If they are special-cased in the compiler, I see no reason they can't be recognized in CTFE as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------These functions should be rewritten in D like bitswap and popcnt.I think they aren't functions.
Mar 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5703 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED 17:54:33 PDT --- https://github.com/D-Programming-Language/dmd/commit/f8b88759dd1a27ec983eb9e439da2a45efce239c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2011