Skip to content

Commit 546e69a

Browse files
authored
Merge pull request #19705 from ymanton/skip-bndchks-bigint-0.46
(0.46) Skip bounds checks in BigInteger bit{Count,Length}
2 parents 586eda4 + 3089a9a commit 546e69a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

runtime/compiler/codegen/J9RecognizedMethodsEnum.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,8 @@
839839
java_math_BigInteger_toByteArray,
840840
java_math_BigInteger_stripLeadingZeroBytes1,
841841
java_math_BigInteger_stripLeadingZeroBytes2,
842+
java_math_BigInteger_bitCount,
843+
java_math_BigInteger_bitLength,
842844

843845
java_text_NumberFormat_format,
844846

runtime/compiler/env/j9method.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,6 +2643,8 @@ void TR_ResolvedJ9Method::construct()
26432643
{x(TR::java_math_BigInteger_toByteArray, "toByteArray", "()[B")},
26442644
{x(TR::java_math_BigInteger_stripLeadingZeroBytes1, "stripLeadingZeroBytes", "([BII)[I")},
26452645
{x(TR::java_math_BigInteger_stripLeadingZeroBytes2, "stripLeadingZeroBytes", "(I[BII)[I")},
2646+
{x(TR::java_math_BigInteger_bitCount, "bitCount", "()I")},
2647+
{x(TR::java_math_BigInteger_bitLength, "bitLength", "()I")},
26462648
{ TR::unknownMethod}
26472649
};
26482650

runtime/compiler/il/J9MethodSymbol.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ static TR::RecognizedMethod canSkipBoundChecks[] =
303303
#endif // OPENJ9_BUILD
304304
TR::java_math_BigInteger_stripLeadingZeroBytes1,
305305
TR::java_math_BigInteger_stripLeadingZeroBytes2,
306+
#ifdef OPENJ9_BUILD
307+
TR::java_math_BigInteger_bitCount,
308+
TR::java_math_BigInteger_bitLength,
309+
#endif // OPENJ9_BUILD
306310
TR::java_util_HashMap_get,
307311
TR::java_util_HashMap_findNonNullKeyEntry,
308312
TR::java_util_HashMap_putImpl,

0 commit comments

Comments
 (0)