mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8321468: Remove StringUTF16::equals
Reviewed-by: rriggs, kvn
This commit is contained in:
parent
19e92201b4
commit
55c1446b68
14 changed files with 25 additions and 138 deletions
|
@ -17105,23 +17105,7 @@ instruct string_equalsL(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
|
||||||
ins_encode %{
|
ins_encode %{
|
||||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
||||||
__ string_equals($str1$$Register, $str2$$Register,
|
__ string_equals($str1$$Register, $str2$$Register,
|
||||||
$result$$Register, $cnt$$Register, 1);
|
$result$$Register, $cnt$$Register);
|
||||||
%}
|
|
||||||
ins_pipe(pipe_class_memory);
|
|
||||||
%}
|
|
||||||
|
|
||||||
instruct string_equalsU(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
|
|
||||||
iRegI_R0 result, rFlagsReg cr)
|
|
||||||
%{
|
|
||||||
predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
|
|
||||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
|
||||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
|
|
||||||
|
|
||||||
format %{ "String Equals $str1,$str2,$cnt -> $result" %}
|
|
||||||
ins_encode %{
|
|
||||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
|
||||||
__ string_equals($str1$$Register, $str2$$Register,
|
|
||||||
$result$$Register, $cnt$$Register, 2);
|
|
||||||
%}
|
%}
|
||||||
ins_pipe(pipe_class_memory);
|
ins_pipe(pipe_class_memory);
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -5346,28 +5346,25 @@ address MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
|
||||||
|
|
||||||
// For Strings we're passed the address of the first characters in a1
|
// For Strings we're passed the address of the first characters in a1
|
||||||
// and a2 and the length in cnt1.
|
// and a2 and the length in cnt1.
|
||||||
// elem_size is the element size in bytes: either 1 or 2.
|
|
||||||
// There are two implementations. For arrays >= 8 bytes, all
|
// There are two implementations. For arrays >= 8 bytes, all
|
||||||
// comparisons (including the final one, which may overlap) are
|
// comparisons (including the final one, which may overlap) are
|
||||||
// performed 8 bytes at a time. For strings < 8 bytes, we compare a
|
// performed 8 bytes at a time. For strings < 8 bytes, we compare a
|
||||||
// halfword, then a short, and then a byte.
|
// halfword, then a short, and then a byte.
|
||||||
|
|
||||||
void MacroAssembler::string_equals(Register a1, Register a2,
|
void MacroAssembler::string_equals(Register a1, Register a2,
|
||||||
Register result, Register cnt1, int elem_size)
|
Register result, Register cnt1)
|
||||||
{
|
{
|
||||||
Label SAME, DONE, SHORT, NEXT_WORD;
|
Label SAME, DONE, SHORT, NEXT_WORD;
|
||||||
Register tmp1 = rscratch1;
|
Register tmp1 = rscratch1;
|
||||||
Register tmp2 = rscratch2;
|
Register tmp2 = rscratch2;
|
||||||
Register cnt2 = tmp2; // cnt2 only used in array length compare
|
Register cnt2 = tmp2; // cnt2 only used in array length compare
|
||||||
|
|
||||||
assert(elem_size == 1 || elem_size == 2, "must be 2 or 1 byte");
|
|
||||||
assert_different_registers(a1, a2, result, cnt1, rscratch1, rscratch2);
|
assert_different_registers(a1, a2, result, cnt1, rscratch1, rscratch2);
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
{
|
{
|
||||||
const char kind = (elem_size == 2) ? 'U' : 'L';
|
|
||||||
char comment[64];
|
char comment[64];
|
||||||
snprintf(comment, sizeof comment, "{string_equals%c", kind);
|
snprintf(comment, sizeof comment, "{string_equalsL");
|
||||||
BLOCK_COMMENT(comment);
|
BLOCK_COMMENT(comment);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -5415,7 +5412,6 @@ void MacroAssembler::string_equals(Register a1, Register a2,
|
||||||
cbnzw(tmp1, DONE);
|
cbnzw(tmp1, DONE);
|
||||||
}
|
}
|
||||||
bind(TAIL01);
|
bind(TAIL01);
|
||||||
if (elem_size == 1) { // Only needed when comparing 1-byte elements
|
|
||||||
tbz(cnt1, 0, SAME); // 0-1 bytes left.
|
tbz(cnt1, 0, SAME); // 0-1 bytes left.
|
||||||
{
|
{
|
||||||
ldrb(tmp1, a1);
|
ldrb(tmp1, a1);
|
||||||
|
@ -5423,7 +5419,6 @@ void MacroAssembler::string_equals(Register a1, Register a2,
|
||||||
eorw(tmp1, tmp1, tmp2);
|
eorw(tmp1, tmp1, tmp2);
|
||||||
cbnzw(tmp1, DONE);
|
cbnzw(tmp1, DONE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Arrays are equal.
|
// Arrays are equal.
|
||||||
bind(SAME);
|
bind(SAME);
|
||||||
mov(result, true);
|
mov(result, true);
|
||||||
|
|
|
@ -1399,8 +1399,7 @@ public:
|
||||||
address arrays_equals(Register a1, Register a2, Register result, Register cnt1,
|
address arrays_equals(Register a1, Register a2, Register result, Register cnt1,
|
||||||
Register tmp1, Register tmp2, Register tmp3, int elem_size);
|
Register tmp1, Register tmp2, Register tmp3, int elem_size);
|
||||||
|
|
||||||
void string_equals(Register a1, Register a2, Register result, Register cnt1,
|
void string_equals(Register a1, Register a2, Register result, Register cnt1);
|
||||||
int elem_size);
|
|
||||||
|
|
||||||
void fill_words(Register base, Register cnt, Register value);
|
void fill_words(Register base, Register cnt, Register value);
|
||||||
address zero_words(Register base, uint64_t cnt);
|
address zero_words(Register base, uint64_t cnt);
|
||||||
|
|
|
@ -12318,21 +12318,6 @@ instruct string_equalsL(rarg1RegP str1, rarg2RegP str2, rarg3RegI cnt, iRegIdst
|
||||||
ins_pipe(pipe_class_default);
|
ins_pipe(pipe_class_default);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
instruct string_equalsU(rarg1RegP str1, rarg2RegP str2, rarg3RegI cnt, iRegIdst result,
|
|
||||||
iRegIdst tmp, regCTR ctr, flagsRegCR0 cr0) %{
|
|
||||||
predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
|
|
||||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
|
||||||
effect(TEMP_DEF result, USE_KILL str1, USE_KILL str2, USE_KILL cnt, TEMP tmp, KILL ctr, KILL cr0);
|
|
||||||
ins_cost(300);
|
|
||||||
format %{ "String Equals char[] $str1,$str2,$cnt -> $result \t// KILL $tmp" %}
|
|
||||||
ins_encode %{
|
|
||||||
__ array_equals(false, $str1$$Register, $str2$$Register,
|
|
||||||
$cnt$$Register, $tmp$$Register,
|
|
||||||
$result$$Register, false /* byte */);
|
|
||||||
%}
|
|
||||||
ins_pipe(pipe_class_default);
|
|
||||||
%}
|
|
||||||
|
|
||||||
instruct array_equalsB(rarg1RegP ary1, rarg2RegP ary2, iRegIdst result,
|
instruct array_equalsB(rarg1RegP ary1, rarg2RegP ary2, iRegIdst result,
|
||||||
iRegIdst tmp1, iRegIdst tmp2, regCTR ctr, flagsRegCR0 cr0, flagsRegCR0 cr1) %{
|
iRegIdst tmp1, iRegIdst tmp2, regCTR ctr, flagsRegCR0 cr0, flagsRegCR0 cr1) %{
|
||||||
predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::LL);
|
predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::LL);
|
||||||
|
|
|
@ -1358,7 +1358,6 @@ void C2_MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
|
||||||
|
|
||||||
// For Strings we're passed the address of the first characters in a1
|
// For Strings we're passed the address of the first characters in a1
|
||||||
// and a2 and the length in cnt1.
|
// and a2 and the length in cnt1.
|
||||||
// elem_size is the element size in bytes: either 1 or 2.
|
|
||||||
// There are two implementations. For arrays >= 8 bytes, all
|
// There are two implementations. For arrays >= 8 bytes, all
|
||||||
// comparisons (for hw supporting unaligned access: including the final one,
|
// comparisons (for hw supporting unaligned access: including the final one,
|
||||||
// which may overlap) are performed 8 bytes at a time.
|
// which may overlap) are performed 8 bytes at a time.
|
||||||
|
@ -1367,13 +1366,12 @@ void C2_MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
|
||||||
// halfword, then a short, and then a byte.
|
// halfword, then a short, and then a byte.
|
||||||
|
|
||||||
void C2_MacroAssembler::string_equals(Register a1, Register a2,
|
void C2_MacroAssembler::string_equals(Register a1, Register a2,
|
||||||
Register result, Register cnt1, int elem_size)
|
Register result, Register cnt1)
|
||||||
{
|
{
|
||||||
Label SAME, DONE, SHORT, NEXT_WORD;
|
Label SAME, DONE, SHORT, NEXT_WORD;
|
||||||
Register tmp1 = t0;
|
Register tmp1 = t0;
|
||||||
Register tmp2 = t1;
|
Register tmp2 = t1;
|
||||||
|
|
||||||
assert(elem_size == 1 || elem_size == 2, "must be 2 or 1 byte");
|
|
||||||
assert_different_registers(a1, a2, result, cnt1, tmp1, tmp2);
|
assert_different_registers(a1, a2, result, cnt1, tmp1, tmp2);
|
||||||
|
|
||||||
BLOCK_COMMENT("string_equals {");
|
BLOCK_COMMENT("string_equals {");
|
||||||
|
@ -1439,7 +1437,6 @@ void C2_MacroAssembler::string_equals(Register a1, Register a2,
|
||||||
}
|
}
|
||||||
|
|
||||||
bind(TAIL01);
|
bind(TAIL01);
|
||||||
if (elem_size == 1) { // Only needed when comparing 1-byte elements
|
|
||||||
// 0-1 bytes left.
|
// 0-1 bytes left.
|
||||||
test_bit(tmp1, cnt1, 0);
|
test_bit(tmp1, cnt1, 0);
|
||||||
beqz(tmp1, SAME);
|
beqz(tmp1, SAME);
|
||||||
|
@ -1448,7 +1445,6 @@ void C2_MacroAssembler::string_equals(Register a1, Register a2,
|
||||||
lbu(tmp2, Address(a2, 0));
|
lbu(tmp2, Address(a2, 0));
|
||||||
bne(tmp1, tmp2, DONE);
|
bne(tmp1, tmp2, DONE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Arrays are equal.
|
// Arrays are equal.
|
||||||
bind(SAME);
|
bind(SAME);
|
||||||
|
@ -1985,7 +1981,7 @@ void C2_MacroAssembler::element_compare(Register a1, Register a2, Register resul
|
||||||
mv(result, true);
|
mv(result, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void C2_MacroAssembler::string_equals_v(Register a1, Register a2, Register result, Register cnt, int elem_size) {
|
void C2_MacroAssembler::string_equals_v(Register a1, Register a2, Register result, Register cnt) {
|
||||||
Label DONE;
|
Label DONE;
|
||||||
Register tmp1 = t0;
|
Register tmp1 = t0;
|
||||||
Register tmp2 = t1;
|
Register tmp2 = t1;
|
||||||
|
@ -1994,11 +1990,7 @@ void C2_MacroAssembler::string_equals_v(Register a1, Register a2, Register resul
|
||||||
|
|
||||||
mv(result, false);
|
mv(result, false);
|
||||||
|
|
||||||
if (elem_size == 2) {
|
element_compare(a1, a2, result, cnt, tmp1, tmp2, v2, v4, v2, true, DONE);
|
||||||
srli(cnt, cnt, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
element_compare(a1, a2, result, cnt, tmp1, tmp2, v2, v4, v2, elem_size == 1, DONE);
|
|
||||||
|
|
||||||
bind(DONE);
|
bind(DONE);
|
||||||
BLOCK_COMMENT("} string_equals_v");
|
BLOCK_COMMENT("} string_equals_v");
|
||||||
|
|
|
@ -92,8 +92,7 @@
|
||||||
void arrays_hashcode_elload(Register dst, Address src, BasicType eltype);
|
void arrays_hashcode_elload(Register dst, Address src, BasicType eltype);
|
||||||
|
|
||||||
void string_equals(Register r1, Register r2,
|
void string_equals(Register r1, Register r2,
|
||||||
Register result, Register cnt1,
|
Register result, Register cnt1);
|
||||||
int elem_size);
|
|
||||||
|
|
||||||
// refer to conditional_branches and float_conditional_branches
|
// refer to conditional_branches and float_conditional_branches
|
||||||
static const int bool_test_bits = 3;
|
static const int bool_test_bits = 3;
|
||||||
|
@ -188,8 +187,7 @@
|
||||||
void expand_bits_l_v(Register dst, Register src, Register mask);
|
void expand_bits_l_v(Register dst, Register src, Register mask);
|
||||||
|
|
||||||
void string_equals_v(Register r1, Register r2,
|
void string_equals_v(Register r1, Register r2,
|
||||||
Register result, Register cnt1,
|
Register result, Register cnt1);
|
||||||
int elem_size);
|
|
||||||
|
|
||||||
void arrays_equals_v(Register r1, Register r2,
|
void arrays_equals_v(Register r1, Register r2,
|
||||||
Register result, Register cnt1,
|
Register result, Register cnt1,
|
||||||
|
|
|
@ -10375,23 +10375,7 @@ instruct string_equalsL(iRegP_R11 str1, iRegP_R13 str2, iRegI_R14 cnt,
|
||||||
ins_encode %{
|
ins_encode %{
|
||||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
||||||
__ string_equals($str1$$Register, $str2$$Register,
|
__ string_equals($str1$$Register, $str2$$Register,
|
||||||
$result$$Register, $cnt$$Register, 1);
|
$result$$Register, $cnt$$Register);
|
||||||
%}
|
|
||||||
ins_pipe(pipe_class_memory);
|
|
||||||
%}
|
|
||||||
|
|
||||||
instruct string_equalsU(iRegP_R11 str1, iRegP_R13 str2, iRegI_R14 cnt,
|
|
||||||
iRegI_R10 result, rFlagsReg cr)
|
|
||||||
%{
|
|
||||||
predicate(!UseRVV && ((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
|
|
||||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
|
||||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
|
|
||||||
|
|
||||||
format %{ "String Equals $str1, $str2, $cnt -> $result\t#@string_equalsU" %}
|
|
||||||
ins_encode %{
|
|
||||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
|
||||||
__ string_equals($str1$$Register, $str2$$Register,
|
|
||||||
$result$$Register, $cnt$$Register, 2);
|
|
||||||
%}
|
%}
|
||||||
ins_pipe(pipe_class_memory);
|
ins_pipe(pipe_class_memory);
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -2614,24 +2614,7 @@ instruct vstring_equalsL(iRegP_R11 str1, iRegP_R13 str2, iRegI_R14 cnt,
|
||||||
ins_encode %{
|
ins_encode %{
|
||||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
||||||
__ string_equals_v($str1$$Register, $str2$$Register,
|
__ string_equals_v($str1$$Register, $str2$$Register,
|
||||||
$result$$Register, $cnt$$Register, 1);
|
$result$$Register, $cnt$$Register);
|
||||||
%}
|
|
||||||
ins_pipe(pipe_class_memory);
|
|
||||||
%}
|
|
||||||
|
|
||||||
instruct vstring_equalsU(iRegP_R11 str1, iRegP_R13 str2, iRegI_R14 cnt,
|
|
||||||
iRegI_R10 result, vReg_V2 v2,
|
|
||||||
vReg_V3 v3, vReg_V4 v4, vReg_V5 v5, rFlagsReg cr)
|
|
||||||
%{
|
|
||||||
predicate(UseRVV && ((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
|
|
||||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
|
||||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, TEMP v2, TEMP v3, TEMP v4, TEMP v5, KILL cr);
|
|
||||||
|
|
||||||
format %{ "String Equals $str1, $str2, $cnt -> $result\t#@string_equalsU" %}
|
|
||||||
ins_encode %{
|
|
||||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
|
||||||
__ string_equals_v($str1$$Register, $str2$$Register,
|
|
||||||
$result$$Register, $cnt$$Register, 2);
|
|
||||||
%}
|
%}
|
||||||
ins_pipe(pipe_class_memory);
|
ins_pipe(pipe_class_memory);
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -9843,24 +9843,10 @@ instruct string_equalsL(iRegP str1, iRegP str2, iRegI cnt, iRegI result, roddReg
|
||||||
ins_pipe(pipe_class_dummy);
|
ins_pipe(pipe_class_dummy);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
instruct string_equalsU(iRegP str1, iRegP str2, iRegI cnt, iRegI result, roddRegL oddReg, revenRegL evenReg, flagsReg cr) %{
|
|
||||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
|
||||||
effect(TEMP oddReg, TEMP evenReg, KILL cr); // R0, R1 are killed, too.
|
|
||||||
predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU || ((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::none);
|
|
||||||
ins_cost(300);
|
|
||||||
format %{ "String Equals char[] $str1,$str2,$cnt -> $result" %}
|
|
||||||
ins_encode %{
|
|
||||||
__ array_equals(false, $str1$$Register, $str2$$Register,
|
|
||||||
$cnt$$Register, $oddReg$$Register, $evenReg$$Register,
|
|
||||||
$result$$Register, false /* byte */);
|
|
||||||
%}
|
|
||||||
ins_pipe(pipe_class_dummy);
|
|
||||||
%}
|
|
||||||
|
|
||||||
instruct string_equals_imm(iRegP str1, iRegP str2, uimmI8 cnt, iRegI result, flagsReg cr) %{
|
instruct string_equals_imm(iRegP str1, iRegP str2, uimmI8 cnt, iRegI result, flagsReg cr) %{
|
||||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
match(Set result (StrEquals (Binary str1 str2) cnt));
|
||||||
effect(KILL cr); // R0 is killed, too.
|
effect(KILL cr); // R0 is killed, too.
|
||||||
predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::LL || ((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
|
predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::LL);
|
||||||
ins_cost(100);
|
ins_cost(100);
|
||||||
format %{ "String Equals byte[] $str1,$str2,$cnt -> $result" %}
|
format %{ "String Equals byte[] $str1,$str2,$cnt -> $result" %}
|
||||||
ins_encode %{
|
ins_encode %{
|
||||||
|
|
|
@ -222,7 +222,6 @@ bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
|
||||||
case vmIntrinsics::_compareToLU:
|
case vmIntrinsics::_compareToLU:
|
||||||
case vmIntrinsics::_compareToUL:
|
case vmIntrinsics::_compareToUL:
|
||||||
case vmIntrinsics::_equalsL:
|
case vmIntrinsics::_equalsL:
|
||||||
case vmIntrinsics::_equalsU:
|
|
||||||
case vmIntrinsics::_equalsC:
|
case vmIntrinsics::_equalsC:
|
||||||
case vmIntrinsics::_vectorizedHashCode:
|
case vmIntrinsics::_vectorizedHashCode:
|
||||||
case vmIntrinsics::_getCharStringU:
|
case vmIntrinsics::_getCharStringU:
|
||||||
|
@ -532,7 +531,6 @@ bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
|
||||||
if (!SpecialStringIndexOf) return true;
|
if (!SpecialStringIndexOf) return true;
|
||||||
break;
|
break;
|
||||||
case vmIntrinsics::_equalsL:
|
case vmIntrinsics::_equalsL:
|
||||||
case vmIntrinsics::_equalsU:
|
|
||||||
if (!SpecialStringEquals) return true;
|
if (!SpecialStringEquals) return true;
|
||||||
break;
|
break;
|
||||||
case vmIntrinsics::_vectorizedHashCode:
|
case vmIntrinsics::_vectorizedHashCode:
|
||||||
|
|
|
@ -402,7 +402,6 @@ class methodHandle;
|
||||||
do_signature(indexOfI_signature, "([BI[BII)I") \
|
do_signature(indexOfI_signature, "([BI[BII)I") \
|
||||||
do_signature(indexOfChar_signature, "([BIII)I") \
|
do_signature(indexOfChar_signature, "([BIII)I") \
|
||||||
do_intrinsic(_equalsL, java_lang_StringLatin1,equals_name, equalsB_signature, F_S) \
|
do_intrinsic(_equalsL, java_lang_StringLatin1,equals_name, equalsB_signature, F_S) \
|
||||||
do_intrinsic(_equalsU, java_lang_StringUTF16, equals_name, equalsB_signature, F_S) \
|
|
||||||
\
|
\
|
||||||
do_intrinsic(_isDigit, java_lang_CharacterDataLatin1, isDigit_name, int_bool_signature, F_R) \
|
do_intrinsic(_isDigit, java_lang_CharacterDataLatin1, isDigit_name, int_bool_signature, F_R) \
|
||||||
do_name( isDigit_name, "isDigit") \
|
do_name( isDigit_name, "isDigit") \
|
||||||
|
|
|
@ -245,7 +245,6 @@ bool C2Compiler::is_intrinsic_supported(vmIntrinsics::ID id) {
|
||||||
if (!Matcher::match_rule_supported(Op_StrComp)) return false;
|
if (!Matcher::match_rule_supported(Op_StrComp)) return false;
|
||||||
break;
|
break;
|
||||||
case vmIntrinsics::_equalsL:
|
case vmIntrinsics::_equalsL:
|
||||||
case vmIntrinsics::_equalsU:
|
|
||||||
if (!Matcher::match_rule_supported(Op_StrEquals)) return false;
|
if (!Matcher::match_rule_supported(Op_StrEquals)) return false;
|
||||||
break;
|
break;
|
||||||
case vmIntrinsics::_vectorizedHashCode:
|
case vmIntrinsics::_vectorizedHashCode:
|
||||||
|
|
|
@ -311,7 +311,6 @@ bool LibraryCallKit::try_to_inline(int predicate) {
|
||||||
case vmIntrinsics::_indexOfL_char: return inline_string_indexOfChar(StrIntrinsicNode::L);
|
case vmIntrinsics::_indexOfL_char: return inline_string_indexOfChar(StrIntrinsicNode::L);
|
||||||
|
|
||||||
case vmIntrinsics::_equalsL: return inline_string_equals(StrIntrinsicNode::LL);
|
case vmIntrinsics::_equalsL: return inline_string_equals(StrIntrinsicNode::LL);
|
||||||
case vmIntrinsics::_equalsU: return inline_string_equals(StrIntrinsicNode::UU);
|
|
||||||
|
|
||||||
case vmIntrinsics::_vectorizedHashCode: return inline_vectorizedHashCode();
|
case vmIntrinsics::_vectorizedHashCode: return inline_vectorizedHashCode();
|
||||||
|
|
||||||
|
|
|
@ -451,20 +451,6 @@ final class StringUTF16 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IntrinsicCandidate
|
|
||||||
public static boolean equals(byte[] value, byte[] other) {
|
|
||||||
if (value.length == other.length) {
|
|
||||||
int len = value.length >> 1;
|
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
if (getChar(value, i) != getChar(other, i)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@IntrinsicCandidate
|
@IntrinsicCandidate
|
||||||
public static int compareTo(byte[] value, byte[] other) {
|
public static int compareTo(byte[] value, byte[] other) {
|
||||||
int len1 = length(value);
|
int len1 = length(value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue