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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 | 1247 |
1248 // For proxies, no filtering is done. | 1248 // For proxies, no filtering is done. |
1249 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. | 1249 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. |
1250 STATIC_ASSERT(kSmiTag == 0); | 1250 STATIC_ASSERT(kSmiTag == 0); |
1251 __ Cbz(x2, &update_each); | 1251 __ Cbz(x2, &update_each); |
1252 | 1252 |
1253 // Convert the entry to a string or (smi) 0 if it isn't a property | 1253 // Convert the entry to a string or (smi) 0 if it isn't a property |
1254 // any more. If the property has been removed while iterating, we | 1254 // any more. If the property has been removed while iterating, we |
1255 // just skip it. | 1255 // just skip it. |
1256 __ Push(x1, x3); | 1256 __ Push(x1, x3); |
1257 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); | 1257 __ CallRuntime(Runtime::kForInFilter, 2); |
1258 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); | 1258 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); |
1259 __ Mov(x3, x0); | 1259 __ Mov(x3, x0); |
1260 __ Cbz(x0, loop_statement.continue_label()); | 1260 __ JumpIfRoot(x0, Heap::kUndefinedValueRootIndex, |
| 1261 loop_statement.continue_label()); |
1261 | 1262 |
1262 // Update the 'each' property or variable from the possibly filtered | 1263 // Update the 'each' property or variable from the possibly filtered |
1263 // entry in register x3. | 1264 // entry in register x3. |
1264 __ Bind(&update_each); | 1265 __ Bind(&update_each); |
1265 __ Mov(result_register(), x3); | 1266 __ Mov(result_register(), x3); |
1266 // Perform the assignment as if via '='. | 1267 // Perform the assignment as if via '='. |
1267 { EffectContext context(this); | 1268 { EffectContext context(this); |
1268 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); | 1269 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); |
1269 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); | 1270 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); |
1270 } | 1271 } |
(...skipping 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5536 } | 5537 } |
5537 } | 5538 } |
5538 | 5539 |
5539 return INTERRUPT; | 5540 return INTERRUPT; |
5540 } | 5541 } |
5541 | 5542 |
5542 | 5543 |
5543 } } // namespace v8::internal | 5544 } } // namespace v8::internal |
5544 | 5545 |
5545 #endif // V8_TARGET_ARCH_ARM64 | 5546 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |