Revision: 15797
Author: [email protected]
Date: Mon Jul 22 02:55:14 2013
Log: In MacroAssembler::JumpIfNotBothSequentialAsciiStrings a custom
mask
helps us decide if we have two ascii strings. We don't care if they
are internalized or not. A few days ago we flipped the meaning of the
internalized bit in INSTANCE_TYPE, and that broke this custom mask.
This CL effects a repair.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/19514004
http://code.google.com/p/v8/source/detail?r=15797
Modified:
/branches/bleeding_edge/src/arm/macro-assembler-arm.cc
/branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
/branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/x64/macro-assembler-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Fri Jul 19
06:30:49 2013
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Mon Jul 22
02:55:14 2013
@@ -3260,9 +3260,10 @@
Register scratch1,
Register scratch2,
Label* failure) {
- int kFlatAsciiStringMask =
+ const int kFlatAsciiStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
- int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
and_(scratch1, first, Operand(kFlatAsciiStringMask));
and_(scratch2, second, Operand(kFlatAsciiStringMask));
cmp(scratch1, Operand(kFlatAsciiStringTag));
@@ -3275,9 +3276,10 @@
void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
Register
scratch,
Label*
failure) {
- int kFlatAsciiStringMask =
+ const int kFlatAsciiStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
- int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
and_(scratch, type, Operand(kFlatAsciiStringMask));
cmp(scratch, Operand(kFlatAsciiStringTag));
b(ne, failure);
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri Jul 19
04:52:42 2013
+++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Mon Jul 22
02:55:14 2013
@@ -4045,7 +4045,7 @@
__ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset));
__ and_(scratch, Immediate(
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask));
- __ cmp(scratch, ASCII_STRING_TYPE);
+ __ cmp(scratch, kStringTag | kOneByteStringTag | kSeqStringTag);
__ j(not_equal, &bailout);
// Add (separator length times array_length) - separator length
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Fri Jul 19
06:30:49 2013
+++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Mon Jul 22
02:55:14 2013
@@ -2798,7 +2798,8 @@
// Check that both are flat ASCII strings.
const int kFlatAsciiStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
- const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
// Interleave bits from both instance types and compare them in one
check.
ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3));
and_(scratch1, kFlatAsciiStringMask);
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Fri Jul 19
07:56:43 2013
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Jul 22
02:55:14 2013
@@ -4968,9 +4968,10 @@
Register scratch1,
Register scratch2,
Label* failure) {
- int kFlatAsciiStringMask =
+ const int kFlatAsciiStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
- int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed.
andi(scratch1, first, kFlatAsciiStringMask);
Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag));
@@ -4982,9 +4983,10 @@
void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
Register
scratch,
Label*
failure) {
- int kFlatAsciiStringMask =
+ const int kFlatAsciiStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
- int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
And(scratch, type, Operand(kFlatAsciiStringMask));
Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag));
}
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Mon Jul 22
00:09:13 2013
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Mon Jul 22
02:55:14 2013
@@ -2253,7 +2253,8 @@
ASSERT(kNotStringTag != 0);
const int kFlatAsciiStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
- const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
andl(scratch1, Immediate(kFlatAsciiStringMask));
andl(scratch2, Immediate(kFlatAsciiStringMask));
@@ -2299,7 +2300,8 @@
ASSERT(kNotStringTag != 0);
const int kFlatAsciiStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
- const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
+ const int kFlatAsciiStringTag =
+ kStringTag | kOneByteStringTag | kSeqStringTag;
andl(scratch1, Immediate(kFlatAsciiStringMask));
andl(scratch2, Immediate(kFlatAsciiStringMask));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.