| 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 __ LoadRoot(at, Heap::kMetaMapRootIndex); | 1145 __ LoadRoot(at, Heap::kMetaMapRootIndex); |
| 1146 __ Branch(&fixed_array, ne, a2, Operand(at)); | 1146 __ Branch(&fixed_array, ne, a2, Operand(at)); |
| 1147 | 1147 |
| 1148 // We got a map in register v0. Get the enumeration cache from it. | 1148 // We got a map in register v0. Get the enumeration cache from it. |
| 1149 Label no_descriptors; | 1149 Label no_descriptors; |
| 1150 __ bind(&use_cache); | 1150 __ bind(&use_cache); |
| 1151 | 1151 |
| 1152 __ EnumLength(a1, v0); | 1152 __ EnumLength(a1, v0); |
| 1153 __ Branch(&no_descriptors, eq, a1, Operand(Smi::FromInt(0))); | 1153 __ Branch(&no_descriptors, eq, a1, Operand(Smi::FromInt(0))); |
| 1154 | 1154 |
| 1155 __ LoadInstanceDescriptors(v0, a2, t0); | 1155 __ LoadInstanceDescriptors(v0, a2); |
| 1156 __ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheOffset)); | 1156 __ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheOffset)); |
| 1157 __ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1157 __ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
| 1158 | 1158 |
| 1159 // Set up the four remaining stack slots. | 1159 // Set up the four remaining stack slots. |
| 1160 __ push(v0); // Map. | 1160 __ push(v0); // Map. |
| 1161 __ li(a0, Operand(Smi::FromInt(0))); | 1161 __ li(a0, Operand(Smi::FromInt(0))); |
| 1162 // Push enumeration cache, enumeration cache length (as smi) and zero. | 1162 // Push enumeration cache, enumeration cache length (as smi) and zero. |
| 1163 __ Push(a2, a1, a0); | 1163 __ Push(a2, a1, a0); |
| 1164 __ jmp(&loop); | 1164 __ jmp(&loop); |
| 1165 | 1165 |
| (...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2705 | 2705 |
| 2706 // Look for valueOf symbol in the descriptor array, and indicate false if | 2706 // Look for valueOf symbol in the descriptor array, and indicate false if |
| 2707 // found. Since we omit an enumeration index check, if it is added via a | 2707 // found. Since we omit an enumeration index check, if it is added via a |
| 2708 // transition that shares its descriptor array, this is a false positive. | 2708 // transition that shares its descriptor array, this is a false positive. |
| 2709 Label entry, loop, done; | 2709 Label entry, loop, done; |
| 2710 | 2710 |
| 2711 // Skip loop if no descriptors are valid. | 2711 // Skip loop if no descriptors are valid. |
| 2712 __ NumberOfOwnDescriptors(a3, a1); | 2712 __ NumberOfOwnDescriptors(a3, a1); |
| 2713 __ Branch(&done, eq, a3, Operand(zero_reg)); | 2713 __ Branch(&done, eq, a3, Operand(zero_reg)); |
| 2714 | 2714 |
| 2715 __ LoadInstanceDescriptors(a1, t0, a2); | 2715 __ LoadInstanceDescriptors(a1, t0); |
| 2716 // t0: descriptor array. | 2716 // t0: descriptor array. |
| 2717 // a3: valid entries in the descriptor array. | 2717 // a3: valid entries in the descriptor array. |
| 2718 STATIC_ASSERT(kSmiTag == 0); | 2718 STATIC_ASSERT(kSmiTag == 0); |
| 2719 STATIC_ASSERT(kSmiTagSize == 1); | 2719 STATIC_ASSERT(kSmiTagSize == 1); |
| 2720 STATIC_ASSERT(kPointerSize == 4); | 2720 STATIC_ASSERT(kPointerSize == 4); |
| 2721 __ li(at, Operand(DescriptorArray::kDescriptorSize)); | 2721 __ li(at, Operand(DescriptorArray::kDescriptorSize)); |
| 2722 __ Mul(a3, a3, at); | 2722 __ Mul(a3, a3, at); |
| 2723 // Calculate location of the first key name. | 2723 // Calculate location of the first key name. |
| 2724 __ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); | 2724 __ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); |
| 2725 // Calculate the end of the descriptor array. | 2725 // Calculate the end of the descriptor array. |
| (...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4568 *context_length = 0; | 4568 *context_length = 0; |
| 4569 return previous_; | 4569 return previous_; |
| 4570 } | 4570 } |
| 4571 | 4571 |
| 4572 | 4572 |
| 4573 #undef __ | 4573 #undef __ |
| 4574 | 4574 |
| 4575 } } // namespace v8::internal | 4575 } } // namespace v8::internal |
| 4576 | 4576 |
| 4577 #endif // V8_TARGET_ARCH_MIPS | 4577 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |