OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 // modification check. Otherwise, we got a fixed array, and we have | 1141 // modification check. Otherwise, we got a fixed array, and we have |
1142 // to do a slow check. | 1142 // to do a slow check. |
1143 Label fixed_array; | 1143 Label fixed_array; |
1144 __ mov(a2, v0); | 1144 __ mov(a2, v0); |
1145 __ lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); | 1145 __ lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); |
1146 __ LoadRoot(at, Heap::kMetaMapRootIndex); | 1146 __ LoadRoot(at, Heap::kMetaMapRootIndex); |
1147 __ Branch(&fixed_array, ne, a1, Operand(at)); | 1147 __ Branch(&fixed_array, ne, a1, Operand(at)); |
1148 | 1148 |
1149 // We got a map in register v0. Get the enumeration cache from it. | 1149 // We got a map in register v0. Get the enumeration cache from it. |
1150 __ bind(&use_cache); | 1150 __ bind(&use_cache); |
1151 __ LoadInstanceDescriptors(v0, a1); | 1151 __ LoadInstanceDescriptors(v0, a1, a2); |
1152 __ lw(a1, FieldMemOperand(a1, DescriptorArray::kEnumerationIndexOffset)); | 1152 __ lw(a1, FieldMemOperand(a1, DescriptorArray::kEnumerationIndexOffset)); |
1153 __ lw(a2, FieldMemOperand(a1, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1153 __ lw(a2, FieldMemOperand(a1, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
1154 | 1154 |
1155 // Set up the four remaining stack slots. | 1155 // Set up the four remaining stack slots. |
1156 __ push(v0); // Map. | 1156 __ push(v0); // Map. |
1157 __ lw(a1, FieldMemOperand(a2, FixedArray::kLengthOffset)); | 1157 __ lw(a1, FieldMemOperand(a2, FixedArray::kLengthOffset)); |
1158 __ li(a0, Operand(Smi::FromInt(0))); | 1158 __ li(a0, Operand(Smi::FromInt(0))); |
1159 // Push enumeration cache, enumeration cache length (as smi) and zero. | 1159 // Push enumeration cache, enumeration cache length (as smi) and zero. |
1160 __ Push(a2, a1, a0); | 1160 __ Push(a2, a1, a0); |
1161 __ jmp(&loop); | 1161 __ jmp(&loop); |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 | 2752 |
2753 // Check for fast case object. Generate false result for slow case object. | 2753 // Check for fast case object. Generate false result for slow case object. |
2754 __ lw(a2, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 2754 __ lw(a2, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
2755 __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset)); | 2755 __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset)); |
2756 __ LoadRoot(t0, Heap::kHashTableMapRootIndex); | 2756 __ LoadRoot(t0, Heap::kHashTableMapRootIndex); |
2757 __ Branch(if_false, eq, a2, Operand(t0)); | 2757 __ Branch(if_false, eq, a2, Operand(t0)); |
2758 | 2758 |
2759 // Look for valueOf symbol in the descriptor array, and indicate false if | 2759 // Look for valueOf symbol in the descriptor array, and indicate false if |
2760 // found. The type is not checked, so if it is a transition it is a false | 2760 // found. The type is not checked, so if it is a transition it is a false |
2761 // negative. | 2761 // negative. |
2762 __ LoadInstanceDescriptors(a1, t0); | 2762 __ LoadInstanceDescriptors(a1, t0, a3); |
2763 __ lw(a3, FieldMemOperand(t0, FixedArray::kLengthOffset)); | 2763 __ lw(a3, FieldMemOperand(t0, FixedArray::kLengthOffset)); |
2764 // t0: descriptor array | 2764 // t0: descriptor array |
2765 // a3: length of descriptor array | 2765 // a3: length of descriptor array |
2766 // Calculate the end of the descriptor array. | 2766 // Calculate the end of the descriptor array. |
2767 STATIC_ASSERT(kSmiTag == 0); | 2767 STATIC_ASSERT(kSmiTag == 0); |
2768 STATIC_ASSERT(kSmiTagSize == 1); | 2768 STATIC_ASSERT(kSmiTagSize == 1); |
2769 STATIC_ASSERT(kPointerSize == 4); | 2769 STATIC_ASSERT(kPointerSize == 4); |
2770 __ Addu(a2, t0, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 2770 __ Addu(a2, t0, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
2771 __ sll(t1, a3, kPointerSizeLog2 - kSmiTagSize); | 2771 __ sll(t1, a3, kPointerSizeLog2 - kSmiTagSize); |
2772 __ Addu(a2, a2, t1); | 2772 __ Addu(a2, a2, t1); |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4614 *context_length = 0; | 4614 *context_length = 0; |
4615 return previous_; | 4615 return previous_; |
4616 } | 4616 } |
4617 | 4617 |
4618 | 4618 |
4619 #undef __ | 4619 #undef __ |
4620 | 4620 |
4621 } } // namespace v8::internal | 4621 } } // namespace v8::internal |
4622 | 4622 |
4623 #endif // V8_TARGET_ARCH_MIPS | 4623 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |