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

Side by Side Diff: src/mips64/code-stubs-mips64.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 | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/macro-assembler-mips64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 // Check that both operands are heap objects. 3674 // Check that both operands are heap objects.
3675 __ JumpIfEitherSmi(left, right, &miss); 3675 __ JumpIfEitherSmi(left, right, &miss);
3676 3676
3677 // Check that both operands are unique names. This leaves the instance 3677 // Check that both operands are unique names. This leaves the instance
3678 // types loaded in tmp1 and tmp2. 3678 // types loaded in tmp1 and tmp2.
3679 __ ld(tmp1, FieldMemOperand(left, HeapObject::kMapOffset)); 3679 __ ld(tmp1, FieldMemOperand(left, HeapObject::kMapOffset));
3680 __ ld(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); 3680 __ ld(tmp2, FieldMemOperand(right, HeapObject::kMapOffset));
3681 __ lbu(tmp1, FieldMemOperand(tmp1, Map::kInstanceTypeOffset)); 3681 __ lbu(tmp1, FieldMemOperand(tmp1, Map::kInstanceTypeOffset));
3682 __ lbu(tmp2, FieldMemOperand(tmp2, Map::kInstanceTypeOffset)); 3682 __ lbu(tmp2, FieldMemOperand(tmp2, Map::kInstanceTypeOffset));
3683 3683
3684 __ JumpIfNotUniqueName(tmp1, &miss); 3684 __ JumpIfNotUniqueNameInstanceType(tmp1, &miss);
3685 __ JumpIfNotUniqueName(tmp2, &miss); 3685 __ JumpIfNotUniqueNameInstanceType(tmp2, &miss);
3686 3686
3687 // Use a0 as result 3687 // Use a0 as result
3688 __ mov(v0, a0); 3688 __ mov(v0, a0);
3689 3689
3690 // Unique names are compared by identity. 3690 // Unique names are compared by identity.
3691 Label done; 3691 Label done;
3692 __ Branch(&done, ne, left, Operand(right)); 3692 __ Branch(&done, ne, left, Operand(right));
3693 // Make sure a0 is non-zero. At this point input operands are 3693 // Make sure a0 is non-zero. At this point input operands are
3694 // guaranteed to be non-zero. 3694 // guaranteed to be non-zero.
3695 DCHECK(right.is(a0)); 3695 DCHECK(right.is(a0));
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
3930 // Stop if found the property. 3930 // Stop if found the property.
3931 __ Branch(miss, eq, entity_name, Operand(Handle<Name>(name))); 3931 __ Branch(miss, eq, entity_name, Operand(Handle<Name>(name)));
3932 3932
3933 Label good; 3933 Label good;
3934 __ Branch(&good, eq, entity_name, Operand(tmp)); 3934 __ Branch(&good, eq, entity_name, Operand(tmp));
3935 3935
3936 // Check if the entry name is not a unique name. 3936 // Check if the entry name is not a unique name.
3937 __ ld(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset)); 3937 __ ld(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset));
3938 __ lbu(entity_name, 3938 __ lbu(entity_name,
3939 FieldMemOperand(entity_name, Map::kInstanceTypeOffset)); 3939 FieldMemOperand(entity_name, Map::kInstanceTypeOffset));
3940 __ JumpIfNotUniqueName(entity_name, miss); 3940 __ JumpIfNotUniqueNameInstanceType(entity_name, miss);
3941 __ bind(&good); 3941 __ bind(&good);
3942 3942
3943 // Restore the properties. 3943 // Restore the properties.
3944 __ ld(properties, 3944 __ ld(properties,
3945 FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 3945 FieldMemOperand(receiver, JSObject::kPropertiesOffset));
3946 } 3946 }
3947 3947
3948 const int spill_mask = 3948 const int spill_mask =
3949 (ra.bit() | a6.bit() | a5.bit() | a4.bit() | a3.bit() | 3949 (ra.bit() | a6.bit() | a5.bit() | a4.bit() | a3.bit() |
3950 a2.bit() | a1.bit() | a0.bit() | v0.bit()); 3950 a2.bit() | a1.bit() | a0.bit() | v0.bit());
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
4107 __ Branch(&not_in_dictionary, eq, entry_key, Operand(undefined)); 4107 __ Branch(&not_in_dictionary, eq, entry_key, Operand(undefined));
4108 4108
4109 // Stop if found the property. 4109 // Stop if found the property.
4110 __ Branch(&in_dictionary, eq, entry_key, Operand(key)); 4110 __ Branch(&in_dictionary, eq, entry_key, Operand(key));
4111 4111
4112 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { 4112 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) {
4113 // Check if the entry name is not a unique name. 4113 // Check if the entry name is not a unique name.
4114 __ ld(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset)); 4114 __ ld(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset));
4115 __ lbu(entry_key, 4115 __ lbu(entry_key,
4116 FieldMemOperand(entry_key, Map::kInstanceTypeOffset)); 4116 FieldMemOperand(entry_key, Map::kInstanceTypeOffset));
4117 __ JumpIfNotUniqueName(entry_key, &maybe_in_dictionary); 4117 __ JumpIfNotUniqueNameInstanceType(entry_key, &maybe_in_dictionary);
4118 } 4118 }
4119 } 4119 }
4120 4120
4121 __ bind(&maybe_in_dictionary); 4121 __ bind(&maybe_in_dictionary);
4122 // If we are doing negative lookup then probing failure should be 4122 // If we are doing negative lookup then probing failure should be
4123 // treated as a lookup success. For positive lookup probing failure 4123 // treated as a lookup success. For positive lookup probing failure
4124 // should be treated as lookup failure. 4124 // should be treated as lookup failure.
4125 if (mode() == POSITIVE_LOOKUP) { 4125 if (mode() == POSITIVE_LOOKUP) {
4126 __ Ret(USE_DELAY_SLOT); 4126 __ Ret(USE_DELAY_SLOT);
4127 __ mov(result, zero_reg); 4127 __ mov(result, zero_reg);
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
4923 MemOperand(fp, 6 * kPointerSize), 4923 MemOperand(fp, 6 * kPointerSize),
4924 NULL); 4924 NULL);
4925 } 4925 }
4926 4926
4927 4927
4928 #undef __ 4928 #undef __
4929 4929
4930 } } // namespace v8::internal 4930 } } // namespace v8::internal
4931 4931
4932 #endif // V8_TARGET_ARCH_MIPS64 4932 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698