OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 __ Peek(x2, 3 * kXRegSize); | 1131 __ Peek(x2, 3 * kXRegSize); |
1132 | 1132 |
1133 // Check if the expected map still matches that of the enumerable. | 1133 // Check if the expected map still matches that of the enumerable. |
1134 // If not, we may have to filter the key. | 1134 // If not, we may have to filter the key. |
1135 Label update_each; | 1135 Label update_each; |
1136 __ Peek(x1, 4 * kXRegSize); | 1136 __ Peek(x1, 4 * kXRegSize); |
1137 __ Ldr(x11, FieldMemOperand(x1, HeapObject::kMapOffset)); | 1137 __ Ldr(x11, FieldMemOperand(x1, HeapObject::kMapOffset)); |
1138 __ Cmp(x11, x2); | 1138 __ Cmp(x11, x2); |
1139 __ B(eq, &update_each); | 1139 __ B(eq, &update_each); |
1140 | 1140 |
1141 // For proxies, no filtering is done. | |
1142 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | |
1143 STATIC_ASSERT(kSmiTag == 0); | |
1144 __ Cbz(x2, &update_each); | |
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(x1, x3); | 1144 __ Push(x1, x3); |
1150 __ CallRuntime(Runtime::kForInFilter, 2); | 1145 __ CallRuntime(Runtime::kForInFilter, 2); |
1151 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1146 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
1152 __ Mov(x3, x0); | 1147 __ Mov(x3, x0); |
1153 __ JumpIfRoot(x0, Heap::kUndefinedValueRootIndex, | 1148 __ JumpIfRoot(x0, Heap::kUndefinedValueRootIndex, |
1154 loop_statement.continue_label()); | 1149 loop_statement.continue_label()); |
1155 | 1150 |
(...skipping 3778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4934 } | 4929 } |
4935 | 4930 |
4936 return INTERRUPT; | 4931 return INTERRUPT; |
4937 } | 4932 } |
4938 | 4933 |
4939 | 4934 |
4940 } // namespace internal | 4935 } // namespace internal |
4941 } // namespace v8 | 4936 } // namespace v8 |
4942 | 4937 |
4943 #endif // V8_TARGET_ARCH_ARM64 | 4938 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |