Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: src/mips/macro-assembler-mips.cc

Issue 19514004: In MacroAssembler::JumpIfNotBothSequentialAsciiStrings a custom mask (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));

Powered by Google App Engine
This is Rietveld 408576698