AArch64-specific workaround: int::to_i32() seems to be flawed#4716
AArch64-specific workaround: int::to_i32() seems to be flawed#4716akosthekiss wants to merge 10 commits intoservo:rustup_20150109from
int::to_i32() seems to be flawed#4716Conversation
…u8-c_char Fix script: use `c_char` instead of `i8`
In the call chain `Au::from_px(int)` -> `Au::from::<int>(int)` -> `int::to_i32()`, the last item seems to be flawed and returns `None` for valid arguments as well (e.g., for 16*60=960). The error seems to stem from Rust, and for now, it can be fixed in Servo only with a workaround. Casting the argument of `from_px` to from `int` to `i32` changes the call chain (-> `Au::from::<i32>(i32)` -> `i32::to_i32()`) so that it works correctly.
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @kmcallister (or someone else) soon. |
|
FYI: an excerpt from the AArch64 disassembly of The |
|
Withdrawing this request: it seems possible to work around the rustc bug with no modification required on Servo side. |
In the call chain
Au::from_px(int)->Au::from::<int>(int)->int::to_i32(),the last item seems to be flawed and returns
Nonefor valid arguments as well(e.g., for 16*60=960). The error seems to stem from Rust, and for now, it can be
fixed in Servo only with a workaround. Casting the argument of
from_pxto frominttoi32changes the call chain (->Au::from::<i32>(i32)->i32::to_i32()) so that it works correctly.