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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 592113002: Fix method dispatch in Keyed/StoreIC, and JumpIfNotUniqueName usage (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3447 matching lines...) Expand 10 before | Expand all | Expand 10 after
3458 // Check that both operands are heap objects. 3458 // Check that both operands are heap objects.
3459 __ JumpIfEitherSmi(left, right, &miss); 3459 __ JumpIfEitherSmi(left, right, &miss);
3460 3460
3461 // Check that both operands are unique names. This leaves the instance 3461 // Check that both operands are unique names. This leaves the instance
3462 // types loaded in tmp1 and tmp2. 3462 // types loaded in tmp1 and tmp2.
3463 __ ldr(tmp1, FieldMemOperand(left, HeapObject::kMapOffset)); 3463 __ ldr(tmp1, FieldMemOperand(left, HeapObject::kMapOffset));
3464 __ ldr(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); 3464 __ ldr(tmp2, FieldMemOperand(right, HeapObject::kMapOffset));
3465 __ ldrb(tmp1, FieldMemOperand(tmp1, Map::kInstanceTypeOffset)); 3465 __ ldrb(tmp1, FieldMemOperand(tmp1, Map::kInstanceTypeOffset));
3466 __ ldrb(tmp2, FieldMemOperand(tmp2, Map::kInstanceTypeOffset)); 3466 __ ldrb(tmp2, FieldMemOperand(tmp2, Map::kInstanceTypeOffset));
3467 3467
3468 __ JumpIfNotUniqueName(tmp1, &miss); 3468 __ JumpIfNotUniqueNameInstanceType(tmp1, &miss);
3469 __ JumpIfNotUniqueName(tmp2, &miss); 3469 __ JumpIfNotUniqueNameInstanceType(tmp2, &miss);
3470 3470
3471 // Unique names are compared by identity. 3471 // Unique names are compared by identity.
3472 __ cmp(left, right); 3472 __ cmp(left, right);
3473 // Make sure r0 is non-zero. At this point input operands are 3473 // Make sure r0 is non-zero. At this point input operands are
3474 // guaranteed to be non-zero. 3474 // guaranteed to be non-zero.
3475 DCHECK(right.is(r0)); 3475 DCHECK(right.is(r0));
3476 STATIC_ASSERT(EQUAL == 0); 3476 STATIC_ASSERT(EQUAL == 0);
3477 STATIC_ASSERT(kSmiTag == 0); 3477 STATIC_ASSERT(kSmiTag == 0);
3478 __ mov(r0, Operand(Smi::FromInt(EQUAL)), LeaveCC, eq); 3478 __ mov(r0, Operand(Smi::FromInt(EQUAL)), LeaveCC, eq);
3479 __ Ret(); 3479 __ Ret();
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3691 __ b(eq, miss); 3691 __ b(eq, miss);
3692 3692
3693 Label good; 3693 Label good;
3694 __ cmp(entity_name, tmp); 3694 __ cmp(entity_name, tmp);
3695 __ b(eq, &good); 3695 __ b(eq, &good);
3696 3696
3697 // Check if the entry name is not a unique name. 3697 // Check if the entry name is not a unique name.
3698 __ ldr(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset)); 3698 __ ldr(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset));
3699 __ ldrb(entity_name, 3699 __ ldrb(entity_name,
3700 FieldMemOperand(entity_name, Map::kInstanceTypeOffset)); 3700 FieldMemOperand(entity_name, Map::kInstanceTypeOffset));
3701 __ JumpIfNotUniqueName(entity_name, miss); 3701 __ JumpIfNotUniqueNameInstanceType(entity_name, miss);
3702 __ bind(&good); 3702 __ bind(&good);
3703 3703
3704 // Restore the properties. 3704 // Restore the properties.
3705 __ ldr(properties, 3705 __ ldr(properties,
3706 FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 3706 FieldMemOperand(receiver, JSObject::kPropertiesOffset));
3707 } 3707 }
3708 3708
3709 const int spill_mask = 3709 const int spill_mask =
3710 (lr.bit() | r6.bit() | r5.bit() | r4.bit() | r3.bit() | 3710 (lr.bit() | r6.bit() | r5.bit() | r4.bit() | r3.bit() |
3711 r2.bit() | r1.bit() | r0.bit()); 3711 r2.bit() | r1.bit() | r0.bit());
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3861 3861
3862 // Stop if found the property. 3862 // Stop if found the property.
3863 __ cmp(entry_key, Operand(key)); 3863 __ cmp(entry_key, Operand(key));
3864 __ b(eq, &in_dictionary); 3864 __ b(eq, &in_dictionary);
3865 3865
3866 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { 3866 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) {
3867 // Check if the entry name is not a unique name. 3867 // Check if the entry name is not a unique name.
3868 __ ldr(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset)); 3868 __ ldr(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset));
3869 __ ldrb(entry_key, 3869 __ ldrb(entry_key,
3870 FieldMemOperand(entry_key, Map::kInstanceTypeOffset)); 3870 FieldMemOperand(entry_key, Map::kInstanceTypeOffset));
3871 __ JumpIfNotUniqueName(entry_key, &maybe_in_dictionary); 3871 __ JumpIfNotUniqueNameInstanceType(entry_key, &maybe_in_dictionary);
3872 } 3872 }
3873 } 3873 }
3874 3874
3875 __ bind(&maybe_in_dictionary); 3875 __ bind(&maybe_in_dictionary);
3876 // If we are doing negative lookup then probing failure should be 3876 // If we are doing negative lookup then probing failure should be
3877 // treated as a lookup success. For positive lookup probing failure 3877 // treated as a lookup success. For positive lookup probing failure
3878 // should be treated as lookup failure. 3878 // should be treated as lookup failure.
3879 if (mode() == POSITIVE_LOOKUP) { 3879 if (mode() == POSITIVE_LOOKUP) {
3880 __ mov(result, Operand::Zero()); 3880 __ mov(result, Operand::Zero());
3881 __ Ret(); 3881 __ Ret();
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
4678 MemOperand(fp, 6 * kPointerSize), 4678 MemOperand(fp, 6 * kPointerSize),
4679 NULL); 4679 NULL);
4680 } 4680 }
4681 4681
4682 4682
4683 #undef __ 4683 #undef __
4684 4684
4685 } } // namespace v8::internal 4685 } } // namespace v8::internal
4686 4686
4687 #endif // V8_TARGET_ARCH_ARM 4687 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698