Uh oh!
There was an error while loading. Please reload this page.
i128 and u128 support - #38482
Conversation
est31
commented
Dec 20, 2016
r? @eddyb |
rust-highfive
commented
Dec 20, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
Dec 20, 2016
@bors r+ |
bors
commented
Dec 20, 2016
📌 Commit 84fd6c3 has been approved by |
est31
commented
Dec 20, 2016
eddyb
commented
Dec 20, 2016
@bors r+ |
bors
commented
Dec 20, 2016
📌 Commit 1abfc5c has been approved by |
eddyb
commented
Dec 20, 2016
@bors p=100 (to avoid bitrotting) |
retep998
commented
Dec 20, 2016
If you push to a PR branch while the PR is closed, github won't let you reopen it. You have to reopen it first, then push the new version. |
est31
commented
Dec 20, 2016
@retep998 yes, found that out after I've already pushed it. :/ |
samueltardieu
left a comment
There was a problem hiding this comment.
I read the diff out of curiosity and was surprised by this.
| -0x0000_0000_0000_8000...0x0000_0000_0000_7fff => I16, | ||
| -0x0000_0000_8000_0000...0x0000_0000_7fff_ffff => I32, | ||
| -0x8000_0000_0000_0000...0x7fff_ffff_ffff_ffff => I64, | ||
| _ => I128 |
There was a problem hiding this comment.
Match argument is an i64 there, I128 will never be returned.
There was a problem hiding this comment.
Would it be better to actually add the "proper" case, but have the *128 case return a *64 instead, with a comment linking to the relevant issue?
| 0...0x0000_0000_0000_ffff => I16, | ||
| 0...0x0000_0000_ffff_ffff => I32, | ||
| 0...0xffff_ffff_ffff_ffff => I64, | ||
| _ => I128, |
There was a problem hiding this comment.
Match argument is an u64 there, I128 will never be returned.
bors
commented
Dec 20, 2016
⌛ Testing commit 1abfc5c with merge 764d2f6... |
bors
commented
Dec 20, 2016
💔 Test failed - auto-mac-32-opt |
alexcrichton
commented
Dec 20, 2016
via email
@bors: retry …On Tue, Dec 20, 2016 at 9:41 AM, bors ***@***.***> wrote:
💔 Test failed - auto-mac-32-opt
<https://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/11397>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38482 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95FjO7LrbLl3Ari1p96O-5GH0qgMpks5rKBNmgaJpZM4LRXRV>
.
|
alexcrichton
commented
Dec 20, 2016
@bors: r- Looking at some travis logs it looks like this doesn't compile on 32-bit maybe? I think the error is: |
bors
commented
Dec 21, 2016
☔ The latest upstream changes (presumably #38499) made this pull request unmergeable. Please resolve the merge conflicts. |
est31
commented
Dec 21, 2016
Rebased. r? @eddyb |
eddyb
commented
Dec 21, 2016
@bors r+ |
bors
commented
Dec 21, 2016
📌 Commit 5b4fe10 has been approved by |
bors
commented
Dec 21, 2016
⌛ Testing commit 5b4fe10 with merge 1602354... |
bors
commented
Dec 21, 2016
💔 Test failed - auto-win-msvc-32-opt |
est31
commented
Dec 21, 2016
Ok, this seems like another windows ABI issue with the intrinsics, this time on 32 bit. I'm trying to reproduce the issue right now. Fixing the bug is a matter of finding out what LLVM expects as ABI in this case and replicating it in Rust. |
bors
commented
Dec 31, 2016
📌 Commit 29e01af has been approved by |
bors
commented
Dec 31, 2016
i128 and u128 support Brings i128 and u128 support to nightly rust, behind a feature flag. The goal of this PR is to do the bulk of the work for 128 bit integer support. Smaller but just as tricky features needed for stabilisation like 128 bit enum discriminants are left for future PRs. Rebased version of #37900, which in turn was a rebase + improvement of #35954 . Sadly I couldn't reopen #37900 due to github. There goes my premium position in the homu queue... [plugin-breaking-change] cc #35118 (tracking issue)
bors
commented
Dec 31, 2016
☀️ Test successful - status-appveyor, status-travis |
jackpot51
commented
Dec 31, 2016
Awesome! |
est31
commented
Jan 1, 2017
wow, great!! 🎉 it was the FIRST TRYhttp://devopsreactions.tumblr.com/post/151057980189/getting-your-build-through-the-pipeline |
DirkyJerky
commented
Jan 1, 2017
This passed on the first try in 2017! (in utc + (-3)..9 ). |
We introduced the unadjusted ABI to work around wrong (buggy) ABI expectations by LLVM on Windows [1]. Therefore, it should be solely used on Windows and not on other platforms, like right now is the case. [1]: see this comment for details rust-lang#38482 (comment)
…gisa Don't use "unadjusted" ABI on non windows platforms We introduced the unadjusted ABI to work around wrong (buggy) ABI expectations by LLVM on Windows [1]. Therefore, it should be solely used on Windows and not on other platforms, like right now is the case. [1]: see this comment for details rust-lang#38482 (comment)
…gisa Don't use "unadjusted" ABI on non windows platforms We introduced the unadjusted ABI to work around wrong (buggy) ABI expectations by LLVM on Windows [1]. Therefore, it should be solely used on Windows and not on other platforms, like right now is the case. [1]: see this comment for details rust-lang#38482 (comment)
…gisa Don't use "unadjusted" ABI on non windows platforms We introduced the unadjusted ABI to work around wrong (buggy) ABI expectations by LLVM on Windows [1]. Therefore, it should be solely used on Windows and not on other platforms, like right now is the case. [1]: see this comment for details rust-lang#38482 (comment)
As discussed bigint + u8 for decimal representation also avoiding the use of generics for the most part. For now the only imaginable way to have errors in my mind is decimal mismatch. Lots to fill in here and some open questions Do we want this in a separate crate? I imagine it is possible the eth-rpc crate may ultimately depend on this functionality. I just figured out that u128 is natively available in rust on all targets as LLVM has support for it rust simply exposes that. See [this pr](rust-lang/rust#38482) from late 2016. This has been [stablized in 1.26](https://blog.rust-lang.org/2018/05/10/Rust-1.26.html). The representable range here even with a token that is using 18 decimals of precision is 19 9s. If you have 10^19 of something I think it is alright to say that you need to do two transactions. I believe that u128 represents the best combination of speed flexibility and consistency. It is very unlikely to me that any token balance will natively overflow this representation.

Brings i128 and u128 support to nightly rust, behind a feature flag. The goal of this PR is to do the bulk of the work for 128 bit integer support. Smaller but just as tricky features needed for stabilisation like 128 bit enum discriminants are left for future PRs.
Rebased version of #37900, which in turn was a rebase + improvement of #35954 . Sadly I couldn't reopen #37900 due to github. There goes my premium position in the homu queue...
[plugin-breaking-change]
cc #35118 (tracking issue)