MIPS: port Fix receiver check in arguments ICs.

Ported r8429 (60a2787)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7276027
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sgjesse@chromium.org 2011-06-28 07:54:01 +00:00
parent b6afa34afa
commit 26e53ac042

View File

@ -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));