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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 | 1113 |
1114 // We got a fixed array in register x0. Iterate through that. | 1114 // We got a fixed array in register x0. Iterate through that. |
1115 __ Bind(&fixed_array); | 1115 __ Bind(&fixed_array); |
1116 | 1116 |
1117 __ EmitLoadTypeFeedbackVector(x1); | 1117 __ EmitLoadTypeFeedbackVector(x1); |
1118 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1118 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
1119 int vector_index = SmiFromSlot(slot)->value(); | 1119 int vector_index = SmiFromSlot(slot)->value(); |
1120 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index))); | 1120 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index))); |
1121 __ Mov(x1, Smi::FromInt(1)); // Smi(1) indicates slow check. | 1121 __ Mov(x1, Smi::FromInt(1)); // Smi(1) indicates slow check. |
1122 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset)); | 1122 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset)); |
1123 // Smi and array, fixed array length (as smi) and initial index. | 1123 __ Push(x1, x0, x2); // Smi and array, fixed array length (as smi). |
1124 __ Push(x1, x0, x2, xzr); | 1124 PrepareForBailoutForId(stmt->PrepareId(), NO_REGISTERS); |
| 1125 __ Push(xzr); // Initial index. |
1125 | 1126 |
1126 // Generate code for doing the condition check. | 1127 // Generate code for doing the condition check. |
1127 __ Bind(&loop); | 1128 __ Bind(&loop); |
1128 SetExpressionAsStatementPosition(stmt->each()); | 1129 SetExpressionAsStatementPosition(stmt->each()); |
1129 | 1130 |
1130 // Load the current count to x0, load the length to x1. | 1131 // Load the current count to x0, load the length to x1. |
1131 __ PeekPair(x0, x1, 0); | 1132 __ PeekPair(x0, x1, 0); |
1132 __ Cmp(x0, x1); // Compare to the array length. | 1133 __ Cmp(x0, x1); // Compare to the array length. |
1133 __ B(hs, loop_statement.break_label()); | 1134 __ B(hs, loop_statement.break_label()); |
1134 | 1135 |
(...skipping 3700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4835 } | 4836 } |
4836 | 4837 |
4837 return INTERRUPT; | 4838 return INTERRUPT; |
4838 } | 4839 } |
4839 | 4840 |
4840 | 4841 |
4841 } // namespace internal | 4842 } // namespace internal |
4842 } // namespace v8 | 4843 } // namespace v8 |
4843 | 4844 |
4844 #endif // V8_TARGET_ARCH_ARM64 | 4845 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |