-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Truffle] Add ImplicitCast from int to long.
* Allows to remove all the (int,long) and (long,int) useless overrides. This works for most cases, either because they were converting to long anyway or they were using BigInteger.valueOf(long) which has no int equivalent. * We can also remove (BigInteger,int) and (int,BigInteger) if there is a corresponding (BigInteger,long) and (long,BigInteger) since these operations will need to cast the primitive to a BigInteger. * We keep the (int,double) and (double,int) specializations since often they convert the int to a double and that is likely faster than a long to a double (plus the possible int->long). * We also have some additional specializations for binary ops on int that cannot exceed the range of long (+,-,*) and therefore need no overflow check.
- Loading branch information
Showing
6 changed files
with
29 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.