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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 // permanent slow case into register a2. | 1131 // permanent slow case into register a2. |
1132 __ lw(a2, MemOperand(sp, 3 * kPointerSize)); | 1132 __ lw(a2, MemOperand(sp, 3 * kPointerSize)); |
1133 | 1133 |
1134 // Check if the expected map still matches that of the enumerable. | 1134 // Check if the expected map still matches that of the enumerable. |
1135 // If not, we may have to filter the key. | 1135 // If not, we may have to filter the key. |
1136 Label update_each; | 1136 Label update_each; |
1137 __ lw(a1, MemOperand(sp, 4 * kPointerSize)); | 1137 __ lw(a1, MemOperand(sp, 4 * kPointerSize)); |
1138 __ lw(t0, FieldMemOperand(a1, HeapObject::kMapOffset)); | 1138 __ lw(t0, FieldMemOperand(a1, HeapObject::kMapOffset)); |
1139 __ Branch(&update_each, eq, t0, Operand(a2)); | 1139 __ Branch(&update_each, eq, t0, Operand(a2)); |
1140 | 1140 |
1141 // For proxies, no filtering is done. | |
1142 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | |
1143 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); | |
1144 __ Branch(&update_each, eq, a2, Operand(zero_reg)); | |
1145 | |
1146 // Convert the entry to a string or (smi) 0 if it isn't a property | 1141 // Convert the entry to a string or (smi) 0 if it isn't a property |
1147 // any more. If the property has been removed while iterating, we | 1142 // any more. If the property has been removed while iterating, we |
1148 // just skip it. | 1143 // just skip it. |
1149 __ Push(a1, a3); // Enumerable and current entry. | 1144 __ Push(a1, a3); // Enumerable and current entry. |
1150 __ CallRuntime(Runtime::kForInFilter, 2); | 1145 __ CallRuntime(Runtime::kForInFilter, 2); |
1151 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1146 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
1152 __ mov(a3, result_register()); | 1147 __ mov(a3, result_register()); |
1153 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 1148 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
1154 __ Branch(loop_statement.continue_label(), eq, a3, Operand(at)); | 1149 __ Branch(loop_statement.continue_label(), eq, a3, Operand(at)); |
1155 | 1150 |
(...skipping 3757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4913 reinterpret_cast<uint32_t>( | 4908 reinterpret_cast<uint32_t>( |
4914 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4909 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4915 return OSR_AFTER_STACK_CHECK; | 4910 return OSR_AFTER_STACK_CHECK; |
4916 } | 4911 } |
4917 | 4912 |
4918 | 4913 |
4919 } // namespace internal | 4914 } // namespace internal |
4920 } // namespace v8 | 4915 } // namespace v8 |
4921 | 4916 |
4922 #endif // V8_TARGET_ARCH_MIPS | 4917 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |