OLD | NEW |
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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
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 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3637 // Check that both operands are heap objects. | 3637 // Check that both operands are heap objects. |
3638 __ JumpIfEitherSmi(left, right, &miss); | 3638 __ JumpIfEitherSmi(left, right, &miss); |
3639 | 3639 |
3640 // Check that both operands are unique names. This leaves the instance | 3640 // Check that both operands are unique names. This leaves the instance |
3641 // types loaded in tmp1 and tmp2. | 3641 // types loaded in tmp1 and tmp2. |
3642 __ lw(tmp1, FieldMemOperand(left, HeapObject::kMapOffset)); | 3642 __ lw(tmp1, FieldMemOperand(left, HeapObject::kMapOffset)); |
3643 __ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); | 3643 __ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset)); |
3644 __ lbu(tmp1, FieldMemOperand(tmp1, Map::kInstanceTypeOffset)); | 3644 __ lbu(tmp1, FieldMemOperand(tmp1, Map::kInstanceTypeOffset)); |
3645 __ lbu(tmp2, FieldMemOperand(tmp2, Map::kInstanceTypeOffset)); | 3645 __ lbu(tmp2, FieldMemOperand(tmp2, Map::kInstanceTypeOffset)); |
3646 | 3646 |
3647 __ JumpIfNotUniqueName(tmp1, &miss); | 3647 __ JumpIfNotUniqueNameInstanceType(tmp1, &miss); |
3648 __ JumpIfNotUniqueName(tmp2, &miss); | 3648 __ JumpIfNotUniqueNameInstanceType(tmp2, &miss); |
3649 | 3649 |
3650 // Use a0 as result | 3650 // Use a0 as result |
3651 __ mov(v0, a0); | 3651 __ mov(v0, a0); |
3652 | 3652 |
3653 // Unique names are compared by identity. | 3653 // Unique names are compared by identity. |
3654 Label done; | 3654 Label done; |
3655 __ Branch(&done, ne, left, Operand(right)); | 3655 __ Branch(&done, ne, left, Operand(right)); |
3656 // Make sure a0 is non-zero. At this point input operands are | 3656 // Make sure a0 is non-zero. At this point input operands are |
3657 // guaranteed to be non-zero. | 3657 // guaranteed to be non-zero. |
3658 DCHECK(right.is(a0)); | 3658 DCHECK(right.is(a0)); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3892 // Stop if found the property. | 3892 // Stop if found the property. |
3893 __ Branch(miss, eq, entity_name, Operand(Handle<Name>(name))); | 3893 __ Branch(miss, eq, entity_name, Operand(Handle<Name>(name))); |
3894 | 3894 |
3895 Label good; | 3895 Label good; |
3896 __ Branch(&good, eq, entity_name, Operand(tmp)); | 3896 __ Branch(&good, eq, entity_name, Operand(tmp)); |
3897 | 3897 |
3898 // Check if the entry name is not a unique name. | 3898 // Check if the entry name is not a unique name. |
3899 __ lw(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset)); | 3899 __ lw(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset)); |
3900 __ lbu(entity_name, | 3900 __ lbu(entity_name, |
3901 FieldMemOperand(entity_name, Map::kInstanceTypeOffset)); | 3901 FieldMemOperand(entity_name, Map::kInstanceTypeOffset)); |
3902 __ JumpIfNotUniqueName(entity_name, miss); | 3902 __ JumpIfNotUniqueNameInstanceType(entity_name, miss); |
3903 __ bind(&good); | 3903 __ bind(&good); |
3904 | 3904 |
3905 // Restore the properties. | 3905 // Restore the properties. |
3906 __ lw(properties, | 3906 __ lw(properties, |
3907 FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 3907 FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
3908 } | 3908 } |
3909 | 3909 |
3910 const int spill_mask = | 3910 const int spill_mask = |
3911 (ra.bit() | t2.bit() | t1.bit() | t0.bit() | a3.bit() | | 3911 (ra.bit() | t2.bit() | t1.bit() | t0.bit() | a3.bit() | |
3912 a2.bit() | a1.bit() | a0.bit() | v0.bit()); | 3912 a2.bit() | a1.bit() | a0.bit() | v0.bit()); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4069 __ Branch(¬_in_dictionary, eq, entry_key, Operand(undefined)); | 4069 __ Branch(¬_in_dictionary, eq, entry_key, Operand(undefined)); |
4070 | 4070 |
4071 // Stop if found the property. | 4071 // Stop if found the property. |
4072 __ Branch(&in_dictionary, eq, entry_key, Operand(key)); | 4072 __ Branch(&in_dictionary, eq, entry_key, Operand(key)); |
4073 | 4073 |
4074 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { | 4074 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { |
4075 // Check if the entry name is not a unique name. | 4075 // Check if the entry name is not a unique name. |
4076 __ lw(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset)); | 4076 __ lw(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset)); |
4077 __ lbu(entry_key, | 4077 __ lbu(entry_key, |
4078 FieldMemOperand(entry_key, Map::kInstanceTypeOffset)); | 4078 FieldMemOperand(entry_key, Map::kInstanceTypeOffset)); |
4079 __ JumpIfNotUniqueName(entry_key, &maybe_in_dictionary); | 4079 __ JumpIfNotUniqueNameInstanceType(entry_key, &maybe_in_dictionary); |
4080 } | 4080 } |
4081 } | 4081 } |
4082 | 4082 |
4083 __ bind(&maybe_in_dictionary); | 4083 __ bind(&maybe_in_dictionary); |
4084 // If we are doing negative lookup then probing failure should be | 4084 // If we are doing negative lookup then probing failure should be |
4085 // treated as a lookup success. For positive lookup probing failure | 4085 // treated as a lookup success. For positive lookup probing failure |
4086 // should be treated as lookup failure. | 4086 // should be treated as lookup failure. |
4087 if (mode() == POSITIVE_LOOKUP) { | 4087 if (mode() == POSITIVE_LOOKUP) { |
4088 __ Ret(USE_DELAY_SLOT); | 4088 __ Ret(USE_DELAY_SLOT); |
4089 __ mov(result, zero_reg); | 4089 __ mov(result, zero_reg); |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4885 MemOperand(fp, 6 * kPointerSize), | 4885 MemOperand(fp, 6 * kPointerSize), |
4886 NULL); | 4886 NULL); |
4887 } | 4887 } |
4888 | 4888 |
4889 | 4889 |
4890 #undef __ | 4890 #undef __ |
4891 | 4891 |
4892 } } // namespace v8::internal | 4892 } } // namespace v8::internal |
4893 | 4893 |
4894 #endif // V8_TARGET_ARCH_MIPS | 4894 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |