diff options
author | Hans Boehm <hboehm@google.com> | 2020-06-11 15:45:22 -0700 |
---|---|---|
committer | Hans Boehm <hboehm@google.com> | 2020-07-23 14:12:34 -0700 |
commit | 7cec0bba9abb199fe4086035748e9cce401cbbb6 (patch) | |
tree | 19592428a461519b83b867fc62e40606e4d99c33 | |
parent | e1c169c983b104ba683d81fed0f10b58522f3da4 (diff) |
API and boot image updates to import RI BigInteger
This reorders methods, omits a redundant "implements" spec, and adds
<x>ValueExact() methods, which are in OpenJDK 8, but hadn't been
implemented on Android.
Also update the boot image profile to compile BigInteger-required
methods that used to be native. Some of these must be compiled to
avoid ART test timeouts.
Bug: 136887041
Bug: 119491938
Bug: 28214673
Bug: 28251030
Bug: 2950143
Test: AOSP Boots. Ran some manual Calculator tests on Cuttlefish.
Change-Id: Idd72ec6a6fd54ed4ad96a82b26840b41a3882678
-rw-r--r-- | api/current.txt | 16 | ||||
-rw-r--r-- | config/boot-image-profile.txt | 29 | ||||
-rw-r--r-- | non-updatable-api/current.txt | 16 |
3 files changed, 49 insertions, 12 deletions
diff --git a/api/current.txt b/api/current.txt index 8dd7af81315b..3f029a512dff 100644 --- a/api/current.txt +++ b/api/current.txt @@ -63046,7 +63046,7 @@ package java.lang.reflect { package java.math { - public class BigDecimal extends java.lang.Number implements java.lang.Comparable<java.math.BigDecimal> java.io.Serializable { + public class BigDecimal extends java.lang.Number implements java.lang.Comparable<java.math.BigDecimal> { ctor public BigDecimal(char[], int, int); ctor public BigDecimal(char[], int, int, java.math.MathContext); ctor public BigDecimal(char[]); @@ -63133,19 +63133,20 @@ package java.math { field public static final java.math.BigDecimal ZERO; } - public class BigInteger extends java.lang.Number implements java.lang.Comparable<java.math.BigInteger> java.io.Serializable { + public class BigInteger extends java.lang.Number implements java.lang.Comparable<java.math.BigInteger> { + ctor public BigInteger(byte[]); + ctor public BigInteger(int, byte[]); + ctor public BigInteger(@NonNull String, int); + ctor public BigInteger(@NonNull String); ctor public BigInteger(int, @NonNull java.util.Random); ctor public BigInteger(int, int, @NonNull java.util.Random); - ctor public BigInteger(@NonNull String); - ctor public BigInteger(@NonNull String, int); - ctor public BigInteger(int, byte[]); - ctor public BigInteger(byte[]); method @NonNull public java.math.BigInteger abs(); method @NonNull public java.math.BigInteger add(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger and(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger andNot(@NonNull java.math.BigInteger); method public int bitCount(); method public int bitLength(); + method public byte byteValueExact(); method @NonNull public java.math.BigInteger clearBit(int); method public int compareTo(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger divide(@NonNull java.math.BigInteger); @@ -63156,8 +63157,10 @@ package java.math { method @NonNull public java.math.BigInteger gcd(@NonNull java.math.BigInteger); method public int getLowestSetBit(); method public int intValue(); + method public int intValueExact(); method public boolean isProbablePrime(int); method public long longValue(); + method public long longValueExact(); method @NonNull public java.math.BigInteger max(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger min(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger mod(@NonNull java.math.BigInteger); @@ -63174,6 +63177,7 @@ package java.math { method @NonNull public java.math.BigInteger setBit(int); method @NonNull public java.math.BigInteger shiftLeft(int); method @NonNull public java.math.BigInteger shiftRight(int); + method public short shortValueExact(); method public int signum(); method @NonNull public java.math.BigInteger subtract(@NonNull java.math.BigInteger); method public boolean testBit(int); diff --git a/config/boot-image-profile.txt b/config/boot-image-profile.txt index 773942c8b753..1eb7c066c942 100644 --- a/config/boot-image-profile.txt +++ b/config/boot-image-profile.txt @@ -27036,6 +27036,35 @@ HSPLjava/math/BigInteger;-><init>([B)V HSPLjava/math/BigInteger;->abs()Ljava/math/BigInteger; HSPLjava/math/BigInteger;->add(Ljava/math/BigInteger;)Ljava/math/BigInteger; HSPLjava/math/BigInteger;->bitLength()I +#Temporary manual additions to avoid slowing tests down too much +#Carefully positioned for clean merge +HSPLjava/math/BigInteger;->add([IJ)[I +HSPLjava/math/BigInteger;->add([I[I)[I +HSPLjava/math/BigInteger;->subtract([IJ)[I +HSPLjava/math/BigInteger;->subtract([I[I)[I +HSPLjava/math/BigInteger;->jacobiSymbol(ILjava/math/BigInteger;)I +HSPLjava/math/BigInteger;->lucasLehmerSequence(ILjava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger; +HSPLjava/math/BigInteger;->multiplyToLen([II[II[I)[I +HSPLjava/math/MutableBigInteger;->add(Ljava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->addShifted(Ljava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->subtract(Ljava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->difference(Ljava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->divideKnuth(Ljava/math/MutableBigInteger;Ljava/math/MutableBigInteger;Z)Ljava/math/MutableBigInteger; +HSPLjava/math/MutableBigInteger;->divideMagnitude(Ljava/math/MutableBigInteger;Ljava/math/MutableBigInteger;Z)Ljava/math/MutableBigInteger; +HSPLjava/math/MutableBigInteger;->divideLongMagnitude(JLjava/math/MutableBigInteger;)Ljava/math/MutableBigInteger; +HSPLjava/math/MutableBigInteger;->divideOneWord(ILjava/math/MutableBigInteger;)I +HSPLjava/math/MutableBigInteger;->divadd([I[II)I +HSPLjava/math/MutableBigInteger;->mulsub([I[IIII)I +HSPLjava/math/MutableBigInteger;->mulsubBorrow([I[IIII)I +HSPLjava/math/MutableBigInteger;->copyAndShift([III[III)V +HSPLjava/math/MutableBigInteger;->multiply(Ljava/math/MutableBigInteger;Ljava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->mul(ILjava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->multiply(ILjava/math/MutableBigInteger;)V +HSPLjava/math/MutableBigInteger;->primitiveRightShift(I)I +HSPLjava/math/MutableBigInteger;->primitiveLeftShift(I)I +HSPLjava/math/MutableBigInteger;->binaryGCD(Ljava/math/MutableBigInteger;)Ljava/math/MutableBigInteger; +HSPLjava/math/MutableBigInteger;->binaryGCD(II)I +#End of maual additions HSPLjava/math/BigInteger;->compareTo(Ljava/math/BigInteger;)I HSPLjava/math/BigInteger;->divide(Ljava/math/BigInteger;)Ljava/math/BigInteger; HSPLjava/math/BigInteger;->divideAndRemainder(Ljava/math/BigInteger;)[Ljava/math/BigInteger; diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt index c55eeeb50b26..c050d0322fa2 100644 --- a/non-updatable-api/current.txt +++ b/non-updatable-api/current.txt @@ -62902,7 +62902,7 @@ package java.lang.reflect { package java.math { - public class BigDecimal extends java.lang.Number implements java.lang.Comparable<java.math.BigDecimal> java.io.Serializable { + public class BigDecimal extends java.lang.Number implements java.lang.Comparable<java.math.BigDecimal> { ctor public BigDecimal(char[], int, int); ctor public BigDecimal(char[], int, int, java.math.MathContext); ctor public BigDecimal(char[]); @@ -62989,19 +62989,20 @@ package java.math { field public static final java.math.BigDecimal ZERO; } - public class BigInteger extends java.lang.Number implements java.lang.Comparable<java.math.BigInteger> java.io.Serializable { + public class BigInteger extends java.lang.Number implements java.lang.Comparable<java.math.BigInteger> { + ctor public BigInteger(byte[]); + ctor public BigInteger(int, byte[]); + ctor public BigInteger(@NonNull String, int); + ctor public BigInteger(@NonNull String); ctor public BigInteger(int, @NonNull java.util.Random); ctor public BigInteger(int, int, @NonNull java.util.Random); - ctor public BigInteger(@NonNull String); - ctor public BigInteger(@NonNull String, int); - ctor public BigInteger(int, byte[]); - ctor public BigInteger(byte[]); method @NonNull public java.math.BigInteger abs(); method @NonNull public java.math.BigInteger add(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger and(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger andNot(@NonNull java.math.BigInteger); method public int bitCount(); method public int bitLength(); + method public byte byteValueExact(); method @NonNull public java.math.BigInteger clearBit(int); method public int compareTo(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger divide(@NonNull java.math.BigInteger); @@ -63012,8 +63013,10 @@ package java.math { method @NonNull public java.math.BigInteger gcd(@NonNull java.math.BigInteger); method public int getLowestSetBit(); method public int intValue(); + method public int intValueExact(); method public boolean isProbablePrime(int); method public long longValue(); + method public long longValueExact(); method @NonNull public java.math.BigInteger max(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger min(@NonNull java.math.BigInteger); method @NonNull public java.math.BigInteger mod(@NonNull java.math.BigInteger); @@ -63030,6 +63033,7 @@ package java.math { method @NonNull public java.math.BigInteger setBit(int); method @NonNull public java.math.BigInteger shiftLeft(int); method @NonNull public java.math.BigInteger shiftRight(int); + method public short shortValueExact(); method public int signum(); method @NonNull public java.math.BigInteger subtract(@NonNull java.math.BigInteger); method public boolean testBit(int); |