Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 8a44185ed70a5e48b682c2816b60821da3343c44..1eaa98639f58433102102e4e455d9bab2e29bcc7 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -4970,7 +4970,11 @@ void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
Label* failure) { |
int kFlatAsciiStringMask = |
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
- int kFlatAsciiStringTag = ASCII_STRING_TYPE; |
+ // Use ASCII_INTERNALIZED_STRING_TYPE because it's internalized bit is zero. |
+ // Since we don't include that bit in the mask above, the test below will |
+ // succeed for ASCII_STRING_TYPE and ASCII_INTERNALIZED_STRING_TYPE. |
+ STATIC_ASSERT(kInternalizedTag == 0); |
+ const int kFlatAsciiStringTag = ASCII_INTERNALIZED_STRING_TYPE; |
ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. |
andi(scratch1, first, kFlatAsciiStringMask); |
Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); |