Revision: 13427
Author:   [email protected]
Date:     Fri Jan 18 02:54:24 2013
Log:      MIPS: Fix wrong asserts in SeqStringSetCharGenerator.

This commit fixes wrong asserts in commit r13230 (1929bb68).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11943003
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13427

Modified:
 /branches/bleeding_edge/src/mips/codegen-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/codegen-mips.cc Wed Jan 9 02:12:56 2013 +++ /branches/bleeding_edge/src/mips/codegen-mips.cc Fri Jan 18 02:54:24 2013
@@ -533,9 +533,9 @@
     __ Check(eq, "Non-smi value", at, Operand(zero_reg));

     __ lw(at, FieldMemOperand(string, String::kLengthOffset));
-    __ Check(lt, "Index is too large", at, Operand(index));
+    __ Check(lt, "Index is too large", index, Operand(at));

-    __ Check(ge, "Index is negative", index, Operand(Smi::FromInt(0)));
+    __ Check(ge, "Index is negative", index, Operand(zero_reg));

     __ lw(at, FieldMemOperand(string, HeapObject::kMapOffset));
     __ lbu(at, FieldMemOperand(at, Map::kInstanceTypeOffset));
@@ -543,9 +543,9 @@
__ And(at, at, Operand(kStringRepresentationMask | kStringEncodingMask)); static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag;
-    __ Check(eq, "Unexpected string type", at,
-        Operand(encoding == String::ONE_BYTE_ENCODING
-                    ? one_byte_seq_type : two_byte_seq_type));
+    __ Subu(at, at, Operand(encoding == String::ONE_BYTE_ENCODING
+        ? one_byte_seq_type : two_byte_seq_type));
+    __ Check(eq, "Unexpected string type", at, Operand(zero_reg));
   }

   __ Addu(at,

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to