Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

optimize int128.d#3671

Merged
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:int128-2
Jan 16, 2022
Merged

optimize int128.d#3671
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:int128-2

Conversation

@WalterBright
Copy link
Copy Markdown
Member

@ibuclaw 's suggestions from #3663

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + druntime#3671"

@WalterBright WalterBright force-pushed the int128-2 branch 2 times, most recently from 8872697 to 562ac6b Compare January 15, 2022 20:49
{
return inc(com(c)); // ~c + 1
if (c.lo == 0)
c.hi = -c.hi;
Copy link
Copy Markdown
Member

@ibuclaw ibuclaw Jan 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To properly validate neg, please add the following test:

    const Cm10_0 = Cent(0, -10);
    const Cm10_1 = Cent(-1, ~10);
    const Cm10_3 = Cent(-3, ~10);

    assert(neg(C10_0) == Cm10_0);
    assert(neg(C10_1) == Cm10_1);
    assert(neg(C10_3) == Cm10_3);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@dlang-bot dlang-bot merged commit 55be6b1 into dlang:master Jan 16, 2022
@WalterBright WalterBright deleted the int128-2 branch January 16, 2022 09:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants