Reviewers: Søren Gjesse,

Description:
MIPS: port Fix receiver check in arguments ICs.

Ported r8429 (60a2787)

BUG=
TEST=


Please review this at http://codereview.chromium.org/7276027/

Affected files:
  M src/mips/ic-mips.cc


Index: src/mips/ic-mips.cc
diff --git a/src/mips/ic-mips.cc b/src/mips/ic-mips.cc
index 36d71151418b4d35c03076c5f4e13c511b26404d..cbae8e46e6e37a66a10a7bff7bc5633cab5b5e74 100644
--- a/src/mips/ic-mips.cc
+++ b/src/mips/ic-mips.cc
@@ -903,8 +903,13 @@ static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
                                                 Label* slow_case) {
   Heap* heap = masm->isolate()->heap();

-  // Check that the receiver isn't a smi.
+  // Check that the receiver is a JSObject. Because of the map check
+  // later, we do not need to check for interceptors or whether it
+  // requires access checks.
   __ JumpIfSmi(object, slow_case);
+  // Check that the object is some kind of JSObject.
+  __ GetObjectType(object, scratch1, scratch2);
+  __ Branch(slow_case, lt, scratch2, Operand(FIRST_JS_RECEIVER_TYPE));

   // Check that the key is a positive smi.
   __ And(scratch1, key, Operand(0x8000001));


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

Reply via email to